CARLA
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
std_msgs::msg::String Class Reference

This class represents the structure String defined by the user in the IDL file. More...

#include <String.h>

+ Collaboration diagram for std_msgs::msg::String:

Public Member Functions

eProsima_user_DllExport void data (const std::string &_data)
 This function copies the value in member data. More...
 
eProsima_user_DllExport void data (std::string &&_data)
 This function moves the value in member data. More...
 
eProsima_user_DllExport const std::string & data () const
 This function returns a constant reference to member data. More...
 
eProsima_user_DllExport std::string & data ()
 This function returns a reference to member data. More...
 
eProsima_user_DllExport void deserialize (eprosima::fastcdr::Cdr &cdr)
 This function deserializes an object using CDR serialization. More...
 
eProsima_user_DllExport bool operator!= (const String &x) const
 Comparison operator. More...
 
eProsima_user_DllExport Stringoperator= (const String &x)
 Copy assignment. More...
 
eProsima_user_DllExport Stringoperator= (String &&x) noexcept
 Move assignment. More...
 
eProsima_user_DllExport bool operator== (const String &x) const
 Comparison operator. More...
 
eProsima_user_DllExport void serialize (eprosima::fastcdr::Cdr &cdr) const
 This function serializes an object using CDR serialization. More...
 
eProsima_user_DllExport void serializeKey (eprosima::fastcdr::Cdr &cdr) const
 This function serializes the key members of an object using CDR serialization. More...
 
eProsima_user_DllExport String ()
 Default constructor. More...
 
eProsima_user_DllExport String (const String &x)
 Copy constructor. More...
 
eProsima_user_DllExport String (String &&x) noexcept
 Move constructor. More...
 
eProsima_user_DllExport ~String ()
 Default destructor. More...
 

Static Public Member Functions

static eProsima_user_DllExport size_t getCdrSerializedSize (const std_msgs::msg::String &data, size_t current_alignment=0)
 This function returns the serialized size of a data depending on the buffer alignment. More...
 
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize (size_t current_alignment=0)
 This function returns the maximum serialized size of the Key of an object depending on the buffer alignment. More...
 
static eProsima_user_DllExport size_t getMaxCdrSerializedSize (size_t current_alignment=0)
 This function returns the maximum serialized size of an object depending on the buffer alignment. More...
 
static eProsima_user_DllExport bool isKeyDefined ()
 This function tells you if the Key has been defined for this type. More...
 

Private Attributes

std::string m_data
 

Detailed Description

This class represents the structure String defined by the user in the IDL file.

Definition at line 70 of file ros2/types/String.h.

Constructor & Destructor Documentation

◆ String() [1/3]

std_msgs::msg::String::String ( )

Default constructor.

Definition at line 40 of file String.cpp.

◆ ~String()

std_msgs::msg::String::~String ( )

Default destructor.

Definition at line 46 of file String.cpp.

◆ String() [2/3]

std_msgs::msg::String::String ( const String x)

Copy constructor.

Parameters
xReference to the object std_msgs::msg::String that will be copied.

Definition at line 50 of file String.cpp.

References m_data.

◆ String() [3/3]

std_msgs::msg::String::String ( String &&  x)
noexcept

Move constructor.

Parameters
xReference to the object std_msgs::msg::String that will be copied.

Definition at line 56 of file String.cpp.

Member Function Documentation

◆ data() [1/4]

void std_msgs::msg::String::data ( const std::string &  _data)

This function copies the value in member data.

Parameters
_dataNew value to be copied in member data

Definition at line 123 of file String.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ data() [2/4]

void std_msgs::msg::String::data ( std::string &&  _data)

This function moves the value in member data.

Parameters
_dataNew value to be moved in member data

Definition at line 133 of file String.cpp.

◆ data() [3/4]

const std::string & std_msgs::msg::String::data ( ) const

This function returns a constant reference to member data.

Returns
Constant reference to member data

Definition at line 143 of file String.cpp.

◆ data() [4/4]

