RTI Connext Modern C++ API
Version 5.3.1
|
<<extension>> Extensions to dds::core::xtypes More...
Classes | |
class | LoanedDynamicData |
<<move-only-type>> Gives temporary access to a member of another DynamicData object. More... | |
class | DynamicDataInfo |
Contains information about a DynamicData sample. More... | |
class | DynamicDataMemberInfo |
Contains information about a DynamicData member. More... | |
class | DynamicDataTypeSerializationProperty |
<<extension>> <<value-type>> Configures aspects of the memory management in the serialization of dds::core::xtypes::DynamicData samples. More... | |
Functions | |
template<typename TopicType > | |
DynamicDataImpl | convert (const TopicType &sample) |
<<extension>> Creates a DynamicData sample from a typed sample | |
const dds::core::xtypes::DynamicType & | resolve_alias (const dds::core::xtypes::DynamicType &type) |
<<extension>> If the type is an alias returns its related type recursively until it is not an alias. | |
std::vector< char > & | to_cdr_buffer (std::vector< char > &buffer, const DynamicData &sample) |
<<extension>> Serializes a DynamicData sample into CDR format | |
DynamicData & | from_cdr_buffer (DynamicData &sample, const std::vector< char > &buffer) |
<<extension>> Creates a DynamicData sample by deserializing a CDR buffer' | |
template<typename TopicType > | |
TopicType | convert (const DynamicData &sample) |
<<extension>> Creates a typed sample from a DynamicData sample. | |
template<typename TopicType > | |
bool | can_convert (const DynamicData &sample) |
<<extension>> Determines if the DynamicType of this sample is equal to the DynamicType of TopicType | |
template<typename... Types> | |
std::tuple< Types...> | get_tuple (const dds::core::xtypes::DynamicData &data) |
<<C++11>> <<experimental>> <<extension>> Retrieves all the values of a DynamicData object into an std::tuple at once | |
template<typename... Types> | |
void | set_tuple (dds::core::xtypes::DynamicData &data, const std::tuple< Types...> &value) |
<<C++11>> <<experimental>> <<extension>> Assigns the values of a std::tuple to a DynamicData object at once | |
template<typename... Types> | |
dds::core::xtypes::StructType | create_type_from_tuple (const std::string &name) |
<<C++11>> <<experimental>> <<extension>> Creates a StructType from a list of types or a std::tuple | |
void | print_idl (const DynamicType &type, unsigned int indent=0) |
<<extension>> Prints the IDL representation of this type to the standard output | |
<<extension>> Extensions to dds::core::xtypes
DynamicData rti::core::xtypes::convert | ( | const TopicType & | sample | ) |
<<extension>> Creates a DynamicData sample from a typed sample
TopicType | An IDL topic-type |
sample | The typed sample to convert to DynamicData |
sample
const dds::core::xtypes::DynamicType & rti::core::xtypes::resolve_alias | ( | const dds::core::xtypes::DynamicType & | type | ) |
<<extension>> If the type is an alias returns its related type recursively until it is not an alias.
std::vector< char > & rti::core::xtypes::to_cdr_buffer | ( | std::vector< char > & | buffer, |
const DynamicData & | sample | ||
) |
<<extension>> Serializes a DynamicData sample into CDR format
buffer | The output buffer, which will be resized to the correct size |
sample | The sample to serialize |
buffer
DynamicData & rti::core::xtypes::from_cdr_buffer | ( | DynamicData & | sample, |
const std::vector< char > & | buffer | ||
) |
<<extension>> Creates a DynamicData sample by deserializing a CDR buffer'
sample | The sample to deserialize. |
buffer | The buffer containing the CDR data |
sample
TopicType rti::core::xtypes::convert | ( | const DynamicData & | sample | ) |
<<extension>> Creates a typed sample from a DynamicData sample.
This function is useful when an application uses DynamicData and regular typed Topics at the same time.
For example, given this IDL type:
We can convert from Foo
and DynamicData:
TopicType | An IDL topic-type |
sample | The DynamicData sample to convert to type TopicType |
TopicType
containing the data in sample
. bool rti::core::xtypes::can_convert | ( | const DynamicData & | sample | ) |
<<extension>> Determines if the DynamicType of this sample is equal to the DynamicType of TopicType
TopicType | An IDL topic-type |
TopicType
from this DynamicData object.std::tuple< Types...> rti::core::xtypes::get_tuple | ( | const dds::core::xtypes::DynamicData & | data | ) |
<<C++11>> <<experimental>> <<extension>> Retrieves all the values of a DynamicData object into an std::tuple at once
void rti::core::xtypes::set_tuple | ( | dds::core::xtypes::DynamicData & | data, |
const std::tuple< Types...> & | value | ||
) |
<<C++11>> <<experimental>> <<extension>> Assigns the values of a std::tuple to a DynamicData object at once
dds::core::xtypes::StructType rti::core::xtypes::create_type_from_tuple | ( | const std::string & | name | ) |
<<C++11>> <<experimental>> <<extension>> Creates a StructType from a list of types or a std::tuple
Types | A list of types or a std::tuple. The types must be primitive (see dds::core::xtypes::PrimitiveType) or std::string . |
The StructType members are all default-created (i.e. non-key, non-optional, with default IDs...) and their names are m0, m1, m2, etc.
void rti::core::xtypes::print_idl | ( | const DynamicType & | type, |
unsigned int | indent = 0 |
||
) |
<<extension>> Prints the IDL representation of this type to the standard output