diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/expression/dsl.hpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/include/mbgl/style/expression/dsl.hpp b/include/mbgl/style/expression/dsl.hpp index bd94a765e7..dc0f1ab90f 100644 --- a/include/mbgl/style/expression/dsl.hpp +++ b/include/mbgl/style/expression/dsl.hpp @@ -31,14 +31,21 @@ std::unique_ptr<Expression> literal(Value value); std::unique_ptr<Expression> literal(std::initializer_list<double> value); std::unique_ptr<Expression> literal(std::initializer_list<const char *> value); -std::unique_ptr<Expression> assertion(type::Type, std::unique_ptr<Expression>); -std::unique_ptr<Expression> number(std::unique_ptr<Expression>); -std::unique_ptr<Expression> string(std::unique_ptr<Expression>); -std::unique_ptr<Expression> boolean(std::unique_ptr<Expression>); - -std::unique_ptr<Expression> toColor(std::unique_ptr<Expression>); -std::unique_ptr<Expression> toString(std::unique_ptr<Expression>); -std::unique_ptr<Expression> toFormatted(std::unique_ptr<Expression>); +std::unique_ptr<Expression> assertion(type::Type, std::unique_ptr<Expression>, + optional<std::unique_ptr<Expression>> def = {}); +std::unique_ptr<Expression> number(std::unique_ptr<Expression>, + optional<std::unique_ptr<Expression>> def = {}); +std::unique_ptr<Expression> string(std::unique_ptr<Expression>, + optional<std::unique_ptr<Expression>> def = {}); +std::unique_ptr<Expression> boolean(std::unique_ptr<Expression>, + optional<std::unique_ptr<Expression>> def = {}); + +std::unique_ptr<Expression> toColor(std::unique_ptr<Expression>, + optional<std::unique_ptr<Expression>> def = {}); +std::unique_ptr<Expression> toString(std::unique_ptr<Expression>, + optional<std::unique_ptr<Expression>> def = {}); +std::unique_ptr<Expression> toFormatted(std::unique_ptr<Expression>, + optional<std::unique_ptr<Expression>> def = {}); std::unique_ptr<Expression> get(const char* value); std::unique_ptr<Expression> get(std::unique_ptr<Expression>); |