Class CParserTOML#
Defined in File parser_toml.h
Inheritance Relationships#
Base Types#
public sdv::IInterfaceAccess
(Struct IInterfaceAccess)public sdv::toml::ITOMLParser
(Struct ITOMLParser)
Class Documentation#
-
class CParserTOML : public sdv::IInterfaceAccess, public sdv::toml::ITOMLParser#
Creates a tree structure from input of UTF-8 encoded TOML source data.
Unnamed Group
-
const CNodeCollection &GetRoot() const#
Return the root node.
- Returns:
Reference to the root node collection.
-
CNodeCollection &GetRoot()#
Return the root node.
- Returns:
Reference to the root node collection.
Public Functions
-
CParserTOML() = default#
Default constructor.
-
CParserTOML(const std::string &rssString)#
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.
-
std::string CreateTOMLText(const std::string &rssParent = std::string()) const#
Get the TOML text based on the content.
- Parameters:
rssParent – [in] When present, uses the parent node into the TOML text generation.
- Returns:
The string containing the TOML text.
-
const CNodeCollection &GetRoot() const#