Static Public Member Functions | Public Member Functions | List of all members
PropertyNode Class Referenceabstract

Abstract base class of Property AST node classes. More...

#include <PropertyAst.hpp>

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

Static Public Member Functions

static std::string normalise (std::string_view input)
 Removing escaping, line continuation, and leading blanks. More...
 

Public Member Functions

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...
 
virtual bool operator== (const PropertyNode &rhs) const
 Returns true if the current node is equal to the supplied node. More...
 
virtual void visit (Payload &payload, PropertyVisitor &visitor) const =0
 Visit the node. More...
 

Detailed Description

Abstract base class of Property AST node classes.

Constructor & Destructor Documentation

◆ ~PropertyNode()

virtual ~PropertyNode ( )
virtualdefault

Destroy a Property AST node.

Member Function Documentation

◆ getCodeSpan()

const CodeSpan& getCodeSpan ( ) const
inline

Get the code span of the node.

Returns
the node's code span

◆ normalise()

static std::string normalise ( std::string_view  input)
inlinestatic

Removing escaping, line continuation, and leading blanks.

This function is normally called internally, but it can be called externally if required.

Parameters
textthe input text
Returns
the normalised text

◆ operator!=()

bool operator!= ( const PropertyNode rhs) const
inline

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

Overridden in concrete classes.

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

◆ operator==()

virtual bool operator== ( const PropertyNode rhs) const
inlinevirtual

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 in EmptyLinePropertyNode, CommentPropertyNode, IncludePropertyNode, CompositeProperty, ValueProperty, and Properties.

◆ visit()

virtual void visit ( Payload payload,
PropertyVisitor visitor 
) const
pure virtual

Visit the node.

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

Parameters
visitorthe visitor

Implemented in EmptyLinePropertyNode, CommentPropertyNode, IncludePropertyNode, CompositeProperty, ValueProperty, and Properties.


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