diff options
Diffstat (limited to 'include/mbgl/style/expression/compound_expression.hpp')
-rw-r--r-- | include/mbgl/style/expression/compound_expression.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/mbgl/style/expression/compound_expression.hpp b/include/mbgl/style/expression/compound_expression.hpp index 6baaae862f..431afb4d13 100644 --- a/include/mbgl/style/expression/compound_expression.hpp +++ b/include/mbgl/style/expression/compound_expression.hpp @@ -36,7 +36,7 @@ template <typename T> struct Varargs : std::vector<T> { using std::vector<T>::vector; }; namespace detail { -// Base class for the Signature<Fn> structs that are used to determine the +// Base class for the Signature<Fn> structs that are used to determine // each CompoundExpression definition's type::Type data from the type of its // "evaluate" function. struct SignatureBase { @@ -137,10 +137,21 @@ ParseResult parseCompoundExpression(const std::string name, const mbgl::style::c ParseResult createCompoundExpression(const CompoundExpressionRegistry::Definition& definition, std::vector<std::unique_ptr<Expression>> args, ParsingContext& ctx); - + ParseResult createCompoundExpression(const std::string& name, std::vector<std::unique_ptr<Expression>> args, ParsingContext& ctx); +// Convenience method for use expressions that have 0, 1, or 2 args. +ParseResult createCompoundExpression(const std::string& name, ParsingContext& ctx); + +ParseResult createCompoundExpression(const std::string& name, + std::unique_ptr<Expression> arg1, + ParsingContext& ctx); + +ParseResult createCompoundExpression(const std::string& name, + std::unique_ptr<Expression> arg1, + std::unique_ptr<Expression> arg2, + ParsingContext& ctx); } // namespace expression } // namespace style |