Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
variant_topic_tools::MessageHeader Class Reference

Variant message header. More...

#include <MessageHeader.h>

List of all members.

Public Member Functions

const std::string & getField (const std::string &name) const
 Retrieve a field of the message header.
const std::string & getPublisher () const
 Retrieve the name of the publishing node.
const std::string & getTopic () const
 Retrieve the message publishing topic.
bool hasField (const std::string &name) const
 True, if the message header contains a field with the specified name.
bool isLatched () const
 True, if the message publication is latched.
 MessageHeader ()
 Default constructor.
 MessageHeader (const MessageHeader &src)
 Copy constructor.
std::string & operator[] (const std::string &name)
 Operator for retrieving a field of the message header (non-const version)
const std::string & operator[] (const std::string &name) const
 Operator for retrieving a field of the message header (const version)
void setField (const std::string &name, const std::string &value)
 Set a field of the message header.
void setLatched (bool latched)
 Set to true to indicate that the message publication is latched.
void setPublisher (const std::string &publisher)
 Set the name of the publishing node.
void setTopic (const std::string &topic)
 Set the message publishing topic.
 ~MessageHeader ()
 Destructor.

Protected Types

typedef std::map< std::string,
std::string > 
Fields
 Definition of the fields type.
typedef boost::shared_ptr
< std::map< std::string,
std::string > > 
FieldsPtr
 Definition of the fields pointer type.

Protected Member Functions

 MessageHeader (const FieldsPtr &fields)
 Constructor (overloaded version taking a fields pointer)

Protected Attributes

FieldsPtr fields
 The fields of the message header.

Friends

class Message
class ros::serialization::PreDeserialize< Message >

Detailed Description

Variant message header.

Definition at line 33 of file MessageHeader.h.


Member Typedef Documentation

typedef std::map<std::string, std::string> variant_topic_tools::MessageHeader::Fields [protected]

Definition of the fields type.

Definition at line 100 of file MessageHeader.h.

typedef boost::shared_ptr<std::map<std::string, std::string> > variant_topic_tools::MessageHeader::FieldsPtr [protected]

Definition of the fields pointer type.

Definition at line 104 of file MessageHeader.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 27 of file MessageHeader.cpp.

Copy constructor.

Definition at line 35 of file MessageHeader.cpp.

Destructor.

Definition at line 39 of file MessageHeader.cpp.

Constructor (overloaded version taking a fields pointer)

Definition at line 31 of file MessageHeader.cpp.


Member Function Documentation

const std::string & variant_topic_tools::MessageHeader::getField ( const std::string &  name) const

Retrieve a field of the message header.

Definition at line 51 of file MessageHeader.cpp.

const std::string & variant_topic_tools::MessageHeader::getPublisher ( ) const

Retrieve the name of the publishing node.

Definition at line 66 of file MessageHeader.cpp.

const std::string & variant_topic_tools::MessageHeader::getTopic ( ) const

Retrieve the message publishing topic.

Definition at line 74 of file MessageHeader.cpp.

bool variant_topic_tools::MessageHeader::hasField ( const std::string &  name) const

True, if the message header contains a field with the specified name.

Definition at line 86 of file MessageHeader.cpp.

True, if the message publication is latched.

Definition at line 82 of file MessageHeader.cpp.

std::string & variant_topic_tools::MessageHeader::operator[] ( const std::string &  name)

Operator for retrieving a field of the message header (non-const version)

Definition at line 94 of file MessageHeader.cpp.

const std::string & variant_topic_tools::MessageHeader::operator[] ( const std::string &  name) const

Operator for retrieving a field of the message header (const version)

Definition at line 98 of file MessageHeader.cpp.

void variant_topic_tools::MessageHeader::setField ( const std::string &  name,
const std::string &  value 
)

Set a field of the message header.

Definition at line 46 of file MessageHeader.cpp.

Set to true to indicate that the message publication is latched.

Definition at line 78 of file MessageHeader.cpp.

void variant_topic_tools::MessageHeader::setPublisher ( const std::string &  publisher)

Set the name of the publishing node.

Definition at line 62 of file MessageHeader.cpp.

void variant_topic_tools::MessageHeader::setTopic ( const std::string &  topic)

Set the message publishing topic.

Definition at line 70 of file MessageHeader.cpp.


Friends And Related Function Documentation

friend class Message [friend]

Definition at line 34 of file MessageHeader.h.

friend class ros::serialization::PreDeserialize< Message > [friend]

Definition at line 35 of file MessageHeader.h.


Member Data Documentation

The fields of the message header.

Definition at line 108 of file MessageHeader.h.


The documentation for this class was generated from the following files:


variant_topic_tools
Author(s): Ralf Kaestner
autogenerated on Fri Aug 5 2016 06:06:27