ppap4lmp  0.7.2
Filter Class Reference

Filter removes elements from array Element::data if the elements fail user-defined criteria. More...

#include <filter.h>

Inheritance diagram for Filter:
Collaboration diagram for Filter:

Public Member Functions

 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_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...
 
virtual void compute_impl (Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys)=0
 Implementation of computation updating Element::data. More...
 

Additional Inherited Members

- Protected Attributes inherited from Updater
ShPtr< Generatorext_generator
 

Detailed Description

Filter removes elements from array Element::data if the elements fail user-defined criteria.

This class inherits Updater class and overrides Updater::compute_boby. This class is an abstract class and has a pure virtual function, Filter::compute_impl.

Name of subclass of this class should be prefixed by Fil. Note that Filter do nothing for non-array Element::data.

Definition at line 25 of file filter.h.

Member Function Documentation

◆ compute_body()

void Filter::compute_body ( const ElPtr elem,
Json data 
)
overrideprotectedvirtual

Filter elements from array Element::data given as a mutable reference.

Parameters
elemShared pointer to an Element object to be filtered.
dataMutable reference to Element::data to be filtered.
Returns
None.

Each element in the array data remains unchanged.

Implements Updater.

Definition at line 16 of file filter.cpp.

Here is the call graph for this function:

◆ Updater()

Updater::Updater
default

Constructor of Updater class.

This constructor is thread-unsafe because it accesses its members thread-globally. Ensure this constructor is not called in a multithreading context. Please be careful that constructors of subclasses of this class are also thread-unsafe.


The documentation for this class was generated from the following files: