RTI Connext Modern C++ API
Version 6.0.1
|
<<extension>> <<value-type>> A collection of attributes used to configure how DynamicTypes will be formatted when converted to strings. More...
#include <rti/core/xtypes/DynamicTypePrintFormat.hpp>
Public Member Functions | |
DynamicTypePrintFormatProperty (unsigned int indent_in=0, bool print_ordinals_in=false) | |
Initializes the properties. | |
unsigned int | indent () const |
Get the value of indent. | |
DynamicTypePrintFormatProperty & | indent (unsigned int value) |
Set the amount of additional indent to be included when converting a DynamicType to a string. | |
bool | print_ordinals () const |
Get the value of print_ordinals. | |
DynamicTypePrintFormatProperty & | print_ordinals (bool value) |
Set whether or not to print ordinal values when printing EnumTypes. | |
<<extension>> <<value-type>> A collection of attributes used to configure how DynamicTypes will be formatted when converted to strings.
|
inlineexplicit |
Initializes the properties.
|
inline |
Get the value of indent.
|
inline |
Set the amount of additional indent to be included when converting a DynamicType to a string.
Configures how much additional indent is applied when converting a TypeCode to a string. This value acts as a total offset on the string, increasing the indent applied to all elements by the same amount. With an indent of 0, a string representation of a TypeCode may appear as:
struct myType { long x; };
Using an indent of 1, the same TypeCode would be printed as:
struct myType { long x; };
I.e., the entire structure is indented.
value | The value to set for indent |
|
inline |
Get the value of print_ordinals.
|
inline |
Set whether or not to print ordinal values when printing EnumTypes.
When set to true, the ordinal value of each enumerator within an enum will be printed, otherwise only non-default ordinals are printed. Take for example the following enum:
enum myEnum { RED, GREEN = 3, BLUE, };
When print_ordinals is set to false it would be printed as:
enum myEnum { RED, GREEN = 3, BLUE, };
But with print_ordinals set to true it would be printed as:
enum myEnum { RED = 0, GREEN = 3, BLUE = 4, };
value | The value to set for print_ordinals |