blob: a4a4098b3f8f642ea1c845964c9fa3c39d2feb43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#pragma once
#include <mbgl/style/filter.hpp>
#include <mbgl/util/geometry.hpp>
#include <type_traits>
namespace mbgl {
namespace style {
/*
A visitor that evaluates a `Filter` for a given feature.
Use via `Filter::operator()`. For example:
if (filter(feature)) {
// matches the filter
} else {
// does not match
}
*/
class FilterEvaluator {
public:
const expression::EvaluationContext context;
bool operator()(const NullFilter&) const;
bool operator()(const EqualsFilter& filter) const;
bool operator()(const NotEqualsFilter& filter) const;
bool operator()(const LessThanFilter& filter) const;
bool operator()(const LessThanEqualsFilter& filter) const;
bool operator()(const GreaterThanFilter& filter) const;
bool operator()(const GreaterThanEqualsFilter& filter) const;
bool operator()(const InFilter& filter) const;
bool operator()(const NotInFilter& filter) const;
bool operator()(const AnyFilter& filter) const;
bool operator()(const AllFilter& filter) const;
bool operator()(const NoneFilter& filter) const;
bool operator()(const HasFilter& filter) const;
bool operator()(const NotHasFilter& filter) const;
bool operator()(const TypeEqualsFilter& filter) const;
bool operator()(const TypeNotEqualsFilter& filter) const;
bool operator()(const TypeInFilter& filter) const;
bool operator()(const TypeNotInFilter& filter) const;
bool operator()(const IdentifierEqualsFilter& filter) const;
bool operator()(const IdentifierNotEqualsFilter& filter) const;
bool operator()(const IdentifierInFilter& filter) const;
bool operator()(const IdentifierNotInFilter& filter) const;
bool operator()(const HasIdentifierFilter&) const;
bool operator()(const NotHasIdentifierFilter&) const;
bool operator()(const ExpressionFilter&) const;
};
} // namespace style
} // namespace mbgl
|