Belle II Software development
|
Variant of types allowed to be forwarded to a filter selected at runtime. More...
#include <FilterParamMap.h>
Classes | |
class | Impl |
Define the implementation. More... | |
Public Member Functions | |
FilterParamMap () | |
Default constructor. | |
~FilterParamMap () | |
Default destructor. | |
void | addParameter (ModuleParamList *moduleParamList, const std::string &name, const std::string &description) |
Create one parameter in the parameter list for the module with the given name and description. | |
void | assignTo (ModuleParamList *filterModuleParamList) |
Unpack the map of parameters and forward them to the concrete filter. | |
Private Attributes | |
std::unique_ptr< Impl > | m_impl |
Pointer to implementation hiding the details. | |
Variant of types allowed to be forwarded to a filter selected at runtime.
Facade for a map of parameters that should be forwarded to a filter selected at runtime.
This class provides an intermediate space for a map of parameters from the steering that wait to be assigned to a concrete filter instance also selected in the steering. To achieve this it uses a map of strings to a variant such that it is able to forward parameters of different types to the filter in a type-safe way.
The present implementation now uses the PImpl idiom to hide the bulk of internal details of boost::variant from all the users, which reduced the compilation time by a good 20%.
The parameters can still be inspected by getValues(), but the user must include the implementation (e.g. "#include <boost/variant/variant.hpp>") to be able to inspect them.
Definition at line 41 of file FilterParamMap.h.
FilterParamMap | ( | ) |
Default constructor.
Definition at line 73 of file FilterParamMap.cc.
void addParameter | ( | ModuleParamList * | moduleParamList, |
const std::string & | name, | ||
const std::string & | description | ||
) |
Create one parameter in the parameter list for the module with the given name and description.
Definition at line 81 of file FilterParamMap.cc.
void assignTo | ( | ModuleParamList * | filterModuleParamList | ) |
Unpack the map of parameters and forward them to the concrete filter.
Definition at line 87 of file FilterParamMap.cc.
|
private |
Pointer to implementation hiding the details.
Definition at line 65 of file FilterParamMap.h.