5 #ifndef _MADARA_NO_KARL_
23 precondition_(precondition),
24 condition_(condition),
25 postcondition_(postcondition),
63 "CompositeForLoop::evaluate: Executing precondition\n");
65 precondition_->evaluate(settings);
68 while (condition_->evaluate(settings).is_true())
71 "CompositeForLoop::evaluate: Executing loop body\n");
73 body_->evaluate(settings);
76 "CompositeForLoop::evaluate: Executing postcondition\n");
78 postcondition_->evaluate(settings);
#define madara_logger_ptr_log(loggering, level,...)
Fast version of the madara::logger::log method for Logger pointers.
An abstract base class defines a simple abstract implementation of an expression tree node.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
CompositeForLoop(ComponentNode *precondition, ComponentNode *condition, ComponentNode *postcondition, ComponentNode *body, madara::knowledge::ThreadSafeContext &context)
Constructor.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
virtual ~CompositeForLoop(void)
Destructor.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the printable character of the node.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.
Abstract base class for all visitors to all classes that derive from ComponentNode.
virtual void visit(const LeafNode &node)=0
Visit a LeafNode.
This class encapsulates an entry in a KnowledgeBase.
void set_value(const KnowledgeRecord &new_value)
Sets the value from another KnowledgeRecord, does not copy toi, clock, and write_quality.
Settings for applying knowledge updates.
This class stores variables and their values for use by any entity needing state information in a thr...