5 #ifndef _MADARA_NO_KARL_ 27 precondition_ (precondition), condition_ (condition),
28 postcondition_ (postcondition), body_ (body)
68 "CompositeForLoop::evaluate: Executing precondition\n");
76 "CompositeForLoop::evaluate: Executing loop body\n");
81 "CompositeForLoop::evaluate: Executing postcondition\n");
98 visitor.
visit (*
this);
101 #endif // _MADARA_NO_KARL_ This class encapsulates an entry in a KnowledgeBase.
bool is_true(void) const
Checks to see if the record is true.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
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.
logger::Logger * logger_
handle the context
This class stores variables and their values for use by any entity needing state information in a thr...
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)=0
Evaluates the expression tree.
ComponentNode * precondition_
void set_value(const KnowledgeRecord &new_value)
Sets the value from another KnowledgeRecord, does not copy clock and write_quality.
#define madara_logger_ptr_log(logger, level,...)
Fast version of the madara::logger::log method for Logger pointers.
virtual ~CompositeForLoop(void)
Destructor.
An abstract base class defines a simple abstract implementation of an expression tree node...
Abstract base class for all visitors to all classes that derive from ComponentNode.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.
ComponentNode * condition_
Settings for applying knowledge updates.
virtual void visit(const LeafNode &node)=0
Visit a LeafNode.
CompositeForLoop(ComponentNode *precondition, ComponentNode *condition, ComponentNode *postcondition, ComponentNode *body, madara::knowledge::ThreadSafeContext &context)
Constructor.
ComponentNode * postcondition_