jmespath.cpp
C++ implementation of JMESPath, a query language for JSON http://jmespath.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Public Attributes | List of all members
jmespath::ast::BinaryExpressionNode Class Referenceabstract

The BinaryExpressionNode class is the base class for all node types which consist of a left and a right hand side expression. More...

#include <binaryexpressionnode.h>

Inheritance diagram for jmespath::ast::BinaryExpressionNode:
jmespath::ast::AbstractNode jmespath::ast::AndExpressionNode jmespath::ast::ComparatorExpressionNode jmespath::ast::HashWildcardNode jmespath::ast::IndexExpressionNode jmespath::ast::OrExpressionNode jmespath::ast::PipeExpressionNode jmespath::ast::SubexpressionNode

Public Member Functions

 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...
 
void accept (interpreter::AbstractVisitor *visitor) const override
 Calls the accept method with the given visitor as the parameter on the node's child expressions. More...
 
virtual bool isProjection () const =0
 Reports whether the right hand side expression is projected onto the result of the operation or not. More...
 
virtual bool stopsProjection () const =0
 Reports whether the node should stop an ongoing projection or not. More...
 
- Public Member Functions inherited from jmespath::ast::AbstractNode
 AbstractNode ()=default
 Constructs an AbstractNode object. More...
 
 AbstractNode (const AbstractNode &)=default
 Copy-constructs an AbstractNode object. More...
 
virtual ~AbstractNode ()
 Destroys the AbstractNode object. More...
 
AbstractNodeoperator= (const AbstractNode &)=default
 Copy-assigns the other object to this object. More...
 

Public Attributes

ExpressionNode leftExpression
 The left hand expression of the node. More...
 
ExpressionNode rightExpression
 The right hand expression of the node. More...
 

Detailed Description

The BinaryExpressionNode class is the base class for all node types which consist of a left and a right hand side expression.

Constructor & Destructor Documentation

jmespath::ast::BinaryExpressionNode::BinaryExpressionNode ( )

Constructs an empty BinaryExpressionNode object.

jmespath::ast::BinaryExpressionNode::BinaryExpressionNode ( const ExpressionNode left,
const ExpressionNode right 
)

Constructs a BinaryExpressionNode object with the given leftExpressin and rightExpression as its children.

Parameters
[in]leftLeft hand expression of the node.
[in]righthand expression of the node.

Member Function Documentation

void jmespath::ast::BinaryExpressionNode::accept ( interpreter::AbstractVisitor visitor) const
overridevirtual

Calls the accept method with the given visitor as the parameter on the node's child expressions.

Parameters
[in]visitorA visitor implementation.

Implements jmespath::ast::AbstractNode.

Reimplemented in jmespath::ast::ComparatorExpressionNode, jmespath::ast::IndexExpressionNode, jmespath::ast::HashWildcardNode, jmespath::ast::OrExpressionNode, and jmespath::ast::PipeExpressionNode.

virtual bool jmespath::ast::BinaryExpressionNode::isProjection ( ) const
pure virtual

Reports whether the right hand side expression is projected onto the result of the operation or not.

Returns
Returns true if the right hand expression is projected, otherwise returns false.

Implemented in jmespath::ast::ComparatorExpressionNode, jmespath::ast::IndexExpressionNode, jmespath::ast::AndExpressionNode, jmespath::ast::HashWildcardNode, jmespath::ast::OrExpressionNode, jmespath::ast::PipeExpressionNode, and jmespath::ast::SubexpressionNode.

bool jmespath::ast::BinaryExpressionNode::operator== ( const BinaryExpressionNode other) const

Equality compares this node to the other.

Parameters
[in]otherThe node that should be compared.
Returns
Returns true if this object is equal to the other, otherwise false
virtual bool jmespath::ast::BinaryExpressionNode::stopsProjection ( ) const
pure virtual

Reports whether the node should stop an ongoing projection or not.

Returns
Returns true if the node should stop an ongoing projection, otherwise returns false.

Implemented in jmespath::ast::ComparatorExpressionNode, jmespath::ast::IndexExpressionNode, jmespath::ast::AndExpressionNode, jmespath::ast::HashWildcardNode, jmespath::ast::OrExpressionNode, jmespath::ast::PipeExpressionNode, and jmespath::ast::SubexpressionNode.

Member Data Documentation

ExpressionNode jmespath::ast::BinaryExpressionNode::leftExpression

The left hand expression of the node.

ExpressionNode jmespath::ast::BinaryExpressionNode::rightExpression

The right hand expression of the node.


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