Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
PointFilter Class Reference

#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 &params)
 Deserialization constructor, forms parameters back from a string given by getParams. More...
 
PointFiltersetHeight (double top, double bottom)
 
PointFiltersetRange (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...
 
Checkerm_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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PointFilter() [1/2]

PointFilter::PointFilter ( )

◆ PointFilter() [2/2]

PointFilter::PointFilter ( const std::string &  params)

Deserialization constructor, forms parameters back from a string given by getParams.

◆ ~PointFilter()

PointFilter::~PointFilter ( )

Member Function Documentation

◆ check()

bool PointFilter::check ( double *  point)
inline

Check a point, returning success if all contained Checker functions accept that point (implemented in .icc)

◆ createCheckers()

void PointFilter::createCheckers ( )
private

Allocation of the checkers.

◆ getParams()

std::string PointFilter::getParams ( )

Serialization function to convert it into a string, usable in the constructor.

◆ setHeight()

PointFilter& PointFilter::setHeight ( double  top,
double  bottom 
)

◆ setRange()

PointFilter& PointFilter::setRange ( double  maxDist,
double  minDist 
)

Friends And Related Function Documentation

◆ CheckerFactory

template<typename T >
friend struct CheckerFactory
friend

Definition at line 54 of file pointfilter.h.

Member Data Documentation

◆ factory

std::map<std::string, Checker* (*)(const std::string&)>* PointFilter::factory
staticprivate

Definition at line 55 of file pointfilter.h.

◆ m_changed

bool PointFilter::m_changed
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.

◆ m_checker

Checker* PointFilter::m_checker
private

created in the first check call with the changed flag set

Definition at line 48 of file pointfilter.h.

◆ m_params

std::map<std::string, std::string> PointFilter::m_params
private

Storage for parameter keys and values.

Definition at line 42 of file pointfilter.h.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:26