jmespath.cpp
C++ implementation of JMESPath, a query language for JSON http://jmespath.org
|
The SliceExpressionNode class represents a JMESPath slice expression. More...
#include <sliceexpressionnode.h>
Public Types | |
using | IndexType = boost::optional< Index > |
Public Member Functions | |
SliceExpressionNode (const IndexType &startIndex=boost::none, const IndexType &stopIndex=boost::none, const IndexType &stepIndex=boost::none) | |
Constructs a SliceExpressionNode object with the given index values. More... | |
void | accept (interpreter::AbstractVisitor *visitor) const override |
Calls the visit method of the given visitor with the dynamic type of the node. More... | |
bool | operator== (const SliceExpressionNode &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 | |
IndexType | start |
Inclusive start index. More... | |
IndexType | stop |
Exclusive end index. More... | |
IndexType | step |
Step index. More... | |
The SliceExpressionNode class represents a JMESPath slice expression.
using jmespath::ast::SliceExpressionNode::IndexType = boost::optional<Index> |
jmespath::ast::SliceExpressionNode::SliceExpressionNode | ( | const IndexType & | startIndex = boost::none , |
const IndexType & | stopIndex = boost::none , |
||
const IndexType & | stepIndex = boost::none |
||
) |
Constructs a SliceExpressionNode object with the given index values.
[in] | startIndex | Inclusive start index of slice. |
[in] | stopIndex | Exclusive end index of slice. |
[in] | stepIndex | Step index of slice. |
|
overridevirtual |
Calls the visit method of the given visitor with the dynamic type of the node.
visitor | A visitor implementation |
Implements jmespath::ast::AbstractNode.
bool jmespath::ast::SliceExpressionNode::operator== | ( | const SliceExpressionNode & | other | ) | const |
Equality compares this node to the other.
other | The node that should be compared. |
IndexType jmespath::ast::SliceExpressionNode::start |
Inclusive start index.
IndexType jmespath::ast::SliceExpressionNode::step |
Step index.
IndexType jmespath::ast::SliceExpressionNode::stop |
Exclusive end index.