Skip to content

Latest commit

 

History

History
136 lines (81 loc) · 2.57 KB

StringNode.md

File metadata and controls

136 lines (81 loc) · 2.57 KB

StringNode

class StringNode

Inherited from: ValueNode.

Required header: <Eclog/StringNode.h>

The StringNode abstract class represents a string node in a document tree (See Document).

Member functions

Name Description
value Gets the value.
setNotation Sets the string notation to be used when rendering the string.
notation Gets the string notation to be used when rendering the string.
setDelimiter Sets the string delimiter to be used when rendering the string.
delimiter Gets the string delimiter to be used when rendering the string.
toStdString Returns the value as a C++ string.
assign Assigns a new value to this node.

value

virtual cstring value() const;

Gets the value.

Return value

cstring The value.


setNotation

virtual void setNotation(StringNotation notation);

Sets the string notation to be used when rendering the string.

Parameters

StringNotation notation The string notation.


notation

virtual StringNotation notation() const;

Gets the string notation to be used when rendering the string.

Return value

StringNotation The string notation.


setDelimiter

virtual void setDelimiter(cstring delimiter);
virtual void setDelimiter(cstring delimiter, ErrorCode& ec);

Sets the string delimiter to be used when rendering the string.

Parameters

cstring delimiter The string delimiter.

ErrorCode& ec Set to indicate what error occurred, if any.

Errors

An InvalidArgument error occurs if delimiter is invalid.


delimiter

virtual cstring delimiter() const;

Gets the string delimiter to be used when rendering the string.

Return value

cstring The string delimiter.


toStdString

std::string toStdString() const;

Returns the value as a C++ string.

Return value

std::string The value as a C++ string.


assign

virtual void assign(const StringDesc& desc);
virtual void assign(const StringNode& other);

Assigns a new value to this node.

Parameters

const StringDesc& A string description.

const StringNode& other Another string node.

Errors

If an error occurs, the value of this node remains untouched.