jmespath.cpp
C++ implementation of JMESPath, a query language for JSON http://jmespath.org
|
The ComparatorExpressionNode class represents a JMESPath comparator expression. More...
#include <comparatorexpressionnode.h>
Public Types | |
enum | Comparator { Comparator::Unknown, Comparator::Less, Comparator::LessOrEqual, Comparator::Equal, Comparator::GreaterOrEqual, Comparator::Greater, Comparator::NotEqual } |
The Comparator enum defines the available comparison operators. More... | |
Public Member Functions | |
ComparatorExpressionNode () | |
Constructs an empty ComparatorExpressionNode object. More... | |
ComparatorExpressionNode (const ExpressionNode &left, Comparator valueComparator, const ExpressionNode &right) | |
Constructs a ComparatorExpressionNode object with the given leftExpression, comparator and rightExpression. More... | |
bool | operator== (const ComparatorExpressionNode &other) const |
Equality compares this node to the other. More... | |
bool | isProjection () const override |
Returns whather this expression requires the projection of subsequent expressions. More... | |
bool | stopsProjection () const override |
Reports whether the node should stop an ongoing projection or not. More... | |
void | accept (interpreter::AbstractVisitor *visitor) const override |
Calls the visit method of the given visitor with the dynamic type of the node. More... | |
![]() | |
BinaryExpressionNode () | |
Constructs an empty BinaryExpressionNode object. More... | |
BinaryExpressionNode (const ExpressionNode &left, const ExpressionNode &right) | |
Constructs a BinaryExpressionNode object with the given leftExpressin and rightExpression as its children. More... | |
bool | operator== (const BinaryExpressionNode &other) const |
Equality compares this node to the other. 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 | |
Comparator | comparator |
The type of comparator associated with the expression. More... | |
![]() | |
ExpressionNode | leftExpression |
The left hand expression of the node. More... | |
ExpressionNode | rightExpression |
The right hand expression of the node. More... | |
The ComparatorExpressionNode class represents a JMESPath comparator expression.
jmespath::ast::ComparatorExpressionNode::ComparatorExpressionNode | ( | ) |
Constructs an empty ComparatorExpressionNode object.
jmespath::ast::ComparatorExpressionNode::ComparatorExpressionNode | ( | const ExpressionNode & | left, |
Comparator | valueComparator, | ||
const ExpressionNode & | right | ||
) |
Constructs a ComparatorExpressionNode object with the given leftExpression, comparator and rightExpression.
[in] | left | The node's left hand child expression. |
[in] | valueComparator | The type of comparison operator to use for comparing the results of the left and right hand child expressions. |
[in] | right | The node's right hand child expression. |
|
overridevirtual |
Calls the visit method of the given visitor with the dynamic type of the node.
[in] | visitor | A visitor implementation |
Reimplemented from jmespath::ast::BinaryExpressionNode.
|
overridevirtual |
Returns whather this expression requires the projection of subsequent expressions.
Implements jmespath::ast::BinaryExpressionNode.
bool jmespath::ast::ComparatorExpressionNode::operator== | ( | const ComparatorExpressionNode & | other | ) | const |
Equality compares this node to the other.
[in] | other | The node that should be compared. |
|
overridevirtual |
Reports whether the node should stop an ongoing projection or not.
Implements jmespath::ast::BinaryExpressionNode.
Comparator jmespath::ast::ComparatorExpressionNode::comparator |
The type of comparator associated with the expression.