Class CParser#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class CParser : public sdv::IInterfaceAccess, public sdv::toml::ITOMLParser#

Creates a tree structure from input of UTF-8 encoded TOML source data.

Unnamed Group

const CNodeCollection &Root() const#

Return the root node.

Returns:

Reference to the root node collection.

CNodeCollection &Root()#

Return the root node.

Returns:

Reference to the root node collection.

Public Functions

CParser(const std::string &rssString = std::string())#

Construct a new Parser object.

Parameters:

rssString[in] UTF-8 encoded data of a TOML source

void Clear()#

Clears the current parse result.

Attention

This will render any pointer invalid!

virtual bool Process(const sdv::u8string &ssContent) override#

Process the configuration from the supplied content string. Overload of sdv::toml::ITOMLParser.

Parameters:

ssContent[in] Configuration string.

Returns:

Returns ‘true’ when the configuration could be read successfully, false when not.

CLexer &Lexer()#

Get the lexer containing the token list.

Returns:

A reference to the lexer containing the token list.

CNodeIndexer &Indexer()#

Get the indexer object managing the overall order of the nodes.

Returns:

Reference to the index object.

std::string GenerateTOML(const std::string &rssPrefixKey = std::string()) const#

Get the TOML text based on the content.

Parameters:

rssPrefixKey[in] When present, uses the prefix node into the TOML text generation. The string must follow the key rules for separation with bare, literal and quoted keys.

Returns:

The string containing the TOML text.

CLockRebuild CreateRebuildLockObject()#

Create a rebuild lock object. During the lifetime of the object rebuilding the node order is locked using the lock counter method.

Returns:

An instance of the rebuild lock object.

bool RebuildLocked() const#

Returns whether rebuild is locked at the moment.

Returns:

Set when rebuild is locked.

Public Members

friend CLockRebuild

Friend class can trigger manage rebuild lock counter.

class CLockRebuild#

Lock rebuild object preventing rebuilding the node order of all the tables.

Public Functions

CLockRebuild(const CLockRebuild &rLockRebuild)#

Copy constructor.

Parameters:

rLockRebuild[in] Reference to another rebuild lock object.

CLockRebuild(CLockRebuild &&rLockRebuild)#

Move constructor.

Parameters:

rLockRebuild[in] Reference to another rebuild lock object.

~CLockRebuild()#

Destructor.