This class represents the structure String defined by the user in the IDL file. More...
#include <String.h>
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 String & | operator= (const String &x) |
Copy assignment. More... | |
eProsima_user_DllExport String & | operator= (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 |
This class represents the structure String defined by the user in the IDL file.
Definition at line 70 of file ros2/types/String.h.
std_msgs::msg::String::String | ( | ) |
Default constructor.
Definition at line 40 of file String.cpp.
std_msgs::msg::String::~String | ( | ) |
Default destructor.
Definition at line 46 of file String.cpp.
std_msgs::msg::String::String | ( | const String & | x | ) |
Copy constructor.
x | Reference to the object std_msgs::msg::String that will be copied. |
Definition at line 50 of file String.cpp.
References m_data.
|
noexcept |
Move constructor.
x | Reference to the object std_msgs::msg::String that will be copied. |
Definition at line 56 of file String.cpp.
void std_msgs::msg::String::data | ( | const std::string & | _data | ) |
This function copies the value in member data.
_data | New value to be copied in member data |
Definition at line 123 of file String.cpp.
Referenced by getCdrSerializedSize().
void std_msgs::msg::String::data | ( | std::string && | _data | ) |
This function moves the value in member data.
_data | New value to be moved in member data |
Definition at line 133 of file String.cpp.
const std::string & std_msgs::msg::String::data | ( | ) | const |
This function returns a constant reference to member data.
Definition at line 143 of file String.cpp.
std::string & std_msgs::msg::String::data | ( | ) |
This function returns a reference to member data.
Definition at line 152 of file String.cpp.
void std_msgs::msg::String::deserialize | ( | eprosima::fastcdr::Cdr & | cdr | ) |
This function deserializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 113 of file String.cpp.
Referenced by std_msgs::msg::StringPubSubType::deserialize().
|
static |
This function returns the serialized size of a data depending on the buffer alignment.
data | Data which is calculated its serialized size. |
current_alignment | Buffer alignment. |
Definition at line 97 of file String.cpp.
References data().
Referenced by std_msgs::msg::StringPubSubType::getSerializedSizeProvider().
|
static |
This function returns the maximum serialized size of the Key of an object depending on the buffer alignment.
current_alignment | Buffer alignment. |
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().
|
static |
This function returns the maximum serialized size of an object depending on the buffer alignment.
current_alignment | Buffer alignment. |
Definition at line 90 of file String.cpp.
References std_msgs_msg_String_max_cdr_typesize.
Referenced by std_msgs::msg::StringPubSubType::StringPubSubType().
|
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().
bool std_msgs::msg::String::operator!= | ( | const String & | x | ) | const |
Comparison operator.
x | std_msgs::msg::String object to compare. |
Definition at line 84 of file String.cpp.
std_msgs::msg::String & std_msgs::msg::String::operator= | ( | const String & | x | ) |
Copy assignment.
x | Reference to the object std_msgs::msg::String that will be copied. |
Definition at line 62 of file String.cpp.
References m_data.
|
noexcept |
Move assignment.
x | Reference to the object std_msgs::msg::String that will be copied. |
Definition at line 70 of file String.cpp.
bool std_msgs::msg::String::operator== | ( | const String & | x | ) | const |
Comparison operator.
x | std_msgs::msg::String object to compare. |
Definition at line 78 of file String.cpp.
References m_data.
void std_msgs::msg::String::serialize | ( | eprosima::fastcdr::Cdr & | cdr | ) | const |
This function serializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 107 of file String.cpp.
Referenced by std_msgs::msg::StringPubSubType::serialize().
void std_msgs::msg::String::serializeKey | ( | eprosima::fastcdr::Cdr & | cdr | ) | const |
This function serializes the key members of an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 169 of file String.cpp.
Referenced by std_msgs::msg::StringPubSubType::getKey().
|
private |
Definition at line 207 of file ros2/types/String.h.
Referenced by operator=(), operator==(), and String().