MADARA  3.1.8
CompositeForLoop.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 #ifndef _MADARA_COMPOSITE_FOR_LOOP_H_
3 #define _MADARA_COMPOSITE_FOR_LOOP_H_
4 
5 #ifndef _MADARA_NO_KARL_
6 
11 
12 namespace madara
13 {
14  namespace expression
15  {
16  class ComponentNode;
17  class Visitor;
18 
24  {
25  public:
35  ComponentNode * precondition,
36  ComponentNode * condition,
37  ComponentNode * postcondition,
38  ComponentNode * body,
40 
44  virtual ~CompositeForLoop (void);
45 
50  virtual madara::knowledge::KnowledgeRecord item (void) const;
51 
57  virtual madara::knowledge::KnowledgeRecord prune (bool & can_change);
58 
66 
71  virtual void accept (Visitor &visitor) const;
72 
73  private:
74 
75  // variables context
77 
78  // the loop precondition (what happens before the loop)
80 
81  // the loop condition (what must be true to continue looping)
83 
84  // the postcondition (what happens after a loop)
86 
87  // the body (what happens after a condition is true--the loop contents)
89 
90  // function pointer
92  };
93  }
94 }
95 
96 #endif // _MADARA_NO_KARL_
97 
98 #endif /* _MADARA_COMPOSITE_FOR_LOOP_H_ */
This class encapsulates an entry in a KnowledgeBase.
This class stores a function definition.
Definition: Functions.h:44
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
A composite node that iterates until a condition is met.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the printable character of the node.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
This class stores variables and their values for use by any entity needing state information in a thr...
virtual ~CompositeForLoop(void)
Destructor.
An abstract base class defines a simple abstract implementation of an expression tree node...
Definition: ComponentNode.h:35
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition: Visitor.h:90
madara::knowledge::ThreadSafeContext & context_
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.
madara::knowledge::Function * function_
CompositeForLoop(ComponentNode *precondition, ComponentNode *condition, ComponentNode *postcondition, ComponentNode *body, madara::knowledge::ThreadSafeContext &context)
Constructor.