RTI Connext Modern C++ API  Version 6.1.2
Topic traits and data-type support

Traits and operations associated to topic-types. More...

Modules

 Topic-type serialization and deserialization
 Provides functions to serialize and deserialize user data types to and from CDR format.
 

Classes

struct  dds::topic::is_topic_type< T >
 Trait that indicates if a type is suitable to be the type of a dds::topic::Topic. More...
 
struct  dds::topic::topic_type_support< T >
 Provides convenience operations for a topic-type. More...
 
struct  dds::topic::topic_type_name< T >
 Provides the name of a topic-type. More...
 
struct  rti::topic::PrintFormatKind_def
 The definition of the dds::core::safe_enum PrintFormatKind. More...
 
class  rti::topic::PrintFormatProperty
 <<extension>> <<value-type>> A collection of attributes used to configure how data samples will be formatted when converted to a string. More...
 
struct  rti::topic::extensibility< TopicType >
 <<extension>> Indicates the extensibility kind of a topic-type More...
 
struct  rti::topic::topic_type_disabled_copy< TopicType >
 <<extension>> Indicates whether a TopicType is uncopyable More...
 
struct  rti::topic::topic_type_has_external_members< TopicType >
 <<extension>> Indicates if a topic type contains directly or indirectly IDL external members. More...
 
struct  rti::topic::dynamic_type< TopicType >
 Provides a DynamicType that represents an IDL-generated type. More...
 

Typedefs

typedef dds::core::safe_enum< PrintFormatKind_defrti::topic::PrintFormatKind
 Safe Enumeration of PrintFormatKind_def Format kinds available when converting data samples to string representations. More...
 

Functions

template<typename TopicType >
std::ostream & rti::topic::to_string (std::ostream &out, const TopicType &sample, const PrintFormatProperty &print_format=PrintFormatProperty::Default())
 Prints a data sample to an output stream. More...
 
template<typename TopicType >
std::string rti::topic::to_string (const TopicType &sample, const PrintFormatProperty &print_format=PrintFormatProperty::Default())
 Tranforms a data sample into a human-readable string format. More...
 

Detailed Description

Traits and operations associated to topic-types.

Typedef Documentation

◆ PrintFormatKind

Safe Enumeration of PrintFormatKind_def Format kinds available when converting data samples to string representations.

See also
PrintFormatKind_def

Function Documentation

◆ to_string() [1/2]

template<typename TopicType >
std::ostream& rti::topic::to_string ( std::ostream &  out,
const TopicType &  sample,
const PrintFormatProperty print_format = PrintFormatProperty::Default() 
)

Prints a data sample to an output stream.

#include <rti/topic/to_string.hpp>
Template Parameters
TopicTypeA valid topic-type. Valid types are IDL-generated types that were generated with typecodes enabled, the built-in types and dds::core::xtypes::DynamicData.
Parameters
outThe output stream to print to
sampleThe sample to print to the output stream
print_formatProperties describing the format with which to print the sample. For example, a sample may be printed in a default format, JSON format or XML format.

Referenced by dds::pub::qos::PublisherQos::operator>>(), and rti::topic::to_string().

◆ to_string() [2/2]

template<typename TopicType >
std::string rti::topic::to_string ( const TopicType &  sample,
const PrintFormatProperty print_format = PrintFormatProperty::Default() 
)

Tranforms a data sample into a human-readable string format.

#include <rti/topic/to_string.hpp>
Template Parameters
TopicTypeA valid topic-type. Valid types are IDL-generated types that were generated with typecodes enabled, the built-in types and dds::core::xtypes::DynamicData.
Parameters
sampleThe sample to get the string representation of
print_formatProperties describing the format with which to print the sample. For example, a sample may be printed in a default format, JSON format or XML format.

References rti::topic::PrintFormatProperty::Default(), and rti::topic::to_string().