#include <pointfilter.h>
Public Member Functions | |
bool | check (double *point) |
Check a point, returning success if all contained Checker functions accept that point (implemented in .icc) More... | |
std::string | getParams () |
Serialization function to convert it into a string, usable in the constructor. More... | |
PointFilter () | |
PointFilter (const std::string ¶ms) | |
Deserialization constructor, forms parameters back from a string given by getParams. More... | |
PointFilter & | setHeight (double top, double bottom) |
PointFilter & | setRange (double maxDist, double minDist) |
~PointFilter () | |
Private Member Functions | |
void | createCheckers () |
Allocation of the checkers. More... | |
Private Attributes | |
bool | m_changed |
If either not created yet or parameters get changed, this flag will cause check to create a new Checker chain. More... | |
Checker * | m_checker |
created in the first check call with the changed flag set More... | |
std::map< std::string, std::string > | m_params |
Storage for parameter keys and values. More... | |
Static Private Attributes | |
static std::map< std::string, Checker *(*)(const std::string &)> * | factory |
Friends | |
template<typename T > | |
struct | CheckerFactory |
Flexible filtering class for parsing a set of points.
This class is configurable with parameters for range and height and can be transferred via the use of a parameter string. Use on a point set via repeated use of the check function, which creates the internal Checker structures once for each change to the parameters. The amount of tests is held as minimal as possible.
Definition at line 23 of file pointfilter.h.
PointFilter::PointFilter | ( | ) |
PointFilter::PointFilter | ( | const std::string & | params | ) |
Deserialization constructor, forms parameters back from a string given by getParams.
PointFilter::~PointFilter | ( | ) |
|
inline |
Check a point, returning success if all contained Checker functions accept that point (implemented in .icc)
|
private |
Allocation of the checkers.
std::string PointFilter::getParams | ( | ) |
Serialization function to convert it into a string, usable in the constructor.
PointFilter& PointFilter::setHeight | ( | double | top, |
double | bottom | ||
) |
PointFilter& PointFilter::setRange | ( | double | maxDist, |
double | minDist | ||
) |
|
friend |
Definition at line 54 of file pointfilter.h.
|
staticprivate |
Definition at line 55 of file pointfilter.h.
|
private |
If either not created yet or parameters get changed, this flag will cause check to create a new Checker chain.
Definition at line 45 of file pointfilter.h.
|
private |
created in the first check call with the changed flag set
Definition at line 48 of file pointfilter.h.
|
private |
Storage for parameter keys and values.
Definition at line 42 of file pointfilter.h.