Class CStringNode#

Inheritance Relationships#

Base Type#

Class Documentation#

class CStringNode : public CNode#

String value node.

Public Functions

CStringNode(const std::string &rssName, const std::string &rssVal)#

Constructor.

Parameters:
  • rssName[in] Reference to the string containing the name of the node.

  • rssVal[in] The value to assign.

virtual sdv::toml::ENodeType GetType() const override#

Get the node type. Overload of sdv::toml::INodeInfo::GetType.

Returns:

Type of the node.

virtual sdv::any_t GetValue() const override#

The node value. Overload of sdv::toml::INodeInfo::GetValue.

Returns:

For boolean, integer, floating point and strings, the function returns a value. Otherwise the function returns empty.

virtual std::string CreateTOMLText(const std::string &rssParent, std::string &rssLastPrintedTable, bool bFirst, bool bEmbedded, bool bAssignment, bool bRoot) const override#

Get the TOML text based on the content. Overload of CNode::CreateTOMLText.

Parameters:
  • rssParent[in] When present, uses the parent node into the TOML text generation.

  • rssLastPrintedTable[in] Reference to the string containing the last printed table. This might be necessary in case a different table was printed in between.

  • bFirst[in] When set, this is the first entry in an array or table.

  • bEmbedded[in] When set, this is an embedded definition in an array or table.

  • bAssignment[in] When set, this is a table assignment.

  • bRoot[in] Only for table entries, when set this is the root entry (suppress the table name).

Returns:

The string containing the TOML text.