![]() |
IOLink 1.16.1
|
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. | |
| PrettyPrintOptions & | operator= (const PrettyPrintOptions &other) |
| PrettyPrintOptions (PrettyPrintOptions &&other) noexcept | |
| PrettyPrintOptions & | operator= (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. | |
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.
| bool iolink::PrettyPrintOptions::displayType | ( | ) | const |
Indicates whether the type of each node's value should be displayed.
The default value is false.
| bool iolink::PrettyPrintOptions::displayValues | ( | ) | const |
Indicates whether node values should be displayed.
The default value is true.
| const std::string & iolink::PrettyPrintOptions::floatFormat | ( | ) | const |
Returns the format string used for displaying floating-point values.
The default value is ".6g".
| 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.
| int32_t iolink::PrettyPrintOptions::maxChildCount | ( | ) | const |
Returns the maximum number of child nodes to display for a node.
The default value is -1.
| uint32_t iolink::PrettyPrintOptions::maxDepth | ( | ) | const |
Returns the maximum depth of the metadata tree to display.
The default value is 3.
| int32_t iolink::PrettyPrintOptions::maxStringLength | ( | ) | const |
Returns the maximum length of string values to display.
The default value is 50.
| int32_t iolink::PrettyPrintOptions::maxValueCount | ( | ) | const |
Returns the maximum number of values to display for a node.
The default value is 5.
| void iolink::PrettyPrintOptions::setDisplayType | ( | bool | displayType | ) |
Enables or disables the display of the type of each node's value.
| displayType | True to display types, false to hide them. |
| void iolink::PrettyPrintOptions::setDisplayValues | ( | bool | displayValues | ) |
Enables or disables the display of node values.
| displayValues | True to display values, false to hide them. |
| void iolink::PrettyPrintOptions::setFloatFormat | ( | const std::string & | floatFormat | ) |
Sets the format string used for displaying floating-point values.
| floatFormat | The format string (e.g., ".6g"). |
| void iolink::PrettyPrintOptions::setIndentSize | ( | int32_t | indentSize | ) |
Sets the size of the indentation (in spaces) for each level of the tree.
| indentSize | The number of spaces used for indentation. |
| void iolink::PrettyPrintOptions::setMaxChildCount | ( | int32_t | maxChildCount | ) |
Sets the maximum number of child nodes to display for a node.
| maxChildCount | The limit on the number of child nodes. Negative values mean no limit. |
| void iolink::PrettyPrintOptions::setMaxDepth | ( | uint32_t | maxDepth | ) |
Sets the maximum depth of the metadata tree to display.
| maxDepth | The maximum number of sub-levels to display. |
| void iolink::PrettyPrintOptions::setMaxStringLength | ( | int32_t | maxStringLength | ) |
Sets the maximum length of string values to display.
| maxStringLength | The maximum string length. Negative values mean no limit. |
| void iolink::PrettyPrintOptions::setMaxValueCount | ( | int32_t | maxValueCount | ) |
Sets the maximum number of values to display for a node.
| maxValueCount | The limit on the number of displayed values. |