diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2020-02-27 13:09:39 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2020-02-27 17:14:20 -0800 |
commit | 206b9bde5ed9204de6ec18c0d37495db7c30aa09 (patch) | |
tree | 0049d4d6bd9195c194c0fe96665ba72c92f00da5 /platform/darwin/src/MGLValueEvaluator.h | |
parent | bd252e16a3574efd11cca57917f52e6d1b2dd0a2 (diff) | |
download | qtlocation-mapboxgl-206b9bde5ed9204de6ec18c0d37495db7c30aa09.tar.gz |
[ios, macos] Deleted iOS/macOS map SDK sources, resources, scripts
Diffstat (limited to 'platform/darwin/src/MGLValueEvaluator.h')
-rw-r--r-- | platform/darwin/src/MGLValueEvaluator.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/platform/darwin/src/MGLValueEvaluator.h b/platform/darwin/src/MGLValueEvaluator.h deleted file mode 100644 index 2779deba90..0000000000 --- a/platform/darwin/src/MGLValueEvaluator.h +++ /dev/null @@ -1,49 +0,0 @@ -#import <Foundation/Foundation.h> - -#import <mbgl/util/geometry.hpp> - -/** - Recursively transforms a C++ type into the corresponding Foundation type. - */ -class ValueEvaluator { -public: - id operator()(const mbgl::NullValue &) const { - return [NSNull null]; - } - - id operator()(const bool &value) const { - return value ? @YES : @NO; - } - - id operator()(const uint64_t &value) const { - return @(value); - } - - id operator()(const int64_t &value) const { - return @(value); - } - - id operator()(const double &value) const { - return @(value); - } - - id operator()(const std::string &value) const { - return @(value.c_str()); - } - - id operator()(const std::vector<mbgl::Value> &values) const { - NSMutableArray *objects = [NSMutableArray arrayWithCapacity:values.size()]; - for (const auto &v : values) { - [objects addObject:mbgl::Value::visit(v, *this)]; - } - return objects; - } - - id operator()(const std::unordered_map<std::string, mbgl::Value> &items) const { - NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithCapacity:items.size()]; - for (auto &item : items) { - attributes[@(item.first.c_str())] = mbgl::Value::visit(item.second, *this); - } - return attributes; - } -}; |