Public Member Functions | List of all members
ValueProperty Class Referencefinal

Simple name-value property node. More...

#include <PropertyAst.hpp>

Inheritance diagram for ValueProperty:
[legend]
Collaboration diagram for ValueProperty:
[legend]

Public Member Functions

 ValueProperty (const CodeSpan &codeSpan_, std::string_view name_, std::string_view value_)
 Create a name-value property node with the supplied data. More...
 
 ValueProperty (ValueProperty &&rhs) noexcept
 Construct a name-value property node by moving the contents of the supplied node. More...
 
std::string_view getName () const
 Get the string view pointing to the name of the value property. More...
 
std::string_view getValue () const
 Get the string view pointing to the value of the value property. More...
 
bool operator== (const PropertyNode &rhs) const override
 Returns true if the current node is equal to the supplied node. More...
 
void visit (Payload &payload, PropertyVisitor &visitor) const override
 Visit the node. More...
 
- Public Member Functions inherited from PropertyNode
virtual ~PropertyNode ()=default
 Destroy a Property AST node. More...
 
const CodeSpangetCodeSpan () const
 Get the code span of the node. More...
 
bool operator!= (const PropertyNode &rhs) const
 Returns true if the current node is not equal to the supplied node. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from PropertyNode
static std::string normalise (std::string_view input)
 Removing escaping, line continuation, and leading blanks. More...
 

Detailed Description

Simple name-value property node.

Constructor & Destructor Documentation

◆ ValueProperty() [1/2]

ValueProperty ( const CodeSpan codeSpan_,
std::string_view  name_,
std::string_view  value_ 
)
inline

Create a name-value property node with the supplied data.

◆ ValueProperty() [2/2]

ValueProperty ( ValueProperty &&  rhs)
inlinenoexcept

Construct a name-value property node by moving the contents of the supplied node.

Member Function Documentation

◆ getName()

std::string_view getName ( ) const
inline

Get the string view pointing to the name of the value property.

Returns
the string view pointing to the name of the value property

◆ getValue()

std::string_view getValue ( ) const
inline

Get the string view pointing to the value of the value property.

Returns
the string view pointing to the value of the value property

◆ operator==()

bool operator== ( const PropertyNode rhs) const
inlineoverridevirtual

Returns true if the current node is equal to the supplied node.

Overridden in concrete classes.

Returns
true if the current node is equal to the supplied node.

Reimplemented from PropertyNode.

◆ visit()

void visit ( Payload payload,
PropertyVisitor visitor 
) const
inlineoverridevirtual

Visit the node.

the visitor specific payload (cast in the concrete visitor class)

Parameters
visitorthe visitor

Implements PropertyNode.


The documentation for this class was generated from the following file: