3 #ifndef _MADARA_KNOWLEDGE_EXPRESSION_TREE_H_ 4 #define _MADARA_KNOWLEDGE_EXPRESSION_TREE_H_ 6 #ifndef _MADARA_NO_KARL_ 21 class ExpressionTreeIterator;
22 class ExpressionTreeConstIterator;
166 #endif // _MADARA_NO_KARL_ This class encapsulates an entry in a KnowledgeBase.
madara::knowledge::KnowledgeRecord item(void) const
Returns value of tree.
Encapsulates a MADARA KaRL expression into an evaluatable tree.
ExpressionTree(logger::Logger &logger=*logger::global_logger.get())
Constructor.
bool is_null(void) const
Checks if root pointer is null.
iterator end(const std::string &traversal_order)
Returns an iterator to the end of the expression tree.
Constant iterator over an expression tree.
void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
Non-const iterator for traversing an expression tree.
madara::knowledge::KnowledgeRecord value_type
MADARA_Export utility::Refcounter< logger::Logger > global_logger
madara::knowledge::KnowledgeRecord prune(void)
Prunes the expression tree of unnecessary nodes.
Provides knowledge logging services to files and terminals.
A multi-threaded logger for logging to one or more destinations.
ExpressionTreeConstIterator const_iterator
ComponentNode * get_root(void)
Returns the root node of the expression tree.
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.
ExpressionTree left(void)
Returns the left expression of this tree.
ExpressionTree right(void)
Returns the right expression of this tree.
logger::Logger * logger_
handle for logging information
ExpressionTreeIterator iterator
~ExpressionTree(void)
Destructor.
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.
madara::utility::Refcounter< ComponentNode > root_
root of the expression tree
void operator=(const ExpressionTree &tree)
Non-deep copies an expression tree into this instance.
madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings=knowledge::KnowledgeUpdateSettings())
Evaluates the expression tree.
This template class provides transparent reference counting of its template parameter T...
iterator begin(const std::string &traversal_order)
Returns an iterator to the beginning of the expression tree.