jmespath.cpp
C++ implementation of JMESPath, a query language for JSON http://jmespath.org
|
The VariantNode class serves as a container node which can represent either one of the node types specified in the classes template argument list. More...
#include <variantnode.h>
Public Types | |
using | ValueType = boost::variant< boost::blank, VariantT...> |
The internal variant type which stores the nodes defined in VariantT or boost::blank if it's empty. More... | |
Public Member Functions | |
VariantNode () | |
Constructs an empty VariantNode object. More... | |
VariantNode (const VariantNode &)=default | |
Copy-constructs an VariantNode object. More... | |
template<typename T > | |
VariantNode (const T &other) | |
Copy constructs a VariantNode object if T is VariantNode or constructs a VariantNode object with T as the represented node type with the value given in other. More... | |
VariantNode< VariantT...> & | operator= (const VariantNode &other) |
Assigns the other object's value to this object. More... | |
template<typename T > | |
VariantNode< VariantT...> & | operator= (const T &other) |
Assigns the value of the other object to this object's internal variant making it the node that this object represents. More... | |
bool | operator== (const VariantNode &other) const |
Equality compares this node to the other. More... | |
bool | isNull () const |
Returns whether this object has been initialized. More... | |
void | accept (interpreter::AbstractVisitor *visitor) const override |
Accepts the given visitor object. More... | |
![]() | |
AbstractNode ()=default | |
Constructs an AbstractNode object. More... | |
AbstractNode (const AbstractNode &)=default | |
Copy-constructs an AbstractNode object. More... | |
virtual | ~AbstractNode () |
Destroys the AbstractNode object. More... | |
AbstractNode & | operator= (const AbstractNode &)=default |
Copy-assigns the other object to this object. More... | |
Public Attributes | |
ValueType | value |
The variable which stores the node that this object represents. More... | |
The VariantNode class serves as a container node which can represent either one of the node types specified in the classes template argument list.
VariantT | The list of types that the VariantNode can represent |
using jmespath::ast::VariantNode< VariantT >::ValueType = boost::variant<boost::blank, VariantT...> |
The internal variant type which stores the nodes defined in VariantT or boost::blank if it's empty.
|
inline |
Constructs an empty VariantNode object.
|
default |
Copy-constructs an VariantNode object.
|
inline |
Copy constructs a VariantNode object if T is VariantNode or constructs a VariantNode object with T as the represented node type with the value given in other.
|
inlineoverridevirtual |
Accepts the given visitor object.
Subclasses should implement this function by calling the visit method of the visitor with a pointer to the node object itself and the accept method of the node's member nodes with the visitor as the parameter.
[in] | visitor | An interpreter::AbstractVisitor object |
Implements jmespath::ast::AbstractNode.
|
inline |
Returns whether this object has been initialized.
|
inline |
Assigns the other object's value to this object.
[in] | other | The object whos value should be assigned to this object. |
|
inline |
Assigns the value of the other object to this object's internal variant making it the node that this object represents.
|
inline |
Equality compares this node to the other.
[in] | other | The node that should be compared. |
ValueType jmespath::ast::VariantNode< VariantT >::value |
The variable which stores the node that this object represents.