44 this->enclosed.push_back(enclosed);
57 : operation(operation)
60 assert(enclosed.size());
66 string first =
enclosed.front()->eval(obj);
78 Conv<bool>(first, &b);
125 if(it != obj->
getTags().cend())
127 return it->second.str();
138 Conv<bool>(first, &condition);
150 Color base(0xFFFFFFFF);
151 Color top(0xFFFFFFFF);
188 result = base * randColor;
192 result = base + randColor * (top - base).max(
Color(
uint32(0x00000000)));
198 std::ostringstream os;
200 os <<
'#' << std::hex << std::setw(6) << std::setfill(
'0') << (col & 0xFFFFFF);
201 os << std::hex << std::setw(2) << std::setfill('0') << (col >> 24);
210 assert(!
"Unknown operation executed");
TESTABLE const DataMap< CachedString, CachedString > & getTags() const
Returns a map with key-to-tag-mapping for osm-tags.
bool Conv(const string &str, bool *out, bool tryToCache)
Use some extra function for bool conversion.
FunctionEnum
Enum with all functions.
Represents a string which could be cached into an internal cache.
FunctionOperationNode(const node_ptr &enclosed)
Creates a new Function operation which simply does nothing.
std::vector< node_ptr > enclosed
The subexpressions enclosed by this operation.
base_type::node_ptr node_ptr
This file is part of alaCarte.
op::FunctionEnum operation
The operation type.
std::size_t hash_value(const TileIdentifier &ti)
Returns a hash for the TileIdentifier.
virtual string eval(GeoObject *obj) const
Evaluates a subtree under this node.
string ToString(const bool &v)