MADARA
3.1.8
|
Encapsulates a single expression tree. More...
#include <CompositeUnaryNode.h>
Public Member Functions | |
CompositeUnaryNode (logger::Logger &logger, ComponentNode *right) | |
Constructor. More... | |
virtual | ~CompositeUnaryNode (void) |
Destructor. More... | |
virtual void | accept (Visitor &visitor) const |
Accepts a visitor subclassed from the Visitor class. More... | |
virtual madara::knowledge::KnowledgeRecord | evaluate (const madara::knowledge::KnowledgeUpdateSettings &settings)=0 |
Evaluates the expression tree. More... | |
virtual madara::knowledge::KnowledgeRecord | item (void) const |
Returns the value of the node. More... | |
virtual ComponentNode * | left (void) const |
Returns the left expression. More... | |
virtual madara::knowledge::KnowledgeRecord | prune (bool &can_change)=0 |
Prunes the expression 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... | |
ComponentNode * | right_ |
Right expression. More... | |
Encapsulates a single expression tree.
Definition at line 19 of file CompositeUnaryNode.h.
madara::expression::CompositeUnaryNode::CompositeUnaryNode | ( | logger::Logger & | logger, |
ComponentNode * | right | ||
) |
Constructor.
logger | the logger to use for printing |
right | right expression |
Definition at line 9 of file CompositeUnaryNode.cpp.
|
virtual |
Destructor.
Definition at line 16 of file CompositeUnaryNode.cpp.
|
virtualinherited |
Accepts a visitor subclassed from the Visitor class.
visitor | visitor instance to use |
Reimplemented in madara::expression::CompositeArrayReference, madara::expression::VariableNode, madara::expression::LeafNode, madara::expression::CompositeTernaryNode, madara::expression::SystemCallNode, madara::expression::VariableCompareNode, madara::expression::CompositeForLoop, madara::expression::SystemCallEval, madara::expression::SystemCallPrint, madara::expression::CompositeModulusNode, madara::expression::CompositeDivideNode, madara::expression::CompositePostdecrementNode, madara::expression::CompositePredecrementNode, madara::expression::CompositeFunctionNode, madara::expression::CompositePostincrementNode, madara::expression::CompositePreincrementNode, madara::expression::SystemCallClearVariable, madara::expression::SystemCallDeleteVariable, madara::expression::SystemCallPrintSystemCalls, madara::expression::CompositeAssignmentNode, madara::expression::CompositeConstArray, madara::expression::SystemCallExpandEnv, madara::expression::CompositeMultiplyNode, madara::expression::SystemCallExpandStatement, madara::expression::SystemCallSetPrecision, madara::expression::SystemCallToHostDirs, madara::expression::CompositeGreaterThanEqualNode, madara::expression::CompositeGreaterThanNode, madara::expression::CompositeInequalityNode, madara::expression::CompositeLessThanEqualNode, madara::expression::CompositeLessThanNode, madara::expression::CompositeNegateNode, madara::expression::CompositeNotNode, madara::expression::CompositeSubtractNode, madara::expression::SystemCallCos, madara::expression::SystemCallFragment, madara::expression::SystemCallGetClock, madara::expression::SystemCallGetTime, madara::expression::SystemCallGetTimeSeconds, madara::expression::SystemCallLogLevel, madara::expression::SystemCallPow, madara::expression::SystemCallRandDouble, madara::expression::SystemCallRandInt, madara::expression::SystemCallReadFile, madara::expression::SystemCallSetClock, madara::expression::SystemCallSetFixed, madara::expression::SystemCallSetScientific, madara::expression::SystemCallSin, madara::expression::SystemCallSize, madara::expression::SystemCallSleep, madara::expression::SystemCallSqrt, madara::expression::SystemCallTan, madara::expression::SystemCallToBuffer, madara::expression::SystemCallToDouble, madara::expression::SystemCallToDoubles, madara::expression::SystemCallToInteger, madara::expression::SystemCallToIntegers, madara::expression::SystemCallToString, madara::expression::SystemCallType, madara::expression::SystemCallWriteFile, madara::expression::VariableIncrementNode, madara::expression::CompositeAndNode, madara::expression::CompositeEqualityNode, madara::expression::CompositeImpliesNode, madara::expression::CompositeSquareRootNode, madara::expression::VariableDivideNode, madara::expression::CompositeBothNode, madara::expression::CompositeReturnRightNode, madara::expression::CompositeSequentialNode, madara::expression::CompositeOrNode, madara::expression::CompositeAddNode, madara::expression::VariableDecrementNode, madara::expression::VariableMultiplyNode, and madara::expression::ListNode.
Definition at line 48 of file ComponentNode.cpp.
|
pure virtualinherited |
Evaluates the expression tree.
settings | settings for evaluating the node |
Implemented in madara::expression::LeafNode, madara::expression::CompositeArrayReference, madara::expression::VariableNode, madara::expression::CompositeTernaryNode, madara::expression::CompositeForLoop, madara::expression::SystemCallEval, madara::expression::SystemCallNode, madara::expression::SystemCallPrint, madara::expression::CompositeModulusNode, madara::expression::CompositeDivideNode, madara::expression::CompositePostdecrementNode, madara::expression::CompositePredecrementNode, madara::expression::CompositeFunctionNode, madara::expression::VariableCompareNode, madara::expression::CompositePostincrementNode, madara::expression::CompositePreincrementNode, madara::expression::SystemCallClearVariable, madara::expression::SystemCallDeleteVariable, madara::expression::SystemCallPrintSystemCalls, madara::expression::CompositeAssignmentNode, madara::expression::CompositeConstArray, madara::expression::SystemCallExpandEnv, madara::expression::CompositeMultiplyNode, madara::expression::SystemCallExpandStatement, madara::expression::SystemCallSetPrecision, madara::expression::SystemCallToHostDirs, madara::expression::CompositeGreaterThanEqualNode, madara::expression::CompositeGreaterThanNode, madara::expression::CompositeInequalityNode, madara::expression::CompositeLessThanEqualNode, madara::expression::CompositeLessThanNode, madara::expression::CompositeNegateNode, madara::expression::CompositeNotNode, madara::expression::CompositeSubtractNode, madara::expression::SystemCallCos, madara::expression::SystemCallFragment, madara::expression::SystemCallGetClock, madara::expression::SystemCallGetTime, madara::expression::SystemCallGetTimeSeconds, madara::expression::SystemCallLogLevel, madara::expression::SystemCallPow, madara::expression::SystemCallRandDouble, madara::expression::SystemCallRandInt, madara::expression::SystemCallReadFile, madara::expression::SystemCallSetClock, madara::expression::SystemCallSetFixed, madara::expression::SystemCallSetScientific, madara::expression::SystemCallSin, madara::expression::SystemCallSize, madara::expression::SystemCallSleep, madara::expression::SystemCallSqrt, madara::expression::SystemCallTan, madara::expression::SystemCallToBuffer, madara::expression::SystemCallToDouble, madara::expression::SystemCallToDoubles, madara::expression::SystemCallToInteger, madara::expression::SystemCallToIntegers, madara::expression::SystemCallToString, madara::expression::SystemCallType, madara::expression::SystemCallWriteFile, madara::expression::CompositeAndNode, madara::expression::CompositeEqualityNode, madara::expression::CompositeImpliesNode, madara::expression::CompositeSquareRootNode, madara::expression::CompositeBothNode, madara::expression::CompositeReturnRightNode, madara::expression::CompositeSequentialNode, madara::expression::CompositeOrNode, madara::expression::VariableIncrementNode, madara::expression::CompositeAddNode, madara::expression::VariableDecrementNode, madara::expression::VariableDivideNode, madara::expression::VariableMultiplyNode, and madara::expression::ListNode.
|
virtualinherited |
Returns the value of the node.
Reimplemented in madara::expression::LeafNode, madara::expression::CompositeArrayReference, madara::expression::CompositeTernaryNode, madara::expression::SystemCallEval, madara::expression::SystemCallPrint, madara::expression::VariableCompareNode, madara::expression::CompositeForLoop, madara::expression::SystemCallNode, madara::expression::CompositeFunctionNode, madara::expression::SystemCallClearVariable, madara::expression::SystemCallDeleteVariable, madara::expression::SystemCallPrintSystemCalls, madara::expression::CompositePostdecrementNode, madara::expression::CompositePostincrementNode, madara::expression::CompositePredecrementNode, madara::expression::CompositePreincrementNode, madara::expression::SystemCallExpandEnv, madara::expression::CompositeAssignmentNode, madara::expression::CompositeConstArray, madara::expression::CompositeModulusNode, madara::expression::SystemCallExpandStatement, madara::expression::SystemCallSetPrecision, madara::expression::SystemCallToHostDirs, madara::expression::CompositeDivideNode, madara::expression::CompositeMultiplyNode, madara::expression::SystemCallCos, madara::expression::SystemCallFragment, madara::expression::SystemCallGetClock, madara::expression::SystemCallGetTime, madara::expression::SystemCallGetTimeSeconds, madara::expression::SystemCallLogLevel, madara::expression::SystemCallPow, madara::expression::SystemCallRandDouble, madara::expression::SystemCallRandInt, madara::expression::SystemCallReadFile, madara::expression::SystemCallSetClock, madara::expression::SystemCallSetFixed, madara::expression::SystemCallSetScientific, madara::expression::SystemCallSin, madara::expression::SystemCallSize, madara::expression::SystemCallSleep, madara::expression::SystemCallSqrt, madara::expression::SystemCallTan, madara::expression::SystemCallToBuffer, madara::expression::SystemCallToDouble, madara::expression::SystemCallToDoubles, madara::expression::SystemCallToInteger, madara::expression::SystemCallToIntegers, madara::expression::SystemCallToString, madara::expression::SystemCallType, madara::expression::SystemCallWriteFile, madara::expression::CompositeNegateNode, madara::expression::CompositeNotNode, madara::expression::CompositeSubtractNode, madara::expression::VariableIncrementNode, madara::expression::CompositeSquareRootNode, madara::expression::VariableDecrementNode, madara::expression::VariableDivideNode, madara::expression::VariableMultiplyNode, madara::expression::CompositeGreaterThanEqualNode, madara::expression::CompositeGreaterThanNode, madara::expression::CompositeInequalityNode, madara::expression::CompositeLessThanEqualNode, madara::expression::CompositeLessThanNode, madara::expression::CompositeEqualityNode, madara::expression::CompositeImpliesNode, madara::expression::VariableNode, madara::expression::CompositeBothNode, madara::expression::CompositeReturnRightNode, madara::expression::CompositeSequentialNode, madara::expression::CompositeAndNode, madara::expression::CompositeOrNode, madara::expression::ListNode, and madara::expression::CompositeAddNode.
Definition at line 27 of file ComponentNode.cpp.
|
virtualinherited |
Returns the left expression.
Reimplemented in madara::expression::CompositeBinaryNode.
Definition at line 34 of file ComponentNode.cpp.
|
pure virtualinherited |
Prunes the expression tree of unnecessary nodes.
Implemented in madara::expression::CompositeArrayReference, madara::expression::LeafNode, madara::expression::VariableNode, madara::expression::CompositeTernaryNode, madara::expression::SystemCallEval, madara::expression::SystemCallPrint, madara::expression::CompositeForLoop, madara::expression::SystemCallNode, madara::expression::VariableCompareNode, madara::expression::CompositeFunctionNode, madara::expression::CompositeModulusNode, madara::expression::CompositePostdecrementNode, madara::expression::CompositePredecrementNode, madara::expression::SystemCallClearVariable, madara::expression::SystemCallDeleteVariable, madara::expression::SystemCallPrintSystemCalls, madara::expression::CompositeDivideNode, madara::expression::CompositePostincrementNode, madara::expression::CompositePreincrementNode, madara::expression::SystemCallExpandEnv, madara::expression::CompositeAssignmentNode, madara::expression::CompositeConstArray, madara::expression::SystemCallExpandStatement, madara::expression::SystemCallSetPrecision, madara::expression::SystemCallToHostDirs, madara::expression::CompositeMultiplyNode, madara::expression::SystemCallCos, madara::expression::SystemCallFragment, madara::expression::SystemCallGetClock, madara::expression::SystemCallGetTime, madara::expression::SystemCallGetTimeSeconds, madara::expression::SystemCallLogLevel, madara::expression::SystemCallPow, madara::expression::SystemCallRandDouble, madara::expression::SystemCallRandInt, madara::expression::SystemCallReadFile, madara::expression::SystemCallSetClock, madara::expression::SystemCallSetFixed, madara::expression::SystemCallSetScientific, madara::expression::SystemCallSin, madara::expression::SystemCallSize, madara::expression::SystemCallSleep, madara::expression::SystemCallSqrt, madara::expression::SystemCallTan, madara::expression::SystemCallToBuffer, madara::expression::SystemCallToDouble, madara::expression::SystemCallToDoubles, madara::expression::SystemCallToInteger, madara::expression::SystemCallToIntegers, madara::expression::SystemCallToString, madara::expression::SystemCallType, madara::expression::SystemCallWriteFile, madara::expression::CompositeNegateNode, madara::expression::CompositeNotNode, madara::expression::CompositeSubtractNode, madara::expression::CompositeGreaterThanEqualNode, madara::expression::CompositeGreaterThanNode, madara::expression::CompositeInequalityNode, madara::expression::CompositeLessThanEqualNode, madara::expression::CompositeLessThanNode, madara::expression::CompositeSquareRootNode, madara::expression::CompositeEqualityNode, madara::expression::VariableIncrementNode, madara::expression::CompositeAndNode, madara::expression::CompositeBothNode, madara::expression::CompositeImpliesNode, madara::expression::CompositeReturnRightNode, madara::expression::CompositeSequentialNode, madara::expression::VariableDecrementNode, madara::expression::VariableDivideNode, madara::expression::VariableMultiplyNode, madara::expression::CompositeOrNode, madara::expression::CompositeAddNode, and madara::expression::ListNode.
|
virtual |
Returns the right expression.
Reimplemented from madara::expression::ComponentNode.
Definition at line 24 of file CompositeUnaryNode.cpp.
|
inherited |
Sets the logger for printing errors and debugging info.
logger | the logger to use |
Definition at line 53 of file ComponentNode.cpp.
|
protectedinherited |
handle the context
Definition at line 96 of file ComponentNode.h.
|
protected |
Right expression.
Definition at line 43 of file CompositeUnaryNode.h.