MADARA  3.2.3
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 
14 namespace madara
15 {
16  namespace expression
17  {
18  // Forward declaration.
19  class Visitor;
20 
27  {
28  public:
34 
41  const ComponentNodes & nodes);
42 
46  virtual ~CompositeTernaryNode (void);
47 
52  virtual madara::knowledge::KnowledgeRecord item (void) const;
53 
59  virtual madara::knowledge::KnowledgeRecord prune (bool & can_change) = 0;
60 
67  const madara::knowledge::KnowledgeUpdateSettings & settings) = 0;
68 
73  virtual void accept (Visitor &visitor) const;
74 
75  protected:
77  };
78  }
79 }
80 
81 #endif // _MADARA_NO_KARL_
82 
83 #endif /* _MADARA_COMPOSITE_TERNARY_NODE_H_ */
This class encapsulates an entry in a KnowledgeBase.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)=0
Prunes the expression tree of unnecessary nodes.
std::deque< ComponentNode * > ComponentNodes
a vector of Component Nodes
Provides knowledge logging services to files and terminals.
Definition: GlobalLogger.h:11
A multi-threaded logger for logging to one or more destinations.
Definition: Logger.h:88
CompositeTernaryNode(logger::Logger &logger)
Constructor.
An abstract base class defines a simple abstract implementation of an expression tree node...
Definition: ComponentNode.h:36
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition: Visitor.h:91
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)=0
Evaluates the node.
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the value of the node.