RTI Connext Modern C++ API Version 7.3.0
|
<<extension>> Extensions to dds::core::xtypes More...
Classes | |
class | DynamicDataInfo |
Contains information about a DynamicData sample. More... | |
class | DynamicDataMemberInfo |
Contains information about a DynamicData member. More... | |
class | DynamicDataProperty |
<<extension>> <<value-type>> Specifies the properties of a DynamicData object More... | |
class | DynamicDataTypeSerializationProperty |
<<extension>> <<value-type>> Configures aspects of the memory management in the serialization of dds::core::xtypes::DynamicData samples. More... | |
class | DynamicTypePrintFormatProperty |
<<extension>> <<value-type>> A collection of attributes used to configure how DynamicTypes will be formatted when converted to strings. More... | |
class | LoanedDynamicData |
<<move-only-type>> Gives temporary access to a member of another DynamicData object. More... | |
Enumerations | |
enum class | DynamicTypePrintKind { idl , xml } |
The different formats to print a dds::core::xtypes::DynamicType. More... | |
Functions | |
template<typename TopicType > | |
DynamicDataImpl | convert (const TopicType &sample) |
<<extension>> Creates a DynamicData sample from a typed sample More... | |
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. More... | |
std::vector< char > & | to_cdr_buffer (std::vector< char > &buffer, const DynamicData &sample, dds::core::policy::DataRepresentationId representation_id=dds::core::policy::DataRepresentation::auto_id()) |
<<extension>> Serializes a DynamicData sample into CDR format More... | |
DynamicData & | from_cdr_buffer (DynamicData &sample, const std::vector< char > &buffer) |
<<extension>> Creates a DynamicData sample by deserializing a CDR buffer' More... | |
template<typename TopicType > | |
TopicType | convert (const DynamicData &sample) |
<<extension>> Creates a typed sample from a DynamicData sample. More... | |
template<typename TopicType > | |
DynamicData | convert (const TopicType &sample) |
<<extension>> Creates a DynamicData sample from a typed sample More... | |
template<typename TopicType > | |
bool | can_convert (const DynamicData &sample) |
<<extension>> Determines if the DynamicType of this sample is equal to the DynamicType of TopicType More... | |
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 More... | |
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 More... | |
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 More... | |
void | print_idl (const DynamicType &type, unsigned int indent=0) |
<<extension>> Prints the IDL representation of this DynamicType to the standard output More... | |
std::ostream & | to_string (std::ostream &out, const DynamicType &type, const rti::core::xtypes::DynamicTypePrintFormatProperty &format=DynamicTypePrintFormatProperty()) |
<<extension>> Writes the string representation of this DynamicType to an output stream. More... | |
std::string | to_string (const DynamicType &type, const rti::core::xtypes::DynamicTypePrintFormatProperty &format=DynamicTypePrintFormatProperty()) |
<<extension>> Creates the string representation of this DynamicType to a string. More... | |
<<extension>> Extensions to dds::core::xtypes
|
strong |
The different formats to print a dds::core::xtypes::DynamicType.
Enumerator | |
---|---|
idl | Indicates that a dds::core::xtypes::DynamicType is to be printed in IDL format. |
xml | Indicates that a dds::core::xtypes::DynamicType is to be printed in XML format. |
DynamicDataImpl 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, | ||
dds::core::policy::DataRepresentationId | representation_id = dds::core::policy::DataRepresentation::auto_id() |
||
) |
<<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 |
representation_id | The data representation used to serialize the data |
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
. 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
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 DynamicType to the standard output
std::ostream & rti::core::xtypes::to_string | ( | std::ostream & | out, |
const DynamicType & | type, | ||
const rti::core::xtypes::DynamicTypePrintFormatProperty & | format = DynamicTypePrintFormatProperty() |
||
) |
<<extension>> Writes the string representation of this DynamicType to an output stream.
out | The output stream to which the string representation of the DynamicType should be printed. |
type | The DynamicType to be printed. |
format | The DynamicTypePrintFormatProperty used to define the format of the string. |
std::string rti::core::xtypes::to_string | ( | const DynamicType & | type, |
const rti::core::xtypes::DynamicTypePrintFormatProperty & | format = DynamicTypePrintFormatProperty() |
||
) |
<<extension>> Creates the string representation of this DynamicType to a string.
type | The DynamicType to be printed. |
format | The DynamicTypePrintFormatProperty used to define the format of the string. |