Go to the documentation of this file.
29 #ifndef ROSLIB_MESSAGE_TRAITS_H
30 #define ROSLIB_MESSAGE_TRAITS_H
46 #define ROS_IMPLEMENT_SIMPLE_TOPIC_TRAITS(msg, md5sum, datatype, definition) \
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().c_str();
125 static const char*
value(
const M& m)
127 return m.__getMD5Sum().c_str();
139 return M::__s_getDataType().c_str();
142 static const char*
value(
const M& m)
144 return m.__getDataType().c_str();
156 return M::__s_getMessageDefinition().c_str();
159 static const char*
value(
const M& m)
161 return m.__getMessageDefinition().c_str();
169 template<
typename M,
typename Enable =
void>
188 template<
typename M,
typename Enable =
void>
191 static std::string*
pointer(M& m) { (void)m;
return 0; }
192 static std::string
const*
pointer(
const M& m) { (void)m;
return 0; }
198 static std::string*
pointer(M& m) {
return &m.header.frame_id; }
199 static std::string
const*
pointer(
const M& m) {
return &m.header.frame_id; }
200 static std::string
value(
const M& m) {
return m.header.frame_id; }
208 template<
typename M,
typename Enable =
void>
361 #endif // ROSLIB_MESSAGE_TRAITS_H
bool hasHeader()
returns HasHeader<M>::value;
const char * md5sum()
returns MD5Sum<M>::value();
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
A simple datatype is one that can be memcpy'd directly in array form, i.e. it's a POD,...
static ros::Time const * pointer(const M &m)
static ros::Time * pointer(M &m)
static ros::Time * pointer(typename std::remove_const< M >::type &m)
static ros::Time value(const M &m)
std::string * frameId(M &m)
returns FrameId<M>::pointer(m);
const char * datatype()
returns DataType<M>::value();
TimeStamp trait. In the default implementation pointer() returns &m.header.stamp if HasHeader<M>::val...
A fixed-size datatype is one whose size is constant, i.e. it has no variable-length arrays or strings...
FrameId trait. In the default implementation pointer() returns &m.header.frame_id if HasHeader<M>::va...
static std::string const * pointer(const M &m)
static const char * value(const M &m)
bool isFixedSize()
returns IsFixedSize<M>::value;
Specialize to provide the datatype for a message.
static const char * value()
Specialize to provide the definition for a message.
#define ROS_DECLARE_MESSAGE(msg)
Forward-declare a message, including Ptr and ConstPtr types, using std::allocator.
static std::string * pointer(M &m)
static const char * value(const M &m)
static std::string * pointer(M &m)
static std::string const * pointer(const M &m)
Base type for compile-type true/false tests. Compatible with Boost.MPL. classes inheriting from this ...
Specialize to provide the md5sum for a message.
static const char * value(const M &m)
bool isSimple()
returns IsSimple<M>::value;
static const char * value()
static std::string value(const M &m)
static const char * value()
ros::Time * timeStamp(M &m)
returns TimeStamp<M>::pointer(m);
std_msgs::Header * header(M &m)
returns Header<M>::pointer(m);
const char * definition()
returns Definition<M>::value();
static ros::Time const * pointer(const M &m)
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:09