MADARA  3.1.8
madara::expression::SystemCallTan Class Reference

Returns the tangent of a term in radians. More...

#include <SystemCallTan.h>

Inheritance diagram for madara::expression::SystemCallTan:
Collaboration diagram for madara::expression::SystemCallTan:

Public Member Functions

 SystemCallTan (madara::knowledge::ThreadSafeContext &context, const ComponentNodes &nodes)
 Constructor. More...
 
virtual ~SystemCallTan (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_
 

Detailed Description

Returns the tangent of a term in radians.

Definition at line 24 of file SystemCallTan.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 12 of file SystemCallTan.cpp.

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

Destructor.

Definition at line 21 of file SystemCallTan.cpp.

Member Function Documentation

void madara::expression::SystemCallTan::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 113 of file SystemCallTan.cpp.

madara::knowledge::KnowledgeRecord madara::expression::SystemCallTan::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 87 of file SystemCallTan.cpp.

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

Returns the value of the node.

Returns
value of the node

Reimplemented from madara::expression::SystemCallNode.

Definition at line 26 of file SystemCallTan.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::SystemCallTan::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 35 of file SystemCallTan.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::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: