Go to the documentation of this file.
29 #ifndef ROSCPP_MESSAGE_EVENT_H
30 #define ROSCPP_MESSAGE_EVENT_H
36 #include <boost/type_traits/is_void.hpp>
37 #include <boost/type_traits/is_base_of.hpp>
38 #include <boost/type_traits/is_const.hpp>
39 #include <boost/type_traits/add_const.hpp>
40 #include <boost/type_traits/remove_const.hpp>
41 #include <boost/utility/enable_if.hpp>
42 #include <boost/function.hpp>
43 #include <boost/make_shared.hpp>
53 return boost::make_shared<M>();
73 typedef typename boost::remove_const<M>::type
Message;
129 init(message, connection_header, receipt_time, nonconst_need_copy, create);
160 return copyMessageIfNecessary<M>();
208 return !(*
this == rhs);
214 template<
typename M2>
219 return boost::const_pointer_cast<Message>(
message_);
234 template<
typename M2>
237 return boost::const_pointer_cast<Message>(
message_);
255 #endif // ROSCPP_MESSAGE_EVENT_H
MessageEvent(const MessageEvent< Message > &rhs)
ros::Time getReceiptTime() const
Returns the time at which this message was received.
MessageEvent(const ConstMessagePtr &message, ros::Time receipt_time)
boost::shared_ptr< M_string > connection_header_
const std::string & getPublisherName() const
Returns the name of the node which published this message.
static const std::string s_unknown_publisher_string_
boost::shared_ptr< ConstMessage > ConstMessagePtr
boost::function< MessagePtr()> CreateFunction
const boost::shared_ptr< ConstMessage > & getConstMessage() const
Retrieve a const version of the message.
MessageEvent(const MessageEvent< ConstMessage > &rhs)
bool getMessageWillCopy() const
MessageEvent(const ConstMessagePtr &message, const boost::shared_ptr< M_string > &connection_header, ros::Time receipt_time, bool nonconst_need_copy, const CreateFunction &create)
boost::shared_ptr< Message > MessagePtr
MessageEvent(const ConstMessagePtr &message)
boost::shared_ptr< M > operator()()
boost::remove_const< M >::type Message
bool operator<(const MessageEvent< M > &rhs)
void operator=(const MessageEvent< ConstMessage > &rhs)
boost::disable_if< boost::is_void< M2 >, boost::shared_ptr< M > >::type copyMessageIfNecessary() const
bool operator==(const MessageEvent< M > &rhs)
boost::add_const< M >::type ConstMessage
MessageEvent(const MessageEvent< void const > &rhs, const CreateFunction &create)
MessageEvent(const MessageEvent< Message > &rhs, bool nonconst_need_copy)
boost::enable_if< boost::is_void< M2 >, boost::shared_ptr< M > >::type copyMessageIfNecessary() const
const boost::shared_ptr< M_string > & getConnectionHeaderPtr() const
const CreateFunction & getMessageFactory() const
boost::shared_ptr< M > getMessage() const
Retrieve the message. If M is const, this returns a reference to it. If M is non const and this event...
M_string & getConnectionHeader() const
Retrieve the connection header.
MessageEvent(const ConstMessagePtr &message, const boost::shared_ptr< M_string > &connection_header, ros::Time receipt_time)
ROS_DEPRECATED boost::shared_ptr< M > defaultMessageCreateFunction()
void init(const ConstMessagePtr &message, const boost::shared_ptr< M_string > &connection_header, ros::Time receipt_time, bool nonconst_need_copy, const CreateFunction &create)
bool operator!=(const MessageEvent< M > &rhs)
Event type for subscriptions, const ros::MessageEvent<M const>& can be used in your callback instead ...
bool nonConstWillCopy() const
std::map< std::string, std::string > M_string
void operator=(const MessageEvent< Message > &rhs)
MessageEvent(const MessageEvent< ConstMessage > &rhs, bool nonconst_need_copy)
roscpp_traits
Author(s): Josh Faust, Dirk Thomas
autogenerated on Sat Jun 17 2023 02:32:39