#ifndef MBGL_STYLE_FILTER_EXPRESSION #define MBGL_STYLE_FILTER_EXPRESSION #include #include #include #include namespace mbgl { typedef mapbox::util::variant< struct NullExpression, struct EqualsExpression, struct NotEqualsExpression, struct LessThanExpression, struct LessThanEqualsExpression, struct GreaterThanExpression, struct GreaterThanEqualsExpression, struct InExpression, struct NotInExpression, struct AnyExpression, struct AllExpression, struct NoneExpression > FilterExpression; FilterExpression parseFilterExpression(const JSValue&); template bool evaluate(const FilterExpression&, const Extractor&); struct NullExpression { template bool evaluate(const Extractor&) const { return true; } }; struct EqualsExpression { std::string key; Value value; template bool evaluate(const Extractor&) const; }; struct NotEqualsExpression { std::string key; Value value; template bool evaluate(const Extractor&) const; }; struct LessThanExpression { std::string key; Value value; template bool evaluate(const Extractor&) const; }; struct LessThanEqualsExpression { std::string key; Value value; template bool evaluate(const Extractor&) const; }; struct GreaterThanExpression { std::string key; Value value; template bool evaluate(const Extractor&) const; }; struct GreaterThanEqualsExpression { std::string key; Value value; template bool evaluate(const Extractor&) const; }; struct InExpression { std::string key; std::vector values; template bool evaluate(const Extractor&) const; }; struct NotInExpression { std::string key; std::vector values; template bool evaluate(const Extractor&) const; }; struct AnyExpression { std::vector expressions; template bool evaluate(const Extractor&) const; }; struct AllExpression { std::vector expressions; template bool evaluate(const Extractor&) const; }; struct NoneExpression { std::vector expressions; template bool evaluate(const Extractor&) const; }; } // namespace mbgl #endif