2 #ifndef _MADARA_VARIABLE_DIVIDE_NODE_H_ 3 #define _MADARA_VARIABLE_DIVIDE_NODE_H_ 5 #ifndef _MADARA_NO_KARL_ 84 #endif // _MADARA_NO_KARL_ This class encapsulates an entry in a KnowledgeBase.
Composite node that divides a variable by some right hand side.
virtual ~VariableDivideNode(void)
Dtor.
Defines a terminal node of that references the current value stored in a variable.
ComponentNode * rhs_
holds a right hand side argument if it is not value_
This class stores variables and their values for use by any entity needing state information in a thr...
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the node and its children.
std::string expand_key(void) const
Expands the key (if necessary).
const std::string & key(void) const
Return the variable key.
virtual madara::knowledge::KnowledgeRecord item(void) const
Return the item stored in the node.
VariableDivideNode(ComponentNode *lhs, madara::knowledge::KnowledgeRecord value, ComponentNode *rhs, madara::knowledge::ThreadSafeContext &context)
Ctor.
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.
CompositeArrayReference * array_
variable index holder
madara::knowledge::KnowledgeRecord value_
amount to increment by. Note that this can also do decrement.
madara::knowledge::ThreadSafeContext & context_
Settings for applying knowledge updates.
VariableNode * var_
variable holder
Copyright (c) 2015 Carnegie Mellon University.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prune the tree of unnecessary nodes.
virtual void accept(Visitor &visitor) const
Define the accept() operation used for the Visitor pattern.
Defines a terminal node of that references the current value stored in a variable.