28 #ifndef ROSLIB_MESSAGE_TRAITS_H 29 #define ROSLIB_MESSAGE_TRAITS_H 46 #define ROS_IMPLEMENT_SIMPLE_TOPIC_TRAITS(msg, md5sum, datatype, definition) \ 47 namespace rs2rosinternal \ 49 namespace message_traits \ 51 template<> struct MD5Sum<msg> \ 53 static const char* value() { return md5sum; } \ 54 static const char* value(const msg&) { return value(); } \ 56 template<> struct DataType<msg> \ 58 static const char* value() { return datatype; } \ 59 static const char* value(const msg&) { return value(); } \ 61 template<> struct Definition<msg> \ 63 static const char* value() { return definition; } \ 64 static const char* value(const msg&) { return value(); } \ 72 namespace message_traits
91 static const bool value =
false;
122 return M::__s_getMD5Sum();
127 return m.__getMD5Sum();
139 return M::__s_getDataType();
144 return m.__getDataType();
156 return M::__s_getMessageDefinition();
161 return m.__getMessageDefinition();
169 template<
typename M,
typename Enable =
void>
188 template<
typename M,
typename Enable =
void>
208 template<
typename M,
typename Enable =
void>
361 #endif // ROSLIB_MESSAGE_TRAITS_H static std::string const * pointer(const M &m)
GLenum GLsizei const void * pointer
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
rs2rosinternal::Time const * timeStamp(const M &m)
returns TimeStamp<M>::pointer(m);
#define ROS_DECLARE_MESSAGE(msg)
Forward-declare a message, including Ptr and ConstPtr types, using std::allocator.
static rs2rosinternal::Time value(const M &m)
Specialize to provide the md5sum for a message.
static const char * value(const M &m)
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
GLsizei const GLchar *const * string
bool hasHeader()
returns HasHeader<M>::value;
Specialize to provide the datatype for a message.
static std::string const * pointer(const M &m)
A fixed-size datatype is one whose size is constant, i.e. it has no variable-length arrays or strings...
static const char * value()
std_msgs::Header const * header(const M &m)
returns Header<M>::pointer(m);
bool isSimple()
returns IsSimple<M>::value;
static std::string * pointer(M &m)
static const char * value()
A simple datatype is one that can be memcpy'd directly in array form, i.e. it's a POD...
const char * md5sum(const M &m)
returns MD5Sum<M>::value(m);
const char * datatype(const M &m)
returns DataType<M>::value(m);
::std_msgs::Header_< std::allocator< void > > Header
TimeStamp trait. In the default implementation pointer() returns &m.header.stamp if HasHeader<M>::val...
Time representation. May either represent wall clock time or ROS clock time.
Specialize to provide the definition for a message.
std::string const * frameId(const M &m)
returns FrameId<M>::pointer(m);
static rs2rosinternal::Time * pointer(typename std::remove_const< M >::type &m)
static const char * value()
static rs2rosinternal::Time const * pointer(const M &m)
static rs2rosinternal::Time * pointer(M &m)
FrameId trait. In the default implementation pointer() returns &m.header.frame_id if HasHeader<M>::va...
static rs2rosinternal::Time const * pointer(const M &m)
static const char * value(const M &m)
static std::string * pointer(M &m)
const char * definition(const M &m)
returns Definition<M>::value(m);
static const char * value(const M &m)
bool isFixedSize()
returns IsFixedSize<M>::value;
static std::string value(const M &m)