Struct INodeCollectionInsert#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct INodeCollectionInsert#

Extend the collection node with values, arrays and tables.

Subclassed by toml_parser::CNodeCollection

Public Types

enum class EInsertResult : uint32_t#

The result of the TOML string to insert.

Values:

enumerator insert_fail#

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_partly_success#

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_success#

All nodes could be inserted or the TOML didn’t contain any nodes.

enumerator insert_fail

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_fail

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_fail

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_partly_success

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_partly_success

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_partly_success

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_success

All nodes could be inserted or the TOML didn’t contain any nodes.

enumerator insert_success

All nodes could be inserted or the TOML didn’t contain any nodes.

enumerator insert_success

All nodes could be inserted or the TOML didn’t contain any nodes.

enum EInsertResult

The result of the TOML string to insert.

Values:

enumerator insert_fail

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_partly_success

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_success

All nodes could be inserted or the TOML didn’t contain any nodes.

enumerator insert_fail

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_fail

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_fail

The TOML string was invalid or didn’t fit the collection node it was to be inserted.

enumerator insert_partly_success

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_partly_success

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_partly_success

Part, but not all nodes could be inserted (duplicate nodes are not inserted).

enumerator insert_success

All nodes could be inserted or the TOML didn’t contain any nodes.

enumerator insert_success

All nodes could be inserted or the TOML didn’t contain any nodes.

enumerator insert_success

All nodes could be inserted or the TOML didn’t contain any nodes.

Public Functions

virtual IInterfaceAccess *InsertValue(const sdv::u8string &ssInsertBefore, const sdv::u8string &ssName, sdv::any_t anyValue) = 0#

Insert a value into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Since values are presented as inline node, they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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.

  • anyValue[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:

On success the interface to the newly inserted node is returned or NULL otherwise.

virtual IInterfaceAccess *InsertArray(const sdv::u8string &ssInsertBefore, const sdv::u8string &ssName) = 0#

Insert an array into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Since arrays are presented as inline node, they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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:

On success the interface to the newly inserted node is returned or NULL otherwise.

virtual IInterfaceAccess *InsertTable(const sdv::u8string &ssInsertBefore, const sdv::u8string &ssName, EInsertPreference ePreference) = 0#

Insert a table into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Tables can be inserted as inline node, in which case they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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.

  • ePreference[in] The preferred form of the node to be inserted.

Returns:

On success the interface to the newly inserted node is returned or NULL otherwise.

virtual IInterfaceAccess *InsertTableArray(const sdv::u8string &ssInsertBefore, const sdv::u8string &ssName, EInsertPreference ePreference) = 0#

Insert a table array into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Table arrays can be inserted as inline node, in which case they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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.

  • ePreference[in] The preferred form of the node to be inserted.

Returns:

On success the interface to the newly inserted node is returned or NULL otherwise.

virtual EInsertResult InsertTOML(const sdv::u8string &ssInsertBefore, const sdv::u8string &ssTOML, bool bRollbackOnFailure) = 0#

Insert a TOML string as a child of the current collection node. If the collection is a table, the TOML string should contain values and inline/external/array-table nodes with names. If the collection is an array, the TOML string should contain and inline table nodes without names.

Remark

In TOML, inline nodes are located before standard nodes. Dependable on the nodes defined in the TOML they might be transferred to inline or they might be inserted at a different location.

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssTOML[in] The TOML string to insert. This string can hold one or more nodes that should be inserted.

  • bRollbackOnFailure[in] If only part of the nodes could be inserted, no node will be inserted.

Returns:

The result of the insertion.

IInterfaceAccess InsertValue (in u8string ssInsertBefore, in u8string ssName, in any anyValue)

Insert a value into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Since values are presented as inline node, they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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.

  • anyValue[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:

On success the interface to the newly inserted node is returned or NULL otherwise.

IInterfaceAccess InsertArray (in u8string ssInsertBefore, in u8string ssName)

Insert an array into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Since arrays are presented as inline node, they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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:

On success the interface to the newly inserted node is returned or NULL otherwise.

IInterfaceAccess InsertTable (in u8string ssInsertBefore, in u8string ssName, in EInsertPreference ePreference)

Insert a table into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Tables can be inserted as inline node, in which case they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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.

  • ePreference[in] The preferred form of the node to be inserted.

Returns:

On success the interface to the newly inserted node is returned or NULL otherwise.

IInterfaceAccess InsertTableArray (in u8string ssInsertBefore, in u8string ssName, in EInsertPreference ePreference)

Insert a table array into the collection at the location before the supplied index.

Remark

In TOML, inline nodes are located before standard nodes. Table arrays can be inserted as inline node, in which case they will be inserted before any standard node (table or table array if defined as standard node).

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssName[in] Name of the node to insert. This name can contain parent nodes, which are automatically created if not existing. With arrays, since the value in TOML doesn’t have a name, the name of the value must be an empty string and any names provided are considered parent nodes. 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.

  • ePreference[in] The preferred form of the node to be inserted.

Returns:

On success the interface to the newly inserted node is returned or NULL otherwise.

EInsertResult InsertTOML (in u8string ssInsertBefore, in u8string ssTOML, in boolean bRollbackOnFailure)

Insert a TOML string as a child of the current collection node. If the collection is a table, the TOML string should contain values and inline/external/array-table nodes with names. If the collection is an array, the TOML string should contain and inline table nodes without names.

Remark

In TOML, inline nodes are located before standard nodes. Dependable on the nodes defined in the TOML they might be transferred to inline or they might be inserted at a different location.

Parameters:
  • ssInsertBefore[in] Name of the node to insert the value before. In case of an array, can be an index between square brackets. Can be empty, causing the node to be inserted at the end.

  • ssTOML[in] The TOML string to insert. This string can hold one or more nodes that should be inserted.

  • bRollbackOnFailure[in] If only part of the nodes could be inserted, no node will be inserted.

Returns:

The result of the insertion.

Public Static Attributes

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

Interface ID.