Built-in type consisting of a single character string.
More...
#include <dds/core/BuiltinTopicTypes.hpp>
Detailed Description
Built-in type consisting of a single character string.
- See Also
- Built-in Types
Constructor & Destructor Documentation
dds::core::StringTopicType::StringTopicType |
( |
| ) |
|
|
inline |
Creates a sample containing an empty string.
dds::core::StringTopicType::StringTopicType |
( |
const std::string & |
the_data | ) |
|
|
inline |
Creates a sample from a std::string.
Note that this constructor is implicit so you can use an std::string wherever a StringTopicType instance is expected, for example:
- Parameters
-
the_data | The string to be copied to create this instance |
dds::core::StringTopicType::StringTopicType |
( |
const char * |
the_data | ) |
|
|
inline |
Creates an instance from a char*.
Note that this constructor is implicit so you can use an char* wherever a StringTopicType instance is expected, for example:
writer.write("Hello, World!");
- Parameters
-
the_data | The string to be copied to create this instance |
Member Function Documentation
dds::core::StringTopicType::operator std::string |
( |
| ) |
const |
|
inline |
Automatic conversion to std::string.
- Returns
- A copy of the string
Gets the string.
- Returns
- A const-reference to the string
Gets the string.
- Returns
- A reference to the string