PLaSK library
|
Construct filters using data from XML. More...
#include <plask/filters/factory.hpp>
Classes | |
struct | Register |
Helper which calls getDefault().add(typeName, filterCreator) in constructor. More... | |
struct | RegisterStandard |
Helper which calls getDefault().addStandard<PropertyTag>() in constructor. More... | |
Public Types | |
typedef std::function< shared_ptr< Solver >(XMLReader &reader, Manager &manager)> | FilterCreator |
Public Member Functions | |
shared_ptr< Solver > | get (XMLReader &reader, Manager &manager) |
Try to get filter from tag which is pointed by reader . | |
void | add (const std::string typeName, FilterCreator filterCreator) |
template<typename PropertyTag > | |
void | addStandard () |
Static Public Member Functions | |
static FiltersFactory & | getDefault () |
Get default register of filters factories. | |
template<typename PropertyTag > | |
static shared_ptr< Solver > | standard (XMLReader &reader, Manager &manager) |
Standard filter factory. | |
Construct filters using data from XML.
Definition at line 30 of file factory.hpp.
typedef std::function<shared_ptr<Solver>(XMLReader& reader, Manager& manager)> plask::FiltersFactory::FilterCreator |
Definition at line 33 of file factory.hpp.
void plask::FiltersFactory::add | ( | const std::string | typeName, |
FiltersFactory::FilterCreator | filterCreator | ||
) |
Definition at line 34 of file factory.cpp.
Definition at line 85 of file factory.hpp.
Try to get filter from tag which is pointed by reader
.
Throw exception if reader points to filter tag, but this tag can't be parsed.
reader | source of filter configuration, should point to begin of tag |
manager |
Definition at line 24 of file factory.cpp.
|
static |
Get default register of filters factories.
Definition at line 19 of file factory.cpp.
|
inlinestatic |
Standard filter factory.
Definition at line 90 of file factory.hpp.