Class CTableArray#

Inheritance Relationships#

Base Type#

Class Documentation#

class CTableArray : public CArray#

Array of tables.

Public Functions

inline CTableArray(const std::string &rssName)#

Constructor.

Parameters:

rssName[in] Reference to the name of the node.

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.

virtual void Add(const std::string &rssPath, const std::shared_ptr<CNode> &rptrNode, bool bDefinedExplicitly) override#

Adds a given node to a given path in the tree. Overload of CNode::Add.

Parameters:
  • rssPath[in] Reference to the path in the tree where the new node is to be added.

  • rptrNode[in] Reference top the smart pointer holding the node.

  • bDefinedExplicitly[in] If a table that is created to create the path of the node to be added is defined explicitly

Throws:
  • XInvalidAccessException – Throws an XInvalidAccessException if a ancestor node is not open to add children

  • XDuplicateNameException – Throws a XDuplicateNameException if a node with the same path as the node to be added is already defined explicitly

virtual std::shared_ptr<CNode> Find(const std::string &rssPath) const override#

Searches the subtree of the node for a node at the given location using the provided path. Overload of CNode::Find.

Remark

The path elements of arrays and tables are separated by a dot.

Parameters:

rssPath[in] Reference to the string containing the path of the node to find.

Returns:

Returns a shared pointer to the wanted Node if it is found or an error-Node if it is not