alaCarte Maps
Renderer for OpenStreetMap tiles
function_operation_node.hpp
Go to the documentation of this file.
1 
21 #pragma once
22 #ifndef _FUNCTION_OPERATION_NODE_HPP
23 #define _FUNCTION_OPERATION_NODE_HPP
24 
25 
26 #include "settings.hpp"
27 #include "stnode.hpp"
28 
29 
30 class GeoObject;
31 
32 namespace eval {
33 
34 namespace op {
35 
38 {
39  // Simple (...)
41 
42  // Canonical
44  Str,
45  Num,
46 
47  // Mathematics
49  Int,
50  Not,
51  //Metric,
52  //ZMetric,
53 
54  // Functions
55  Tag,
58 };
59 
60 }
61 
62 
63 
64 
70  : public STNode
71 {
72 public:
73  typedef STNode base_type;
75 
76  FunctionOperationNode(const node_ptr& enclosed);
77  FunctionOperationNode(op::FunctionEnum operation, const std::vector<node_ptr>& enclosed);
78 
79  virtual string eval(GeoObject* obj) const;
80 private:
84  std::vector<node_ptr> enclosed;
85 };
86 
87 
88 
89 
90 }
91 
92 
93 #endif
FunctionEnum
Enum with all functions.
std::vector< node_ptr > enclosed
The subexpressions enclosed by this operation.
This file is part of alaCarte.
The interface for nodes in the syntax tree.
Definition: stnode.hpp:37
op::FunctionEnum operation
The operation type.
shared_ptr< STNode > node_ptr
Shared ptr to this node.
Definition: stnode.hpp:41
Represents a node which executes a certain operation on 1 to n subexpressions.