|
PARTONS
|
PARtonic Tomography Of Nucleon Software
|
![]() |
Container to store data to be used by base objects. More...
Public Member Functions | |
| BaseObjectData () | |
| Default constructor. More... | |
| BaseObjectData (const std::string &moduleType, const std::string &moduleClassName) | |
| Assignment constructor. More... | |
| virtual | ~BaseObjectData () |
| Destructor. More... | |
| BaseObjectData & | addSubModule (const std::string &moduleType, const std::string &moduleClassName) |
| Add submodule, i.e. More... | |
| void | addParameter (const ElemUtils::Parameter ¶meter) |
| Add a single parameter. More... | |
| void | addParameters (const ElemUtils::Parameters ¶meters) |
| Add a set of parameters. More... | |
| bool | isAvailableSubModule (const std::string &moduleClassType) const |
| Check if parameters of submodule of a given type are available. More... | |
| const BaseObjectData & | getLastAvailable () const |
| Get BaseObjectData object indicated by the last call of BaseObjectData::isAvailableSubModule() function. More... | |
| virtual std::string | toString () const |
| Return a pre-formatted characters string for output visualization of class member's values. More... | |
| const std::string & | getModuleType () const |
| Get type of module intended to use parameters stored in this class. More... | |
| void | setModuleType (const std::string &moduleType) |
| Set type of module intended to use parameters stored in this class. More... | |
| const std::string & | getModuleClassName () const |
| Get name of module intended to use parameters stored in this class. More... | |
| void | setModuleClassName (const std::string &moduleClassName) |
| Set name of module intended to use parameters stored in this class. More... | |
| const ElemUtils::Parameters & | getParameters () const |
| Get parameters stored in this class. More... | |
| void | setParameters (const ElemUtils::Parameters ¶meters) |
| Set parameters stored in this class. More... | |
| const std::map< std::string, BaseObjectData > & | getSubModules () const |
| Get map to build a tree-like structure of BaseObjectData objects to be used if submodules are used. More... | |
Public Member Functions inherited from PARTONS::BaseObject | |
| BaseObject (const std::string &className) | |
| Constructor. More... | |
| virtual | ~BaseObject () |
| Default destructor. More... | |
| virtual BaseObject * | clone () const |
| Virtual clone function to allow the factory to clone all derived members object stored in the BaseObjectRegistry. More... | |
| virtual void | resolveObjectDependencies () |
| Because of the initialization step order of the program, objects are registered in a total random order and some objects depend on others. More... | |
| void | serialize (ElemUtils::Packet &packet) const |
| Used to split a complex C++ object into a concatenation of simple types. More... | |
| void | unserialize (ElemUtils::Packet &packet) |
| Used to rebuild a complex C++ object from a concatenation of simple type. More... | |
| bool | operator< (const BaseObject &other) const |
| Overload of < operator to sort BaseObject object by its indexId value. More... | |
| const std::string & | getClassName () const |
| unsigned int | getObjectId () const |
| int | getIndexId () const |
| void | setIndexId (int indexId) |
Private Attributes | |
| std::string | m_moduleType |
| Type of module intended to use parameters stored in this class. More... | |
| std::string | m_moduleClassName |
| Name of module intended to use parameters stored in this class. More... | |
| ElemUtils::Parameters | m_parameters |
| Parameters stored in this class. More... | |
| std::map< std::string, BaseObjectData > | m_subModules |
| Map to build a tree-like structure of BaseObjectData objects to be used if submodules are used. More... | |
| std::map< std::string, BaseObjectData >::const_iterator | m_it |
| Iterator of BaseObjectData::m_subModules map. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from PARTONS::BaseObject | |
| BaseObject (const BaseObject &other) | |
| Copy constructor. More... | |
| void | info (const std::string &functionName, const std::string &message) const |
| Print info message into logger. More... | |
| void | debug (const std::string &functionName, const std::string &message) const |
| Print debug message into logger. More... | |
| void | warn (const std::string &functionName, const std::string &message) const |
| Print warning message into logger. More... | |
| void | errorMissingParameter (const std::string ¶meterName) const |
| Use in automation process to throw exception when a parameter is missing from the XML scenario file. More... | |
Container to store data to be used by base objects.
This class is a container to store data used by base objects in the automation process. An object of this class is intended to be created by a XML parser during running PARTONS runtime from a specific XML file, which can be local or can be retrieved from a database. Therefore, this class may be seen as a representation of a set of parameters encoded in a XML file, like:
| PARTONS::BaseObjectData::BaseObjectData | ( | ) |
Default constructor.
| PARTONS::BaseObjectData::BaseObjectData | ( | const std::string & | moduleType, |
| const std::string & | moduleClassName | ||
| ) |
Assignment constructor.
| moduleType | Type of module intended to use parameters stored in this class. |
| moduleClassName | Name of module intended to use parameters stored in this class. |
|
virtual |
Destructor.
| void PARTONS::BaseObjectData::addParameter | ( | const ElemUtils::Parameter & | parameter | ) |
Add a single parameter.
| parameter | Parameter to be added. |
| void PARTONS::BaseObjectData::addParameters | ( | const ElemUtils::Parameters & | parameters | ) |
Add a set of parameters.
| parameters | Parameters to be added. |
| BaseObjectData & PARTONS::BaseObjectData::addSubModule | ( | const std::string & | moduleType, |
| const std::string & | moduleClassName | ||
| ) |
Add submodule, i.e.
indicate that this BaseObjectData object has a tree-like structure.
| moduleType | Type of module intended to use parameters stored in this class. |
| moduleClassName | Name of module intended to use parameters stored in this class. |
| const BaseObjectData & PARTONS::BaseObjectData::getLastAvailable | ( | ) | const |
Get BaseObjectData object indicated by the last call of BaseObjectData::isAvailableSubModule() function.
| const std::string & PARTONS::BaseObjectData::getModuleClassName | ( | ) | const |
Get name of module intended to use parameters stored in this class.
| const std::string & PARTONS::BaseObjectData::getModuleType | ( | ) | const |
Get type of module intended to use parameters stored in this class.
| const ElemUtils::Parameters & PARTONS::BaseObjectData::getParameters | ( | ) | const |
Get parameters stored in this class.
| const std::map< std::string, BaseObjectData > & PARTONS::BaseObjectData::getSubModules | ( | ) | const |
Get map to build a tree-like structure of BaseObjectData objects to be used if submodules are used.
The keys in the map indicate type of modules intended to use parameters stored in corresponding BaseObjectData objects.
| bool PARTONS::BaseObjectData::isAvailableSubModule | ( | const std::string & | moduleClassType | ) | const |
Check if parameters of submodule of a given type are available.
| moduleClassType | Requested type of submodule. |
| void PARTONS::BaseObjectData::setModuleClassName | ( | const std::string & | moduleClassName | ) |
Set name of module intended to use parameters stored in this class.
| void PARTONS::BaseObjectData::setModuleType | ( | const std::string & | moduleType | ) |
Set type of module intended to use parameters stored in this class.
| void PARTONS::BaseObjectData::setParameters | ( | const ElemUtils::Parameters & | parameters | ) |
Set parameters stored in this class.
|
virtual |
Return a pre-formatted characters string for output visualization of class member's values.
Reimplemented from PARTONS::BaseObject.
|
mutableprivate |
Iterator of BaseObjectData::m_subModules map.
|
private |
Name of module intended to use parameters stored in this class.
|
private |
Type of module intended to use parameters stored in this class.
|
private |
Parameters stored in this class.
|
private |
Map to build a tree-like structure of BaseObjectData objects to be used if submodules are used.
The keys in the map indicate type of modules intended to use parameters stored in corresponding BaseObjectData objects.