2 #ifndef _MADARA_NO_KARL_ 43 for (ComponentNodes::iterator i =
nodes_.begin (); i !=
nodes_.end ();
46 bool arg_can_change =
false;
47 result = (*i)->prune (arg_can_change);
49 if (!arg_can_change && dynamic_cast <LeafNode *> (*i) == 0)
74 delimiter =
nodes_[1]->evaluate (settings).to_string (delimiter);
79 "KARL RUNTIME ERROR: System call to_string" 80 " may have up to 2 arguments. First is a value to change to string." 81 " An optional second is a delimiter for array stringification\n");
86 "System call to_string is converting an argument\n");
94 "System call to_string is converting 0\n");
107 visitor.
visit (*
this);
110 #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...
Defines a node that contains a madara::knowledge::KnowledgeRecord::Integer value. ...
virtual ~SystemCallToString(void)
Destructor.
void set_value(const KnowledgeRecord &new_value)
Sets the value from another KnowledgeRecord, does not copy clock and write_quality.
#define madara_logger_ptr_log(logger, level,...)
Fast version of the madara::logger::log method for Logger pointers.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the value of the node.
Abstract base class for all visitors to all classes that derive from ComponentNode.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
Interface for a MADARA system call.
Settings for applying knowledge updates.
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.
virtual void visit(const LeafNode &node)=0
Visit a LeafNode.
SystemCallToString(madara::knowledge::ThreadSafeContext &context, const ComponentNodes &nodes)
Constructor.