2 #ifndef _MADARA_VARIABLE_INCREMENT_NODE_H_
3 #define _MADARA_VARIABLE_INCREMENT_NODE_H_
5 #ifndef _MADARA_NO_KARL_
An abstract base class defines a simple abstract implementation of an expression tree node.
Defines a terminal node of that references the current value stored in a variable.
Defines a terminal node of that references the current value stored in a variable.
virtual void accept(Visitor &visitor) const
Define the accept() operation used for the Visitor pattern.
ComponentNode * rhs_
holds a right hand side argument if it is not value_
VariableNode * var_
variable holder
madara::knowledge::ThreadSafeContext & context_
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prune the tree of unnecessary nodes.
madara::knowledge::KnowledgeRecord value_
amount to increment by. Note that this can also do decrement.
VariableIncrementNode(ComponentNode *lhs, madara::knowledge::KnowledgeRecord value, ComponentNode *rhs, madara::knowledge::ThreadSafeContext &context)
Ctor.
virtual ~VariableIncrementNode(void)
Dtor.
virtual madara::knowledge::KnowledgeRecord item(void) const
Return the item stored in the node.
std::string expand_key(void) const
Expands the key (if necessary).
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the node and its children.
const std::string & key(void) const
Return the variable key.
CompositeArrayReference * array_
variable index holder
Defines a terminal node of that references the current value stored in a variable.
Abstract base class for all visitors to all classes that derive from ComponentNode.
This class encapsulates an entry in a KnowledgeBase.
Settings for applying knowledge updates.
This class stores variables and their values for use by any entity needing state information in a thr...
Copyright(c) 2020 Galois.