2 #ifndef _LEAF_NODE_CPP_
3 #define _LEAF_NODE_CPP_
5 #ifndef _MADARA_NO_KARL_
An abstract base class defines a simple abstract implementation of an expression tree node.
madara::knowledge::KnowledgeRecord item_
Integer value associated with the operand.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the printable value of the node.
virtual ~LeafNode(void)
Destructor.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.
LeafNode(logger::Logger &logger, const knowledge::KnowledgeRecord &item)
Constructor.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
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.
A multi-threaded logger for logging to one or more destinations.
Provides knowledge logging services to files and terminals.