1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2 * Use of this file is governed by the BSD 3-clause license that
3 * can be found in the LICENSE.txt file in the project root.
8 #include "antlr4-common.h"
16 class ANTLR4CPP_PUBLIC XPathElement {
18 /// Construct element like {@code /ID} or {@code ID} or {@code /*} etc...
19 /// op is null if just node
20 XPathElement(const std::string &nodeName);
21 XPathElement(XPathElement const&) = default;
22 virtual ~XPathElement();
24 XPathElement& operator=(XPathElement const&) = default;
26 /// Given tree rooted at {@code t} return all nodes matched by this path
28 virtual std::vector<ParseTree *> evaluate(ParseTree *t);
29 virtual std::string toString() const;
31 void setInvert(bool value);
34 std::string _nodeName;