IOLink 1.16.1
Loading...
Searching...
No Matches
iolink::PrettyPrintOptions Class Referencefinal

Class to store the options to configure the display of the metadata tree. More...

#include <iolink/metadata/PrettyPrintOptions.h>

Public Member Functions

 PrettyPrintOptions ()
 Default constructor Initializes the options with default values.
 
 PrettyPrintOptions (const PrettyPrintOptions &other)
 Copy constructor.
 
PrettyPrintOptionsoperator= (const PrettyPrintOptions &other)
 
 PrettyPrintOptions (PrettyPrintOptions &&other) noexcept
 
PrettyPrintOptionsoperator= (PrettyPrintOptions &&other) noexcept
 
uint32_t maxDepth () const
 Returns the maximum depth of the metadata tree to display.
 
bool displayValues () const
 Indicates whether node values should be displayed.
 
int32_t maxValueCount () const
 Returns the maximum number of values to display for a node.
 
int32_t maxStringLength () const
 Returns the maximum length of string values to display.
 
int32_t maxChildCount () const
 Returns the maximum number of child nodes to display for a node.
 
int32_t indentSize () const
 Returns the size of the indentation (in spaces) for each level of the tree.
 
bool displayType () const
 Indicates whether the type of each node's value should be displayed.
 
const std::string & floatFormat () const
 Returns the format string used for displaying floating-point values.
 
void setMaxDepth (uint32_t maxDepth)
 Sets the maximum depth of the metadata tree to display.
 
void setDisplayValues (bool displayValues)
 Enables or disables the display of node values.
 
void setMaxValueCount (int32_t maxValueCount)
 Sets the maximum number of values to display for a node.
 
void setMaxStringLength (int32_t maxStringLength)
 Sets the maximum length of string values to display.
 
void setMaxChildCount (int32_t maxChildCount)
 Sets the maximum number of child nodes to display for a node.
 
void setIndentSize (int32_t indentSize)
 Sets the size of the indentation (in spaces) for each level of the tree.
 
void setDisplayType (bool displayType)
 Enables or disables the display of the type of each node's value.
 
void setFloatFormat (const std::string &floatFormat)
 Sets the format string used for displaying floating-point values.
 

Detailed Description

Class to store the options to configure the display of the metadata tree.

This class provides configuration options for controlling how metadata trees are displayed, including depth, formatting, and value display preferences.

Member Function Documentation

◆ displayType()

bool iolink::PrettyPrintOptions::displayType ( ) const

Indicates whether the type of each node's value should be displayed.

The default value is false.

Returns
True if types are displayed, false otherwise.

◆ displayValues()

bool iolink::PrettyPrintOptions::displayValues ( ) const

Indicates whether node values should be displayed.

The default value is true.

Returns
True if values are displayed, false otherwise.

◆ floatFormat()

const std::string & iolink::PrettyPrintOptions::floatFormat ( ) const

Returns the format string used for displaying floating-point values.

The default value is ".6g".

Returns
The format string (e.g., ".6g").

◆ indentSize()

int32_t iolink::PrettyPrintOptions::indentSize ( ) const

Returns the size of the indentation (in spaces) for each level of the tree.

The default value is 2.

Returns
The number of spaces used for indentation.

◆ maxChildCount()

int32_t iolink::PrettyPrintOptions::maxChildCount ( ) const

Returns the maximum number of child nodes to display for a node.

The default value is -1.

Returns
The limit on the number of child nodes. Negative values mean no limit.

◆ maxDepth()

uint32_t iolink::PrettyPrintOptions::maxDepth ( ) const

Returns the maximum depth of the metadata tree to display.

The default value is 3.

Returns
The maximum number of sub-levels to display.

◆ maxStringLength()

int32_t iolink::PrettyPrintOptions::maxStringLength ( ) const

Returns the maximum length of string values to display.

The default value is 50.

Returns
The maximum string length. Negative values mean no limit.

◆ maxValueCount()

int32_t iolink::PrettyPrintOptions::maxValueCount ( ) const

Returns the maximum number of values to display for a node.

The default value is 5.

Returns
The limit on the number of displayed values.

◆ setDisplayType()

void iolink::PrettyPrintOptions::setDisplayType ( bool  displayType)

Enables or disables the display of the type of each node's value.

Parameters
displayTypeTrue to display types, false to hide them.

◆ setDisplayValues()

void iolink::PrettyPrintOptions::setDisplayValues ( bool  displayValues)

Enables or disables the display of node values.

Parameters
displayValuesTrue to display values, false to hide them.

◆ setFloatFormat()

void iolink::PrettyPrintOptions::setFloatFormat ( const std::string &  floatFormat)

Sets the format string used for displaying floating-point values.

Parameters
floatFormatThe format string (e.g., ".6g").

◆ setIndentSize()

void iolink::PrettyPrintOptions::setIndentSize ( int32_t  indentSize)

Sets the size of the indentation (in spaces) for each level of the tree.

Parameters
indentSizeThe number of spaces used for indentation.

◆ setMaxChildCount()

void iolink::PrettyPrintOptions::setMaxChildCount ( int32_t  maxChildCount)

Sets the maximum number of child nodes to display for a node.

Parameters
maxChildCountThe limit on the number of child nodes. Negative values mean no limit.

◆ setMaxDepth()

void iolink::PrettyPrintOptions::setMaxDepth ( uint32_t  maxDepth)

Sets the maximum depth of the metadata tree to display.

Parameters
maxDepthThe maximum number of sub-levels to display.

◆ setMaxStringLength()

void iolink::PrettyPrintOptions::setMaxStringLength ( int32_t  maxStringLength)

Sets the maximum length of string values to display.

Parameters
maxStringLengthThe maximum string length. Negative values mean no limit.

◆ setMaxValueCount()

void iolink::PrettyPrintOptions::setMaxValueCount ( int32_t  maxValueCount)

Sets the maximum number of values to display for a node.

Parameters
maxValueCountThe limit on the number of displayed values.

The documentation for this class was generated from the following file: