MADARA  3.2.3
CompositeAssignmentNode.h
Go to the documentation of this file.
1 #ifndef _MADARA_COMPOSITE_ASSIGNMENT_NODE_H_
2 #define _MADARA_COMPOSITE_ASSIGNMENT_NODE_H_
3 
4 #ifndef _MADARA_NO_KARL_
5 
6 
11 
12 namespace madara
13 {
14  namespace expression
15  {
16  // Forward declaration.
17  class ComponentNode;
18  class Visitor;
19 
27  {
28  public:
39 
44  virtual madara::knowledge::KnowledgeRecord item (void) const;
45 
51  virtual madara::knowledge::KnowledgeRecord prune (bool & can_change);
52 
60 
65  virtual void accept (Visitor &visitor) const;
66 
67  private:
68 
76  };
77  }
78 }
79 
80 #endif // _MADARA_NO_KARL_
81 
82 #endif //_MADARA_COMPOSITE_ASSIGNMENT_NODE_H_
This class encapsulates an entry in a KnowledgeBase.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
Defines a terminal node of that references the current value stored in a variable.
Definition: VariableNode.h:28
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the printable character of the node.
CompositeAssignmentNode(logger::Logger &logger, ComponentNode *left, ComponentNode *right)
Constructor.
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
A composite node that allows for variable assignment.
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
VariableNode * var_
Left should always be a variable node.
virtual ComponentNode * left(void) const
Returns the left expression.
Settings for applying knowledge updates.
Encapsulates a single expression tree.
Copyright (c) 2015 Carnegie Mellon University.
virtual ComponentNode * right(void) const
Returns the right expression.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
Defines a terminal node of that references the current value stored in a variable.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.