RTI Connext .Net APIs  Version 6.0.1
DDS::TypeCodePrintFormatProperty Class Reference

A collection of attributes used to configure how a TypeCode appears when converted to a string. More...

#include <managed_typecode.h>

Properties

System::UInt32 indent [get, set]
 Configures how much indent should be added to the string representation of a DDS::TypeCode. More...
 
System::Boolean print_ordinals [get, set]
 Configures whether or not to print the ordinal value of each enumerator within a DDS::TypeCode. More...
 

Detailed Description

A collection of attributes used to configure how a TypeCode appears when converted to a string.

Property Documentation

◆ indent

System:: UInt32 DDS::TypeCodePrintFormatProperty::indent
getset

Configures how much indent should be added to the string representation of a DDS::TypeCode.

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.

◆ print_ordinals

System:: Boolean DDS::TypeCodePrintFormatProperty::print_ordinals
getset

Configures whether or not to print the ordinal value of each enumerator within a DDS::TypeCode.

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,
  };

RTI Connext .Net APIs Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc