Struct INodeCollectionInsert#
Defined in File toml.h
Inheritance Relationships#
Derived Type#
public toml_parser::CNodeCollection(Class CNodeCollection)
Struct Documentation#
-
struct INodeCollectionInsert#
Extend the collection node with values, arrays and tables.
Subclassed by toml_parser::CNodeCollection
Public Types
-
enum class EInsertPreference : int32_t#
Insertion preference for tables and table arrays, being standard or inline.
Values:
-
enumerator prefer_standard#
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_inline#
The node will be inserted as inline node.
-
enumerator prefer_standard
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_standard
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_standard
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_inline
The node will be inserted as inline node.
-
enumerator prefer_inline
The node will be inserted as inline node.
-
enumerator prefer_inline
The node will be inserted as inline node.
-
enumerator prefer_standard#
-
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.
-
enumerator insert_fail#
-
enum EInsertPreference
Insertion preference for tables and table arrays, being standard or inline.
Values:
-
enumerator prefer_standard
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_inline
The node will be inserted as inline node.
-
enumerator prefer_standard
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_standard
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_standard
When the parent node is not inline, the node will be inserted as standard node.
-
enumerator prefer_inline
The node will be inserted as inline node.
-
enumerator prefer_inline
The node will be inserted as inline node.
-
enumerator prefer_inline
The node will be inserted as inline node.
-
enumerator prefer_standard
-
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.
-
enumerator insert_fail
Public Functions
-
virtual IInterfaceAccess *InsertValue(uint32_t uiIndex, const sdv::u8string &ssName, sdv::any_t anyValue) = 0#
Insert a value into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Value nodes cannot be inserted behind external tables and table arrays. If the index is referencing a position behind an external table or a table array, the index is automatically corrected.
ssName – [in] Name of the node to insert. Will be ignored for an array collection. 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(uint32_t uiIndex, const sdv::u8string &ssName) = 0#
Insert an array into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Array nodes cannot be inserted behind external tables and table arrays. If the index is referencing a position behind an external table or a table array, the index is automatically corrected.
ssName – [in] Name of the array node to insert. Will be ignored if the current node is also an array collection. 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(uint32_t uiIndex, const sdv::u8string &ssName, EInsertPreference ePreference) = 0#
Insert a table into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Table nodes cannot be inserted before value nodes or arrays. If the index is referencing a position before a value node or an array, the index is automatically corrected.
ssName – [in] Name of the table node to insert. Will be ignored if the parent node is an array collection. 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(uint32_t uiIndex, const sdv::u8string &ssName, EInsertPreference ePreference) = 0#
Insert a table array into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Table array nodes cannot be inserted before value nodes or arrays. If the index is referencing a position before a value node or an array, the index is automatically corrected.
ssName – [in] Name of the array node to insert. Will be ignored if the parent node is also an array collection. 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(uint32_t uiIndex, 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.
- Attention
Even though the TOML might be defining the node(s) in standard form, if the parent node is an inline node, the node will be inserted as inline node.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Table array nodes cannot be inserted before value nodes or arrays. If the index is referencing a position before a value node or an array, the index is automatically corrected.
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 uint32 uiIndex, in u8string ssName, in any anyValue)
Insert a value into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Value nodes cannot be inserted behind external tables and table arrays. If the index is referencing a position behind an external table or a table array, the index is automatically corrected.
ssName – [in] Name of the node to insert. Will be ignored for an array collection. 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 uint32 uiIndex, in u8string ssName)
Insert an array into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Array nodes cannot be inserted behind external tables and table arrays. If the index is referencing a position behind an external table or a table array, the index is automatically corrected.
ssName – [in] Name of the array node to insert. Will be ignored if the current node is also an array collection. 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 uint32 uiIndex, in u8string ssName, in EInsertPreference ePreference)
Insert a table into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Table nodes cannot be inserted before value nodes or arrays. If the index is referencing a position before a value node or an array, the index is automatically corrected.
ssName – [in] Name of the table node to insert. Will be ignored if the parent node is an array collection. 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 uint32 uiIndex, in u8string ssName, in EInsertPreference ePreference)
Insert a table array into the collection at the location before the supplied index.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Table array nodes cannot be inserted before value nodes or arrays. If the index is referencing a position before a value node or an array, the index is automatically corrected.
ssName – [in] Name of the array node to insert. Will be ignored if the parent node is also an array collection. 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 uint32 uiIndex, 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.
- Attention
Even though the TOML might be defining the node(s) in standard form, if the parent node is an inline node, the node will be inserted as inline node.
- Parameters:
uiIndex – [in] The insertion location to insert the node before. Can be npos or any value larger than the collection count to insert the node at the end of the collection. Table array nodes cannot be inserted before value nodes or arrays. If the index is referencing a position before a value node or an array, the index is automatically corrected.
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 = 0x3733FA1F6841BE96#
Interface ID.
-
enum class EInsertPreference : int32_t#