Class CNode#

Inheritance Relationships#

Derived Type#

Class Documentation#

class CNode#

Node class allowing access to the type and value.

Subclassed by sdv::toml::CNodeCollection

Public Functions

CNode() = default#

Default constructor.

inline CNode(const TInterfaceAccessPtr &rptrNode)#

Node assignment constructor.

Parameters:

rptrNode[in] Reference to the node interface.

inline CNode &operator=(const TInterfaceAccessPtr &rptrNode)#

Node assignment operator.

Parameters:

rptrNode[in] Reference to the node interface.

Returns:

Reference to this class.

inline virtual bool IsValid() const#

Does the class contain a valid node?

Returns:

Returns ‘true’ if the class contains a valid node; ‘false’ otherwise.

inline virtual operator bool() const#

Does the class contain a valid node?

Returns:

Returns ‘true’ if the class contains a valid node; ‘false’ otherwise.

inline sdv::u8string GetName()#

Return the node name.

Returns:

String containing the node name.

inline ENodeType GetType()#

Get the node type.

Returns:

The node type.

inline sdv::any_t GetValue()#

Get the node value if the node contains a value.

Returns:

The node value.

inline virtual void Clear()#

Clear the node class.

inline sdv::u8string GetTOML() const#

Get the TOML string from this node including all children.

Returns:

The TOMl string.

Protected Attributes

TInterfaceAccessPtr m_ptrNode#

Pointer to the node interface.

INodeInfo *m_pNodeInfo = nullptr#

Node information interface.