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
expressionnode.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 EXPRESSIONNODE_H
29 #define EXPRESSIONNODE_H
30 #include "src/ast/abstractnode.h"
31 #include "src/ast/variantnode.h"
32 #include <boost/variant.hpp>
33 #include <boost/fusion/include/adapt_struct.hpp>
34 
35 namespace jmespath { namespace ast {
36 
37 class IdentifierNode;
38 class RawStringNode;
39 class LiteralNode;
40 class SubexpressionNode;
41 class IndexExpressionNode;
42 class HashWildcardNode;
43 class MultiselectListNode;
44 class MultiselectHashNode;
45 class NotExpressionNode;
46 class ComparatorExpressionNode;
47 class OrExpressionNode;
48 class AndExpressionNode;
49 class ParenExpressionNode;
50 class PipeExpressionNode;
51 class CurrentNode;
52 class FunctionExpressionNode;
56 class ExpressionNode : public VariantNode<
57  boost::recursive_wrapper<IdentifierNode>,
58  boost::recursive_wrapper<RawStringNode>,
59  boost::recursive_wrapper<LiteralNode>,
60  boost::recursive_wrapper<SubexpressionNode>,
61  boost::recursive_wrapper<IndexExpressionNode>,
62  boost::recursive_wrapper<HashWildcardNode>,
63  boost::recursive_wrapper<MultiselectListNode>,
64  boost::recursive_wrapper<MultiselectHashNode>,
65  boost::recursive_wrapper<NotExpressionNode>,
66  boost::recursive_wrapper<ComparatorExpressionNode>,
67  boost::recursive_wrapper<OrExpressionNode>,
68  boost::recursive_wrapper<AndExpressionNode>,
69  boost::recursive_wrapper<ParenExpressionNode>,
70  boost::recursive_wrapper<PipeExpressionNode>,
71  boost::recursive_wrapper<CurrentNode>,
72  boost::recursive_wrapper<FunctionExpressionNode> >
73 {
74 public:
82  ExpressionNode(const ExpressionNode&) = default;
86  virtual ~ExpressionNode();
92  ExpressionNode(const ValueType& expression);
104  ExpressionNode& operator=(const ValueType& expression);
105 };
106 }} // namespace jmespath::ast
107 
108 BOOST_FUSION_ADAPT_STRUCT(
111 )
112 #endif // EXPRESSIONNODE_H
virtual ~ExpressionNode()
Destroys the ExpressionNode object.
Definition: expressionnode.cpp:37
ExpressionNode()
Constructs an empty ExpressionNode object.
Definition: expressionnode.cpp:32
The VariantNode class serves as a container node which can represent either one of the node types spe...
Definition: variantnode.h:42
The ExpressionNode class represents a JMESPath expression.
Definition: expressionnode.h:56
ExpressionNode & operator=(const ExpressionNode &other)
Assigns the other object to this object.
Definition: expressionnode.cpp:46