MADARA
3.1.8
|
Defines a terminal node that contains a list. More...
#include <ListNode.h>
Public Member Functions | |
ListNode (madara::knowledge::ThreadSafeContext &context) | |
Ctor. More... | |
virtual | ~ListNode (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 | |
madara::knowledge::ThreadSafeContext & | context_ |
::std::list< ComponentNode * > | list_ |
list of trees in a parameter list More... | |
Defines a terminal node that contains a list.
Definition at line 27 of file ListNode.h.
madara::expression::ListNode::ListNode | ( | madara::knowledge::ThreadSafeContext & | context | ) |
Ctor.
Definition at line 12 of file ListNode.cpp.
|
virtual |
Dtor.
Definition at line 19 of file ListNode.cpp.
|
virtual |
Define the accept() operation used for the Visitor pattern.
Reimplemented from madara::expression::ComponentNode.
Definition at line 26 of file ListNode.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 55 of file ListNode.cpp.
|
virtual |
Return the item stored in the node.
Reimplemented from madara::expression::ComponentNode.
Definition at line 32 of file ListNode.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 42 of file ListNode.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 |
Definition at line 54 of file ListNode.h.
|
private |
list of trees in a parameter list
Definition at line 57 of file ListNode.h.
|
protectedinherited |
handle the context
Definition at line 96 of file ComponentNode.h.