Event type for subscriptions, const rs2rosinternal::MessageEvent<M const>& can be used in your callback instead of const std::shared_ptr<M const>&. More...
#include <message_event.h>
Public Types | |
typedef boost::add_const< M >::type | ConstMessage |
typedef std::shared_ptr< ConstMessage > | ConstMessagePtr |
typedef boost::function< MessagePtr()> | CreateFunction |
typedef std::remove_const< M >::type | Message |
typedef std::shared_ptr< Message > | MessagePtr |
Public Member Functions | |
M_string & | getConnectionHeader () const |
Retrieve the connection header. More... | |
const std::shared_ptr< M_string > & | getConnectionHeaderPtr () const |
const std::shared_ptr< ConstMessage > & | getConstMessage () const |
Retrieve a const version of the message. More... | |
std::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 requires it, returns a copy. Note that it caches this copy for later use, so it will only every make the copy once. More... | |
const CreateFunction & | getMessageFactory () const |
bool | getMessageWillCopy () const |
const std::string & | getPublisherName () const |
Returns the name of the node which published this message. More... | |
rs2rosinternal::Time | getReceiptTime () const |
Returns the time at which this message was received. More... | |
void | init (const ConstMessagePtr &message, const std::shared_ptr< M_string > &connection_header, rs2rosinternal::Time receipt_time, bool nonconst_need_copy, const CreateFunction &create) |
MessageEvent () | |
MessageEvent (const MessageEvent< Message > &rhs) | |
MessageEvent (const MessageEvent< ConstMessage > &rhs) | |
MessageEvent (const MessageEvent< Message > &rhs, bool nonconst_need_copy) | |
MessageEvent (const MessageEvent< ConstMessage > &rhs, bool nonconst_need_copy) | |
MessageEvent (const MessageEvent< void const > &rhs, const CreateFunction &create) | |
MessageEvent (const ConstMessagePtr &message) | |
MessageEvent (const ConstMessagePtr &message, const std::shared_ptr< M_string > &connection_header, rs2rosinternal::Time receipt_time) | |
MessageEvent (const ConstMessagePtr &message, rs2rosinternal::Time receipt_time) | |
MessageEvent (const ConstMessagePtr &message, const std::shared_ptr< M_string > &connection_header, rs2rosinternal::Time receipt_time, bool nonconst_need_copy, const CreateFunction &create) | |
bool | nonConstWillCopy () const |
bool | operator!= (const MessageEvent< M > &rhs) |
bool | operator< (const MessageEvent< M > &rhs) |
void | operator= (const MessageEvent< Message > &rhs) |
void | operator= (const MessageEvent< ConstMessage > &rhs) |
bool | operator== (const MessageEvent< M > &rhs) |
Private Member Functions | |
template<typename M2 > | |
boost::disable_if< boost::is_void< M2 >, std::shared_ptr< M > >::type | copyMessageIfNecessary () const |
template<typename M2 > | |
boost::enable_if< boost::is_void< M2 >, std::shared_ptr< M > >::type | copyMessageIfNecessary () const |
Private Attributes | |
std::shared_ptr< M_string > | connection_header_ |
CreateFunction | create_ |
ConstMessagePtr | message_ |
MessagePtr | message_copy_ |
bool | nonconst_need_copy_ |
rs2rosinternal::Time | receipt_time_ |
Static Private Attributes | |
static const std::string | s_unknown_publisher_string_ |
Event type for subscriptions, const rs2rosinternal::MessageEvent<M const>& can be used in your callback instead of const std::shared_ptr<M const>&.
Useful if you need to retrieve meta-data about the message, such as the full connection header, or the publisher's node name
Definition at line 69 of file message_event.h.
typedef boost::add_const<M>::type rs2rosinternal::MessageEvent< M >::ConstMessage |
Definition at line 72 of file message_event.h.
typedef std::shared_ptr<ConstMessage> rs2rosinternal::MessageEvent< M >::ConstMessagePtr |
Definition at line 75 of file message_event.h.
typedef boost::function<MessagePtr()> rs2rosinternal::MessageEvent< M >::CreateFunction |
Definition at line 76 of file message_event.h.
typedef std::remove_const<M>::type rs2rosinternal::MessageEvent< M >::Message |
Definition at line 73 of file message_event.h.
typedef std::shared_ptr<Message> rs2rosinternal::MessageEvent< M >::MessagePtr |
Definition at line 74 of file message_event.h.
|
inline |
Definition at line 78 of file message_event.h.
|
inline |
Definition at line 82 of file message_event.h.
|
inline |
Definition at line 87 of file message_event.h.
|
inline |
Definition at line 92 of file message_event.h.
|
inline |
Definition at line 98 of file message_event.h.
|
inline |
Definition at line 104 of file message_event.h.
|
inline |
Definition at line 112 of file message_event.h.
|
inline |
Definition at line 117 of file message_event.h.
|
inline |
Definition at line 122 of file message_event.h.
|
inline |
Definition at line 127 of file message_event.h.
|
inlineprivate |
Definition at line 215 of file message_event.h.
|
inlineprivate |
Definition at line 235 of file message_event.h.
|
inline |
Retrieve the connection header.
Definition at line 170 of file message_event.h.
|
inline |
Definition at line 171 of file message_event.h.
|
inline |
Retrieve a const version of the message.
Definition at line 166 of file message_event.h.
|
inline |
Retrieve the message. If M is const, this returns a reference to it. If M is non const and this event requires it, returns a copy. Note that it caches this copy for later use, so it will only every make the copy once.
Definition at line 158 of file message_event.h.
|
inline |
Definition at line 211 of file message_event.h.
|
inline |
Definition at line 184 of file message_event.h.
|
inline |
Returns the name of the node which published this message.
Definition at line 176 of file message_event.h.
|
inline |
Returns the time at which this message was received.
Definition at line 181 of file message_event.h.
|
inline |
Definition at line 132 of file message_event.h.
|
inline |
Definition at line 183 of file message_event.h.
|
inline |
Definition at line 206 of file message_event.h.
|
inline |
Definition at line 186 of file message_event.h.
|
inline |
Definition at line 141 of file message_event.h.
|
inline |
Definition at line 147 of file message_event.h.
|
inline |
Definition at line 201 of file message_event.h.
|
private |
Definition at line 243 of file message_event.h.
|
private |
Definition at line 246 of file message_event.h.
|
private |
Definition at line 240 of file message_event.h.
|
mutableprivate |
Definition at line 242 of file message_event.h.
|
private |
Definition at line 245 of file message_event.h.
|
private |
Definition at line 244 of file message_event.h.
|
staticprivate |
Definition at line 248 of file message_event.h.