Class CStringNode#
Defined in File parser_node_toml.h
Inheritance Relationships#
Base Type#
public toml_parser::CValueNode(Class CValueNode)
Class Documentation#
-
class CStringNode : public toml_parser::CValueNode#
String value node.
Public Types
-
enum EQuotationType#
Quotation type used for the string.
Values:
-
enumerator quoted_string#
String was a quoted string (default)
-
enumerator literal_string#
String was a literal string.
-
enumerator multi_line_quoted#
Multiple line quoted string.
-
enumerator multi_line_literal#
Multiple line lteral string.
-
enumerator quoted_string#
Public Functions
-
CStringNode(CParser &rparser, const std::string &rssName, const std::string &rssRawName, const std::string &rssVal, EQuotationType eQuotationType, const std::string &rssRawValue)#
Constructor.
- Parameters:
rparser – [in] Reference to the TOML parser.
rssName – [in] Reference to the string containing the name of the node.
rssRawName – [in] Reference to the raw name of the node.
rssVal – [in] The value to assign.
eQuotationType – [in] Type of quotation used for the value.
rssRawValue – [in] Reference to the raw value string.
-
virtual sdv::toml::ENodeType GetType() const override#
Get the node type. Overload of sdv::toml::INodeInfo::GetType.
- Returns:
Type of the node.
-
virtual sdv::any_t GetValue() const override#
The node value. Overload of sdv::toml::INodeInfo::GetValue.
- Returns:
For boolean, integer, floating point and strings, the function returns a value. Otherwise the function returns empty.
-
virtual bool ChangeValue(sdv::any_t anyNewValue) override#
Change the value of the node. Overload of sdv::toml::INodeUpdate::ChangeValue.
Remark
Only valid for value nodes. Changing the value type is not supported.
- Parameters:
anyNewValue – [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:
Returns whether the value change was successful.
-
virtual std::string ValueText() const override#
Get the value in text form. Overload of CNodeValue::ValueText.
- Returns:
String with the value in text form.
-
enum EQuotationType#