MADARA  3.4.1
CompositeTernaryNode.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 #ifndef _MADARA_COMPOSITE_TERNARY_NODE_H_
3 #define _MADARA_COMPOSITE_TERNARY_NODE_H_
4 
5 #ifndef _MADARA_NO_KARL_
6 
7 #include <string>
8 #include <stdexcept>
10 #include "madara/utility/StdInt.h"
12 
13 namespace madara
14 {
15 namespace expression
16 {
17 // Forward declaration.
18 class Visitor;
19 
26 {
27 public:
33 
40 
44  virtual ~CompositeTernaryNode(void);
45 
50  virtual madara::knowledge::KnowledgeRecord item(void) const;
51 
57  virtual madara::knowledge::KnowledgeRecord prune(bool& can_change) = 0;
58 
65  const madara::knowledge::KnowledgeUpdateSettings& settings) = 0;
66 
71  virtual void accept(Visitor& visitor) const;
72 
73 protected:
75 };
76 }
77 }
78 
79 #endif // _MADARA_NO_KARL_
80 
81 #endif /* _MADARA_COMPOSITE_TERNARY_NODE_H_ */
An abstract base class defines a simple abstract implementation of an expression tree node.
Definition: ComponentNode.h:37
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)=0
Evaluates the node.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)=0
Prunes the expression tree of unnecessary nodes.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the value of the node.
CompositeTernaryNode(logger::Logger &logger)
Constructor.
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition: Visitor.h:93
This class encapsulates an entry in a KnowledgeBase.
Settings for applying knowledge updates.
A multi-threaded logger for logging to one or more destinations.
Definition: Logger.h:165
std::deque< ComponentNode * > ComponentNodes
a vector of Component Nodes
Provides knowledge logging services to files and terminals.
Definition: GlobalLogger.h:12
Copyright(c) 2020 Galois.