std::string & std_msgs::msg::String::data ( )

This function returns a reference to member data.

Returns
Reference to member data

Definition at line 152 of file String.cpp.

◆ deserialize()

void std_msgs::msg::String::deserialize ( eprosima::fastcdr::Cdr &  cdr)

This function deserializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 113 of file String.cpp.

Referenced by std_msgs::msg::StringPubSubType::deserialize().

+ Here is the caller graph for this function:

◆ getCdrSerializedSize()

size_t std_msgs::msg::String::getCdrSerializedSize ( const std_msgs::msg::String data,
size_t  current_alignment = 0 
)
static

This function returns the serialized size of a data depending on the buffer alignment.

Parameters
dataData which is calculated its serialized size.
current_alignmentBuffer alignment.
Returns
Serialized size.

Definition at line 97 of file String.cpp.

References data().

Referenced by std_msgs::msg::StringPubSubType::getSerializedSizeProvider().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKeyMaxCdrSerializedSize()

size_t std_msgs::msg::String::getKeyMaxCdrSerializedSize ( size_t  current_alignment = 0)
static

This function returns the maximum serialized size of the Key of an object depending on the buffer alignment.

Parameters
current_alignmentBuffer alignment.
Returns
Maximum serialized size.

Definition at line 157 of file String.cpp.

References std_msgs_msg_String_max_key_cdr_typesize.

Referenced by std_msgs::msg::StringPubSubType::getKey(), and std_msgs::msg::StringPubSubType::StringPubSubType().

+ Here is the caller graph for this function:

◆ getMaxCdrSerializedSize()

size_t std_msgs::msg::String::getMaxCdrSerializedSize ( size_t  current_alignment = 0)
static

This function returns the maximum serialized size of an object depending on the buffer alignment.

Parameters
current_alignmentBuffer alignment.
Returns
Maximum serialized size.

Definition at line 90 of file String.cpp.

References std_msgs_msg_String_max_cdr_typesize.

Referenced by std_msgs::msg::StringPubSubType::StringPubSubType().

+ Here is the caller graph for this function:

◆ isKeyDefined()

bool std_msgs::msg::String::isKeyDefined ( )
static

This function tells you if the Key has been defined for this type.

Definition at line 164 of file String.cpp.

Referenced by std_msgs::msg::StringPubSubType::StringPubSubType().

+ Here is the caller graph for this function:

◆ operator!=()

bool std_msgs::msg::String::operator!= ( const String x) const

Comparison operator.

Parameters
xstd_msgs::msg::String object to compare.

Definition at line 84 of file String.cpp.

◆ operator=() [1/2]

std_msgs::msg::String & std_msgs::msg::String::operator= ( const String x)

Copy assignment.

Parameters
xReference to the object std_msgs::msg::String that will be copied.

Definition at line 62 of file String.cpp.

References m_data.

◆ operator=() [2/2]

std_msgs::msg::String & std_msgs::msg::String::operator= ( String &&  x)
noexcept

Move assignment.

Parameters
xReference to the object std_msgs::msg::String that will be copied.

Definition at line 70 of file String.cpp.

◆ operator==()

bool std_msgs::msg::String::operator== ( const String x) const

Comparison operator.

Parameters
xstd_msgs::msg::String object to compare.

Definition at line 78 of file String.cpp.

References m_data.

◆ serialize()

void std_msgs::msg::String::serialize ( eprosima::fastcdr::Cdr &  cdr) const

This function serializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 107 of file String.cpp.

Referenced by std_msgs::msg::StringPubSubType::serialize().

+ Here is the caller graph for this function:

◆ serializeKey()

void std_msgs::msg::String::serializeKey ( eprosima::fastcdr::Cdr &  cdr) const

This function serializes the key members of an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 169 of file String.cpp.

Referenced by std_msgs::msg::StringPubSubType::getKey().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_data

std::string std_msgs::msg::String::m_data
private

Definition at line 207 of file ros2/types/String.h.

Referenced by operator=(), operator==(), and String().


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