MADARA
3.1.8
|
Composite node that multiplies a variable by some right hand side. More...
#include <VariableMultiplyNode.h>
Public Member Functions | |
VariableMultiplyNode (ComponentNode *lhs, madara::knowledge::KnowledgeRecord value, ComponentNode *rhs, madara::knowledge::ThreadSafeContext &context) | |
Ctor. More... | |
virtual | ~VariableMultiplyNode (void) |
Dtor. More... | |
virtual void | accept (Visitor &visitor) const |
Define the accept() operation used for the Visitor pattern. More... | |
virtual madara::knowledge::KnowledgeRecord | evaluate (const madara::knowledge::KnowledgeUpdateSettings &settings) |
Evaluates the node and its children. More... | |
virtual madara::knowledge::KnowledgeRecord | item (void) const |
Return the item stored in the node. More... | |
virtual ComponentNode * | left (void) const |
Returns the left expression. More... | |
virtual madara::knowledge::KnowledgeRecord | prune (bool &can_change) |
Prune the tree of unnecessary nodes. More... | |
virtual ComponentNode * | right (void) const |
Returns the right expression. More... | |
void | set_logger (logger::Logger &logger) |
Sets the logger for printing errors and debugging info. More... | |
Protected Attributes | |
logger::Logger * | logger_ |
handle the context More... | |
Private Attributes | |
CompositeArrayReference * | array_ |
variable index holder More... | |
madara::knowledge::ThreadSafeContext & | context_ |
ComponentNode * | rhs_ |
holds a right hand side argument if it is not value_ More... | |
madara::knowledge::KnowledgeRecord | value_ |
amount to increment by. Note that this can also do decrement. More... | |
VariableNode * | var_ |
variable holder More... | |
Composite node that multiplies a variable by some right hand side.
Definition at line 28 of file VariableMultiplyNode.h.
madara::expression::VariableMultiplyNode::VariableMultiplyNode | ( | ComponentNode * | lhs, |
madara::knowledge::KnowledgeRecord | value, | ||
ComponentNode * | rhs, | ||
madara::knowledge::ThreadSafeContext & | context | ||
) |
Ctor.
Definition at line 12 of file VariableMultiplyNode.cpp.
|
virtual |
Dtor.
Definition at line 25 of file VariableMultiplyNode.cpp.
|
virtual |
Define the accept() operation used for the Visitor pattern.
Reimplemented from madara::expression::ComponentNode.
Definition at line 32 of file VariableMultiplyNode.cpp.
|
virtual |
Evaluates the node and its children.
This does not prune any of the expression tree, and is much faster than the prune function
Implements madara::expression::ComponentNode.
Definition at line 96 of file VariableMultiplyNode.cpp.
|
virtual |
Return the item stored in the node.
Reimplemented from madara::expression::ComponentNode.
Definition at line 38 of file VariableMultiplyNode.cpp.
|
virtualinherited |
Returns the left expression.
Reimplemented in madara::expression::CompositeBinaryNode.
Definition at line 34 of file ComponentNode.cpp.
|
virtual |
Prune the tree of unnecessary nodes.
Returns evaluation of the node and sets can_change appropriately. if this node can be changed, that means it shouldn't be pruned.
Implements madara::expression::ComponentNode.
Definition at line 54 of file VariableMultiplyNode.cpp.
|
virtualinherited |
Returns the right expression.
Reimplemented in madara::expression::CompositeUnaryNode.
Definition at line 41 of file ComponentNode.cpp.
|
inherited |
Sets the logger for printing errors and debugging info.
logger | the logger to use |
Definition at line 53 of file ComponentNode.cpp.
|
private |
variable index holder
Definition at line 61 of file VariableMultiplyNode.h.
|
private |
Definition at line 69 of file VariableMultiplyNode.h.
|
protectedinherited |
handle the context
Definition at line 96 of file ComponentNode.h.
|
private |
holds a right hand side argument if it is not value_
Definition at line 67 of file VariableMultiplyNode.h.
|
private |
amount to increment by. Note that this can also do decrement.
Definition at line 64 of file VariableMultiplyNode.h.
|
private |
variable holder
Definition at line 58 of file VariableMultiplyNode.h.