32 #include <boost/variant.hpp>
34 namespace jmespath{
namespace ast{
41 template <
typename ...VariantT>
49 using ValueType = boost::variant<boost::blank, VariantT...>;
116 return value.type() ==
typeid(boost::blank);
129 #endif // VARIANTNODE_H
VariantNode()
Constructs an empty VariantNode object.
Definition: variantnode.h:53
ValueType value
The variable which stores the node that this object represents.
Definition: variantnode.h:126
VariantNode(const T &other)
Copy constructs a VariantNode object if T is VariantNode or constructs a VariantNode object with T as...
Definition: variantnode.h:67
jmespath::ast::VariantNode< boost::recursive_wrapper< IdentifierNode >, boost::recursive_wrapper< RawStringNode >, boost::recursive_wrapper< LiteralNode >, boost::recursive_wrapper< SubexpressionNode >, boost::recursive_wrapper< IndexExpressionNode >, boost::recursive_wrapper< HashWildcardNode >, boost::recursive_wrapper< MultiselectListNode >, boost::recursive_wrapper< MultiselectHashNode >, boost::recursive_wrapper< NotExpressionNode >, boost::recursive_wrapper< ComparatorExpressionNode >, boost::recursive_wrapper< OrExpressionNode >, boost::recursive_wrapper< AndExpressionNode >, boost::recursive_wrapper< ParenExpressionNode >, boost::recursive_wrapper< PipeExpressionNode >, boost::recursive_wrapper< CurrentNode >, boost::recursive_wrapper< FunctionExpressionNode > >::ValueType boost::variant< boost::blank, VariantT...> ValueType
The internal variant type which stores the nodes defined in VariantT or boost::blank if it's empty...
Definition: variantnode.h:49
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 ...
Definition: variantnode.h:90
The AbstractVisitor class is an interface which defines the member functions required to visit every ...
Definition: abstractvisitor.h:71
The VariantNode class serves as a container node which can represent either one of the node types spe...
Definition: variantnode.h:42
bool isNull() const
Returns whether this object has been initialized.
Definition: variantnode.h:114
VariantNode< VariantT...> & operator=(const VariantNode &other)
Assigns the other object's value to this object.
Definition: variantnode.h:77
bool operator==(const VariantNode &other) const
Equality compares this node to the other.
Definition: variantnode.h:101
The VariantVisitorAdaptor class adapts an AbstractVisitor implementation to the boost::static_visitor...
Definition: variantvisitoradaptor.h:40
void accept(interpreter::AbstractVisitor *visitor) const override
Accepts the given visitor object.
Definition: variantnode.h:119
The AbstractNode class is the common interface class for all AST node types.
Definition: abstractnode.h:45