MADARA  3.1.8
madara::expression::SystemCallPrintSystemCalls Class Reference

Prints all supported system calls. More...

#include <SystemCallPrintSystemCalls.h>

Inheritance diagram for madara::expression::SystemCallPrintSystemCalls:
Collaboration diagram for madara::expression::SystemCallPrintSystemCalls:

Public Member Functions

 SystemCallPrintSystemCalls (madara::knowledge::ThreadSafeContext &context, const ComponentNodes &nodes)
 Constructor. More...
 
virtual ~SystemCallPrintSystemCalls (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)
 Evaluates the expression tree. More...
 
virtual madara::knowledge::KnowledgeRecord item (void) const
 Returns the value of the node. More...
 
virtual ComponentNodeleft (void) const
 Returns the left expression. More...
 
virtual madara::knowledge::KnowledgeRecord prune (bool &can_change)
 Prunes the expression tree of unnecessary nodes. More...
 
virtual ComponentNoderight (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

madara::knowledge::ThreadSafeContextcontext_
 
logger::Loggerlogger_
 handle the context More...
 
ComponentNodes nodes_
 

Static Private Attributes

static SystemCallsHelp calls_
 

Detailed Description

Prints all supported system calls.

Definition at line 27 of file SystemCallPrintSystemCalls.h.

Constructor & Destructor Documentation

madara::expression::SystemCallPrintSystemCalls::SystemCallPrintSystemCalls ( madara::knowledge::ThreadSafeContext context,
const ComponentNodes nodes 
)

Constructor.

Definition at line 14 of file SystemCallPrintSystemCalls.cpp.

madara::expression::SystemCallPrintSystemCalls::~SystemCallPrintSystemCalls ( void  )
virtual

Destructor.

Definition at line 23 of file SystemCallPrintSystemCalls.cpp.

Member Function Documentation

void madara::expression::SystemCallPrintSystemCalls::accept ( Visitor visitor) const
virtual

Accepts a visitor subclassed from the Visitor class.

Parameters
visitorvisitor instance to use

Reimplemented from madara::expression::SystemCallNode.

Definition at line 323 of file SystemCallPrintSystemCalls.cpp.

madara::knowledge::KnowledgeRecord madara::expression::SystemCallPrintSystemCalls::evaluate ( const madara::knowledge::KnowledgeUpdateSettings settings)
virtual

Evaluates the expression tree.

Evaluates the node and its children.

Returns
value of current contained expression tree

This does not prune any of the expression tree, and is much faster than the prune function

Implements madara::expression::SystemCallNode.

Definition at line 283 of file SystemCallPrintSystemCalls.cpp.

madara::knowledge::KnowledgeRecord madara::expression::SystemCallPrintSystemCalls::item ( void  ) const
virtual

Returns the value of the node.

Returns
value of the node

Reimplemented from madara::expression::SystemCallNode.

Definition at line 28 of file SystemCallPrintSystemCalls.cpp.

madara::expression::ComponentNode * madara::expression::ComponentNode::left ( void  ) const
virtualinherited

Returns the left expression.

Returns
a pointer to the left expression

Reimplemented in madara::expression::CompositeBinaryNode.

Definition at line 34 of file ComponentNode.cpp.

madara::knowledge::KnowledgeRecord madara::expression::SystemCallPrintSystemCalls::prune ( bool &  can_change)
virtual

Prunes the expression tree of unnecessary nodes.

Prune the tree of unnecessary nodes.

Parameters
can_changeset to true if variable nodes are contained
Returns
value of current contained expression tree

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::SystemCallNode.

Definition at line 37 of file SystemCallPrintSystemCalls.cpp.

madara::expression::ComponentNode * madara::expression::ComponentNode::right ( void  ) const
virtualinherited

Returns the right expression.

Returns
a pointer to the right expression

Reimplemented in madara::expression::CompositeUnaryNode.

Definition at line 41 of file ComponentNode.cpp.

void madara::expression::ComponentNode::set_logger ( logger::Logger logger)
inherited

Sets the logger for printing errors and debugging info.

Parameters
loggerthe logger to use

Definition at line 53 of file ComponentNode.cpp.

Member Data Documentation

madara::expression::SystemCallsHelp madara::expression::SystemCallPrintSystemCalls::calls_
staticprivate

Definition at line 69 of file SystemCallPrintSystemCalls.h.

madara::knowledge::ThreadSafeContext& madara::expression::SystemCallNode::context_
protectedinherited

Definition at line 76 of file SystemCallNode.h.

logger::Logger* madara::expression::ComponentNode::logger_
protectedinherited

handle the context

Definition at line 96 of file ComponentNode.h.

ComponentNodes madara::expression::CompositeTernaryNode::nodes_
protectedinherited

Definition at line 76 of file CompositeTernaryNode.h.


The documentation for this class was generated from the following files: