2 #ifndef _MADARA_COMPONENT_NODE_H_
3 #define _MADARA_COMPONENT_NODE_H_
5 #ifndef _MADARA_NO_KARL_
20 class ThreadSafeContext;
An abstract base class defines a simple abstract implementation of an expression tree node.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)=0
Prunes the expression tree of unnecessary nodes.
ComponentNode(logger::Logger &logger)
Constructor.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
logger::Logger * logger_
handle the context
virtual ComponentNode * right(void) const
Returns the right expression.
void set_logger(logger::Logger &logger)
Sets the logger for printing errors and debugging info.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the value of the node.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)=0
Evaluates the expression tree.
virtual ComponentNode * left(void) const
Returns the left expression.
virtual ~ComponentNode(void)=0
Destructor.
Abstract base class for all visitors to all classes that derive from ComponentNode.
This class encapsulates an entry in a KnowledgeBase.
Settings for applying knowledge updates.
A multi-threaded logger for logging to one or more destinations.
std::deque< ComponentNode * > ComponentNodes
a vector of Component Nodes
Provides functions and classes for the distributed knowledge base.
Provides knowledge logging services to files and terminals.
Copyright(c) 2020 Galois.