Gazebo Transport

API Reference

11.4.1

A class that provides information about the message received. More...

#include <MessageInfo.hh>

Public Member Functions

 MessageInfo ()
 Default constructor. More...
 
 MessageInfo (const MessageInfo &_other)
 Explicit copy constructor (The copy constructor is deleted by default due to the use of std::unique_ptr member). More...
 
 MessageInfo (MessageInfo &&_other)
 Move constructor. More...
 
 ~MessageInfo ()
 Destructor. More...
 
bool IntraProcess () const
 Whether the message is coming from a node within this process. More...
 
const std::stringPartition () const
 Get the name of the partition. More...
 
void SetIntraProcess (bool _value)
 Set whether this message is intra-process or not. More...
 
void SetPartition (const std::string &_partition)
 Set the partition of the topic the message was on. More...
 
void SetTopic (const std::string &_topic)
 Set the topic name associated to the message. More...
 
bool SetTopicAndPartition (const std::string &_fullyQualifiedName)
 Set both the topic and the partition from a single string. More...
 
void SetType (const std::string &_type)
 Set the name of the message type. More...
 
const std::stringTopic () const
 Get the topic name associated to the message. More...
 
const std::stringType () const
 Get the name of the message type. More...
 

Protected Attributes

std::unique_ptr< MessageInfoPrivate > dataPtr
 

Detailed Description

A class that provides information about the message received.

Constructor & Destructor Documentation

◆ MessageInfo() [1/3]

Default constructor.

◆ MessageInfo() [2/3]

MessageInfo ( const MessageInfo _other)

Explicit copy constructor (The copy constructor is deleted by default due to the use of std::unique_ptr member).

Parameters
[in]_otheran instance to copy data from

◆ MessageInfo() [3/3]

MessageInfo ( MessageInfo &&  _other)

Move constructor.

Parameters
[in]_otheran instance data is moved from

◆ ~MessageInfo()

Destructor.

Member Function Documentation

◆ IntraProcess()

bool IntraProcess ( ) const

Whether the message is coming from a node within this process.

Returns
True when intra-process, false otherwise.

◆ Partition()

const std::string& Partition ( ) const

Get the name of the partition.

Returns
The partition name.

◆ SetIntraProcess()

void SetIntraProcess ( bool  _value)

Set whether this message is intra-process or not.

Parameters
[in]_valueThe intra-process value.

◆ SetPartition()

void SetPartition ( const std::string _partition)

Set the partition of the topic the message was on.

Parameters
[in]_partitionof the topic.

◆ SetTopic()

void SetTopic ( const std::string _topic)

Set the topic name associated to the message.

◆ SetTopicAndPartition()

bool SetTopicAndPartition ( const std::string _fullyQualifiedName)

Set both the topic and the partition from a single string.

Parameters
[in]_fullyQualifiedNameThe topic string with the partition information included.
Returns
true if the topic and partition were set
See also
TopicUtils::FullyQualifiedName

◆ SetType()

void SetType ( const std::string _type)

Set the name of the message type.

Parameters
[in]_typethe type name to set.

◆ Topic()

const std::string& Topic ( ) const

Get the topic name associated to the message.

Returns
The topic name.

◆ Type()

const std::string& Type ( ) const

Get the name of the message type.

Returns
The message type name.

Member Data Documentation

◆ dataPtr

std::unique_ptr<MessageInfoPrivate> dataPtr
protected

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