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 EInsertResult : uint32_t#
The result of the TOML string to insert.
Values:
-
enumerator invalid_TOML#
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 invalid_TOML
The TOML string was invalid or didn’t fit the collection node it was to be inserted.
-
enumerator invalid_TOML
The TOML string was invalid or didn’t fit the collection node it was to be inserted.
-
enumerator invalid_TOML
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 invalid_TOML#
-
enum EInsertResult
The result of the TOML string to insert.
Values:
-
enumerator invalid_TOML
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 invalid_TOML
The TOML string was invalid or didn’t fit the collection node it was to be inserted.
-
enumerator invalid_TOML
The TOML string was invalid or didn’t fit the collection node it was to be inserted.
-
enumerator invalid_TOML
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 invalid_TOML
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 &ssKeyName) = 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.
ssKeyName – [in] Name of the table node to insert. Will be ignored if the current 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.
- 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) = 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 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 EInsertResult InsertTOML(const sdv::u8string &ssTOML, bool bRollbackOnPartly) = 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.
- Parameters:
ssTOML – [in] The TOML string to insert.
bRollbackOnPartly – [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 ssKeyName)
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.
ssKeyName – [in] Name of the table node to insert. Will be ignored if the current 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.
- Returns:
On success the interface to the newly inserted node is returned or NULL otherwise.
- IInterfaceAccess InsertTableArray (in uint32 uiIndex, in u8string ssName)
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 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.
- EInsertResult InsertTOML (in u8string ssTOML, in boolean bRollbackOnPartly)
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.
- Parameters:
ssTOML – [in] The TOML string to insert.
bRollbackOnPartly – [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 = 0xE0E4E7111E37C4D9#
Interface ID.
-
enum class EInsertResult : uint32_t#