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
hashwildcardnode.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Author: Róbert Márki <gsmiko@gmail.com>
4 ** Copyright (c) 2016 Róbert Márki
5 **
6 ** This file is part of the jmespath.cpp project which is distributed under
7 ** the MIT License (MIT).
8 **
9 ** Permission is hereby granted, free of charge, to any person obtaining a copy
10 ** of this software and associated documentation files (the "Software"), to
11 ** deal in the Software without restriction, including without limitation the
12 ** rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
13 ** sell copies of the Software, and to permit persons to whom the Software is
14 ** furnished to do so, subject to the following conditions:
15 **
16 ** The above copyright notice and this permission notice shall be included in
17 ** all copies or substantial portions of the Software.
18 **
19 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 ** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 ** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 ** DEALINGS IN THE SOFTWARE.
26 **
27 ****************************************************************************/
28 #ifndef HASHWILDCARDNODE_H
29 #define HASHWILDCARDNODE_H
31 
32 namespace jmespath { namespace ast {
33 
39 {
40 public:
58  bool isProjection() const override;
65  bool stopsProjection() const override;
71  void accept(interpreter::AbstractVisitor* visitor) const override;
72 };
73 }} // namespace jmespath::ast
74 
75 BOOST_FUSION_ADAPT_STRUCT(
77  (jmespath::ast::ExpressionNode, leftExpression)
78  (jmespath::ast::ExpressionNode, rightExpression)
79 )
80 #endif // HASHWILDCARDNODE_H
The HashWildcardNode class represents a JMESPath hash wildcard expression.
Definition: hashwildcardnode.h:38
bool isProjection() const override
Returns whather this expression requires the projection of subsequent expressions.
Definition: hashwildcardnode.cpp:44
The BinaryExpressionNode class is the base class for all node types which consist of a left and a rig...
Definition: binaryexpressionnode.h:39
void accept(interpreter::AbstractVisitor *visitor) const override
Calls the visit method of the given visitor with the dynamic type of the node.
Definition: hashwildcardnode.cpp:54
ExpressionNode rightExpression
The right hand expression of the node.
Definition: binaryexpressionnode.h:88
The AbstractVisitor class is an interface which defines the member functions required to visit every ...
Definition: abstractvisitor.h:71
ExpressionNode leftExpression
The left hand expression of the node.
Definition: binaryexpressionnode.h:84
The ExpressionNode class represents a JMESPath expression.
Definition: expressionnode.h:56
HashWildcardNode()
Constructs an empty HashWildcardNode object.
Definition: hashwildcardnode.cpp:33
bool stopsProjection() const override
Reports whether the node should stop an ongoing projection or not.
Definition: hashwildcardnode.cpp:49