Struct INodeUpdate#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct INodeUpdate#

Update the current node.

Remark

The root node cannot be updated.

Subclassed by toml_parser::CNode

Public Functions

virtual bool ChangeName(const sdv::u8string &ssNewName) = 0#

Change the key name of the node (if the node is not a value node of an array).

Parameters:

ssNewName[in] The name to assign to the node. The name must adhere to the key names defined by the TOML specification. Defining the key multiple times is not allowed. Quotation of key names is done automatically; the parser decides itself whether the key is bare-key, a literal key or a quoted key.

Returns:

Returns whether the name change was successful.

virtual bool ChangeValue(sdv::any_t anyNewValue) = 0#

Change the value of the node.

Remark

Only valid for value nodes. Changing the value type is not supported.

Parameters:

anyNewValue[in] The value of the node, being either an integer, floating point number, boolean value or a string. Conversion is automatically done to int64, double float, bool or u8string.

Returns:

Returns whether the value change was successful.

virtual bool MoveUp() = 0#

Move up the node in the collection.

Remark

External tables or table arrays cannot be moved before value nodes.

Remark

Moving if the node is the first node is not possible.

Returns:

Returns whether the move was successful.

virtual bool MoveDown() = 0#

Move down the node in the collection.

Remark

Value nodes cannot be moved behind external tables or table arrays.

Remark

Moving if the node is the last node is not possible.

Returns:

Returns whether the move was successful.

boolean ChangeName (in u8string ssNewName)

Change the key name of the node (if the node is not a value node of an array).

Parameters:

ssNewName[in] The name to assign to the node. The name must adhere to the key names defined by the TOML specification. Defining the key multiple times is not allowed. Quotation of key names is done automatically; the parser decides itself whether the key is bare-key, a literal key or a quoted key.

Returns:

Returns whether the name change was successful.

boolean ChangeValue (in any anyNewValue)

Change the value of the node.

Remark

Only valid for value nodes. Changing the value type is not supported.

Parameters:

anyNewValue[in] The value of the node, being either an integer, floating point number, boolean value or a string. Conversion is automatically done to int64, double float, bool or u8string.

Returns:

Returns whether the value change was successful.

boolean MoveUp()

Move up the node in the collection.

Remark

External tables or table arrays cannot be moved before value nodes.

Remark

Moving if the node is the first node is not possible.

Returns:

Returns whether the move was successful.

boolean MoveDown()

Move down the node in the collection.

Remark

Value nodes cannot be moved behind external tables or table arrays.

Remark

Moving if the node is the last node is not possible.

Returns:

Returns whether the move was successful.

Public Static Attributes

static constexpr ::sdv::interface_id _id = 0x7BCFDBEAC34E2A6D#

Interface ID.