alaCarte Maps
Renderer for OpenStreetMap tiles
eval::FunctionOperationNode Class Reference

Represents a node which executes a certain operation on 1 to n subexpressions. More...

#include <function_operation_node.hpp>

Inheritance diagram for eval::FunctionOperationNode:
eval::STNode

Public Types

typedef STNode base_type
 
typedef base_type::node_ptr node_ptr
 
- Public Types inherited from eval::STNode
typedef shared_ptr< STNodenode_ptr
 Shared ptr to this node. More...
 

Public Member Functions

 FunctionOperationNode (const node_ptr &enclosed)
 Creates a new Function operation which simply does nothing. More...
 
 FunctionOperationNode (op::FunctionEnum operation, const std::vector< node_ptr > &enclosed)
 Creates a new function operation with a certain operation and any number of subexpressions. More...
 
virtual string eval (GeoObject *obj) const
 Evaluates a subtree under this node. More...
 

Private Attributes

op::FunctionEnum operation
 The operation type. More...
 
std::vector< node_ptrenclosed
 The subexpressions enclosed by this operation. More...
 

Detailed Description

Represents a node which executes a certain operation on 1 to n subexpressions.

Definition at line 69 of file function_operation_node.hpp.

Member Typedef Documentation

Constructor & Destructor Documentation

eval::FunctionOperationNode::FunctionOperationNode ( const node_ptr enclosed)

Creates a new Function operation which simply does nothing.

Can only have one subexpression

Definition at line 41 of file function_operation_node.cpp.

eval::FunctionOperationNode::FunctionOperationNode ( op::FunctionEnum  operation,
const std::vector< node_ptr > &  enclosed 
)

Creates a new function operation with a certain operation and any number of subexpressions.

Note
Even you can pass any number of subexpressions, some operations need a certain number ob expressions!
Parameters
operationexecuted by this node
enclosedexpressions evaluated by this node to execute the operation

Definition at line 56 of file function_operation_node.cpp.

Member Function Documentation

string eval::FunctionOperationNode::eval ( GeoObject obj) const
virtual

Evaluates a subtree under this node.

Parameters
objwhich is used to execute the eval tree

Reimplemented from eval::STNode.

Definition at line 64 of file function_operation_node.cpp.

Member Data Documentation

std::vector<node_ptr> eval::FunctionOperationNode::enclosed
private

The subexpressions enclosed by this operation.

Definition at line 84 of file function_operation_node.hpp.

op::FunctionEnum eval::FunctionOperationNode::operation
private

The operation type.

Definition at line 82 of file function_operation_node.hpp.


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