Class CGenContext#
Defined in File parser_node_toml.h
Class Documentation#
-
class CGenContext#
Generation context information, allowing the generation to take place from the root node as well as from any node collection that contains sub nodes.
Public Functions
-
CGenContext(const std::string &rssPrefixKey = std::string(), uint32_t uiOptions = 0)#
Default constructor.
- Parameters:
rssPrefixKey – [in] Reference to the prefix key that is used as a parent during the generation.
uiOptions – [in] The initial options to set.
Called by the node that is generating the TOML. If not initialized before, initializes with the provided node.
- Parameters:
rptrNode – [in] Reference to the node that could be used for initialization as top most node.
Check whether the provided node is a parent of the top most node.
- Parameters:
rptrNode – [in] Reference to the node to use for the checking.
- Returns:
Returns true if the node is a parent of the top most node, false otherwise.
-
CGenContext CopyWithContext(const std::string &rssNewKeyContext) const#
Create a copy of the context class with a new key context.
- Parameters:
rssNewKeyContext – [in] Reference to the string containing the new key context.
- Returns:
The copy of the contetx class.
-
const std::string &PrefixKey() const#
Get the stored prefix key that should be used for the TOML code generation.
- Returns:
Reference to the prefix key string.
-
const std::string &KeyContext() const#
Get the stored key context.
- Returns:
Reference to the key context string.
-
bool TopMostNode() const#
Is this the top most node?
- Returns:
Returns when the node is the top most node.
-
void SetOption(EGenerateOptions eOption)#
Set a generation option.
- Parameters:
eOption – [in] Option to set.
-
bool CheckOption(EGenerateOptions eOption) const#
Check whether a generation option has been set.
- Parameters:
eOption – [in] Option to set.
- Returns:
Returns whether the option was set.
-
CGenContext(const std::string &rssPrefixKey = std::string(), uint32_t uiOptions = 0)#