Class CNodeCollection#
Defined in File toml.h
Inheritance Relationships#
Base Type#
public sdv::toml::CNode
(Class CNode)
Derived Type#
public sdv::toml::CTOMLParser
(Class CTOMLParser)
Class Documentation#
-
class CNodeCollection : public sdv::toml::CNode#
Node collection class representing a table or array node.
Subclassed by sdv::toml::CTOMLParser
Public Functions
-
CNodeCollection() = default#
Default constructor.
-
inline CNodeCollection(const TInterfaceAccessPtr &rptrNode)#
Node assignment constructor.
- Parameters:
rptrNode – [in] Reference to the node interface.
-
inline CNodeCollection(const CNode &rNode)#
Node assignment constructor.
- Parameters:
rNode – [in] Reference to the node class.
-
inline CNodeCollection &operator=(const TInterfaceAccessPtr &rptrNode)#
Node assignment operator.
- Parameters:
rptrNode – [in] Reference to the node interface.
- Returns:
Reference to this class.
-
inline CNodeCollection &operator=(const CNode &rNode)#
Node assignment operator.
- Parameters:
rNode – [in] Reference to the node class.
- Returns:
Reference to this class.
-
inline virtual bool IsValid() const override#
Does the class contain a valid node?
- Returns:
Returns ‘true’ if the class contains a valid node; ‘false’ otherwise.
-
inline virtual operator bool() const override#
Does the class contain a valid node?
- Returns:
Returns ‘true’ if the class contains a valid node; ‘false’ otherwise.
-
inline size_t GetCount() const#
Return the amount of nodes in this collection.
- Returns:
The amount of nodes.
-
inline CNode Get(size_t nIndex) const#
Get the node at the provided index.
- Parameters:
nIndex – [in] The index number.
- Returns:
Returns the node if available or an empty node when not.
-
inline CNode operator[](size_t nIndex) const#
Get the node at the provided index.
- Parameters:
nIndex – [in] The index number.
- Returns:
Returns the node if available or an empty node when not.
-
inline virtual void Clear() override#
Clear the node class.
-
inline CNode GetDirect(const sdv::u8string &rssNode) const#
Get direct access to a node.
Elements of tables can be accessed and traversed by using ‘.’ to separated the parent name from child name. E.g. ‘parent.child’ would access the ‘child’ element of the ‘parent’ table. Elements of arrays can be accessed and traversed by using the index number in brackets. E.g. ‘array[3]’ would access the fourth element of the array ‘array’. These access conventions can also be chained like ‘table.array[2][1].subtable.integerElement’.
- Parameters:
rssNode – [in] Reference to the node string.
- Returns:
Returns the node when available or an empty node when not.
-
CNodeCollection() = default#