|
ppap4lmp
0.7.2
|
FilSet applies a filter defined by sets of acceptable values. More...
#include <fil_set.h>
Public Member Functions | |
| FilSet (const Map< Str, Set< Json >> &acceptable_value_sets_) | |
| Constructor of FilSet class. More... | |
Public Member Functions inherited from Filter | |
| Updater ()=default | |
| Constructor of Updater class. More... | |
Public Member Functions inherited from Updater | |
| Updater ()=default | |
| Constructor of Updater class. More... | |
| void | compute (const ElPtr &elem, const int elementid, Json &data) |
| Managing computation to update Element::data. More... | |
| void | remove_from_skippable_elementids (const int elementid) |
| Remove Element::elementid from skippable_elementids. More... | |
| const ShPtr< Generator > & | get_ext_generator () |
| Get ext_generator of this object. More... | |
Protected Member Functions | |
| virtual void | compute_impl (Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override |
| This method overrides Updater::compute_impl. | |
Protected Member Functions inherited from Filter | |
| virtual void | compute_body (const ElPtr &elem, Json &data) override |
| Filter elements from array Element::data given as a mutable reference. More... | |
Protected Member Functions inherited from Updater | |
| virtual void | compute_common (const ElPtr &elem, Json &data) |
| Common part of compute_body. More... | |
Private Member Functions | |
| const bool | check_if_pass_data_elem (const Json &elem_in_data) |
| Check if an element in data array can pass this filter. More... | |
Private Attributes | |
| Map< Str, Set< Json > > | acceptable_value_sets |
Additional Inherited Members | |
Protected Attributes inherited from Updater | |
| ShPtr< Generator > | ext_generator |
FilSet applies a filter defined by sets of acceptable values.
An object of this class has a filter defined by acceptable_value_sets, which is a dictionary consisting of pairs of a string key and a set of values which can pass the filter.
An element of array Element::data can pass this filter only if its value for every key in acceptable_value_sets is included in the corresponding set (a value of acceptable_value_sets).
About usage in Python, please see pybind::py_fil_set.
Constructor of FilSet class.
| acceptable_value_sets_ | Dictionary from a string key for property to acceptable values of that property. Note that an Element object, where the constructed object is appended to, must has properties corresponding to keys in this parameter. This parameter is assigned to acceptable_value_sets. |
Definition at line 13 of file fil_set.cpp.
|
private |
Check if an element in data array can pass this filter.
| elem_in_data | An element in data array. |
elem_in_data can pass this filter. Definition at line 21 of file fil_set.cpp.