2 #ifndef _MADARA_NO_KARL_ 46 bool arg_can_change =
false;
47 result =
nodes_[0]->prune (arg_can_change);
49 if (!arg_can_change && dynamic_cast <LeafNode *> (
nodes_[0]) == 0)
58 "KARL COMPILE ERROR: System call eval requires an argument\n");
75 "System call type is returning the eval of its first argument\n");
85 "KARL RUNTIME ERROR: System call eval requires an argument\n");
96 visitor.
visit (*
this);
99 #endif // _MADARA_NO_KARL_ This class encapsulates an entry in a KnowledgeBase.
madara::knowledge::KnowledgeRecord KnowledgeRecord
std::deque< ComponentNode * > ComponentNodes
a vector of Component Nodes
logger::Logger * logger_
handle the context
This class stores variables and their values for use by any entity needing state information in a thr...
SystemCallEval(madara::knowledge::ThreadSafeContext &context, const ComponentNodes &nodes)
Constructor.
Defines a node that contains a madara::knowledge::KnowledgeRecord::Integer value. ...
Compiled, optimized KaRL logic.
madara::expression::ExpressionTree expression
the expression tree
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
#define madara_logger_ptr_log(logger, level,...)
Fast version of the madara::logger::log method for Logger pointers.
virtual ~SystemCallEval(void)
Destructor.
Abstract base class for all visitors to all classes that derive from ComponentNode.
madara::knowledge::ThreadSafeContext & context_
Interface for a MADARA system call.
CompiledExpression compile(const std::string &expression)
Compiles a KaRL expression into an expression tree.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the value of the node.
Settings for applying knowledge updates.
virtual void visit(const LeafNode &node)=0
Visit a LeafNode.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.
madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings=knowledge::KnowledgeUpdateSettings())
Evaluates the expression tree.