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 "madara::expression::SystemCallToString: " 81 "System call to_string" 82 " may have up to 2 arguments. First is a value to change to string." 83 " An optional second is a delimiter for array stringification\n");
85 throw KarlException (
"madara::expression::SystemCallToString: " 86 "KARL RUNTIME ERROR: " 87 "System call to_string" 88 " may have up to 2 arguments. First is a value to change to string." 89 " An optional second is a delimiter for array stringification\n");
94 "madara::expression::SystemCallToString: " 95 "System call to_string is converting an argument\n");
103 "madara::expression::SystemCallToString: " 104 "KARL RUNTIME ERROR:" 105 "System call to_string requires an argument\n");
107 throw KarlException (
"madara::expression::SystemCallToString: " 108 "KARL RUNTIME ERROR: " 109 "System call to_string requires an argument\n");
122 visitor.
visit (*
this);
125 #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.
An exception for unrecoverable KaRL compilation issues.
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.