|
libgsjj
1
Deterministic finite automata learning library
|
Helps to register a method in the factory. More...
#include <MethodFactory.h>
Static Protected Attributes | |
| static bool | s_registered |
| Useful to make sure the template is correctly used by the compiler. More... | |
Helps to register a method in the factory.
To register a method (through this helper), the method must inherit from RegisterInFactory (and specify the typename). Due to the annoying (in this context) compiler's optimisations, the method must also have a line that uses s_registered. For example, adding s_registered = s_registered in any function of the method makes everything working as intented.
Each class inheriting this class must implement a function with the following signature :
static std::string getFactoryName()
The constructor of the class must have the same signature than the built-in methods' constructors (see, for example, gsjj::passive::SMT::BiermannMethod::BiermannMethod)
| T | The type of the method to register |
Definition at line 84 of file MethodFactory.h.
|
staticprotected |
Useful to make sure the template is correctly used by the compiler.
Please add a line such as
s_registered = s_registered;
anywhere in the class that inherits this helper.
By default, this variable asks to map T::getFactoryName() to a way to construct T.
Definition at line 97 of file MethodFactory.h.
1.8.13