45 const Json &elem_in_data);
67 virtual ~
FilSet() =
default;
This file has a definition of Filter class, which is a subclass of Updater class. ...
FilSet applies a filter defined by sets of acceptable values.
Filter removes elements from array Element::data if the elements fail user-defined criteria...
std::function< bool(const Json &)> JsonToBoolFunc
An alias for a function accepts a Json object and returns a bool.
FilSet(const Map< Str, Set< Json >> &acceptable_value_sets_)
Constructor of FilSet class.
std::string Str
Str is an alias for string.
nlohmann::json Json
Json is an alias for nlohmann::json.
std::unordered_set< T > Set
Set is an alias for unordered set (same as set in Python).
const bool check_if_pass_data_elem(const Json &elem_in_data)
Check if an element in data array can pass this filter.
virtual void compute_impl(Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override
This method overrides Updater::compute_impl.
Map< Str, Set< Json > > acceptable_value_sets
std::function< void(const Json &)> JsonToVoidFunc
An alias for a function accepts a Json object.
std::unordered_map< T, U > Map
Map is an alias for unordered map (same as dict in Python).