|
GGS(GenericGEANT4Simulation)Software
2.7.0
|
Class for storing parameters. More...
#include <GGSParameters.h>

Public Member Functions | |
| GGSParameters () | |
| Default constructor. | |
| GGSParameters (GGSParameters &¶ms) | |
| Move constructor. | |
| template<typename T > | |
| void | SetParam (const std::string &name, T value) |
| Sets a parameter. More... | |
| template<class T > | |
| T | GetParam (const std::string &name) const |
| Gets a parameter. More... | |
| bool | AreSameParamsAs (const GGSParameters ¶ms) const |
| Compares two parameter objects. More... | |
| GGSParameters & | operator= (const GGSParameters &rhs) |
| Assignment operator. More... | |
| template<> | |
| void | SetParam (const std::string &name, int value) |
| template<> | |
| void | SetParam (const std::string &name, double value) |
| template<> | |
| void | SetParam (const std::string &name, bool value) |
| template<> | |
| int | GetParam (const std::string &name) const |
| template<> | |
| double | GetParam (const std::string &name) const |
| template<> | |
| bool | GetParam (const std::string &name) const |
Class for storing parameters.
This class provides key-value storage for parameters of different types. Currently supported type are:
and std::vector of the above types.
Definition at line 29 of file GGSParameters.h.
| bool GGSParameters::AreSameParamsAs | ( | const GGSParameters & | params | ) | const |
Compares two parameter objects.
This method returns true if the parameters of the argument object are identical in number, names and values to those of this object.
(Note: this method is defined for similarity with GGSTSimInfo::IsSameSimAs, instead of defining GGSParameters::operator= )
| params | The parameters object to be compared with this. |
Definition at line 133 of file GGSParameters.cpp.
| T GGSParameters::GetParam | ( | const std::string & | name | ) | const |
Gets a parameter.
| name | The name of the desired parameter. |
| std::runtime_error | if the requested parameter does not exist. |
| GGSParameters & GGSParameters::operator= | ( | const GGSParameters & | rhs | ) |
Assignment operator.
| rhs | The parameters object to assign from. |
Definition at line 142 of file GGSParameters.cpp.
| void GGSParameters::SetParam | ( | const std::string & | name, |
| T | value | ||
| ) |
Sets a parameter.
| name | The name of the parameter. |
| value | The value of the parameter |
| std::runtime_error | if the parameter cannot be set. |
1.8.5