PARTONS
|
PARtonic Tomography Of Nucleon Software
|
![]() |
Class representing single scenario. More...
Public Member Functions | |
Scenario () | |
Default constructor. More... | |
Scenario (const Scenario &other) | |
Copy constructor. More... | |
Scenario (const int indexId, const std::string &description, const time_t storeDate, const std::string &filePath, const std::string &hashSum, const std::string &file) | |
Assignment constructor. More... | |
virtual | ~Scenario () |
Destructor. More... | |
const Task & | getTask (unsigned int i) const |
Get reference to task of a given id. More... | |
Task & | getTask (unsigned int i) |
Get reference to task of a given id. More... | |
void | add (const Task &task) |
Add a given task to this scenario. More... | |
size_t | size () const |
Return number of tasks in this scenario. More... | |
virtual std::string | toString () const |
Return a pre-formatted characters string for output visualization of class member's values. More... | |
const std::string & | getDescription () const |
Get description of this scenario. More... | |
void | setDescription (const std::string &description) |
Set description of this scenario. More... | |
const std::vector< Task > & | getTasks () const |
Get vector containing tasks associated to this scenario. More... | |
void | setTasks (const std::vector< Task > &tasks) |
Set vector containing tasks associated to this scenario. More... | |
![]() | |
DatabaseFileObject (const std::string &className) | |
Constructor. More... | |
DatabaseFileObject (const std::string &className, const int indexId, const time_t storeDate, const std::string &filePath, const std::string &hashSum, const std::string &file) | |
Constructor. More... | |
DatabaseFileObject (const DatabaseFileObject &other) | |
Copy constructor. More... | |
virtual | ~DatabaseFileObject () |
Destructor. More... | |
const std::string & | getFile () const |
Get reference to DatabaseFileObject::m_file. More... | |
void | setFile (const std::string &file) |
Set DatabaseFileObject::m_file. More... | |
const std::string & | getHashSum () const |
Get reference to DatabaseFileObject::m_hashSum. More... | |
void | setHashSum (const std::string &hashSum) |
Set DatabaseFileObject::m_hashSum. More... | |
time_t | getStoreDate () const |
Get DatabaseFileObject::m_storeDate. More... | |
void | setStoreDate (time_t storeDate) |
Set DatabaseFileObject::m_storeDate. More... | |
const std::string & | getFilePath () const |
Get reference to DatabaseFileObject::m_filePath. More... | |
void | setFilePath (const std::string &filePath) |
Set DatabaseFileObject::m_filePath. More... | |
![]() | |
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) |
Protected Member Functions | |
virtual std::string | fillFile () const |
Fill file from database. More... | |
![]() | |
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... | |
Private Attributes | |
std::string | m_description |
Description of this scenario. More... | |
std::vector< Task > | m_tasks |
Vector containing tasks associated to this scenario. More... | |
Class representing single scenario.
This class represents a single scenario, i.e. a set of tasks to be evaluated by services. An object of this class is intended to be created by a xml parser during running PARTONS with 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 single scenario encoded in a xml file, like:
PARTONS::Scenario::Scenario | ( | ) |
Default constructor.
PARTONS::Scenario::Scenario | ( | const Scenario & | other | ) |
Copy constructor.
other | Object to be copied. |
PARTONS::Scenario::Scenario | ( | const int | indexId, |
const std::string & | description, | ||
const time_t | storeDate, | ||
const std::string & | filePath, | ||
const std::string & | hashSum, | ||
const std::string & | file | ||
) |
Assignment constructor.
indexId | Unique id used when object is created from the database, see BaseObject::m_indexId. |
description | Description of this scenario. |
storeDate | Time of insertion into the database. |
filePath | Path to file. |
hashSum | Hash sum of file content. |
file | String containing file content. |
|
virtual |
Destructor.
void PARTONS::Scenario::add | ( | const Task & | task | ) |
Add a given task to this scenario.
task | Task to be added. |
|
protectedvirtual |
const std::string & PARTONS::Scenario::getDescription | ( | ) | const |
Get description of this scenario.
Task & PARTONS::Scenario::getTask | ( | unsigned int | i | ) |
Get reference to task of a given id.
i | Id of task to be retrieved. |
const Task & PARTONS::Scenario::getTask | ( | unsigned int | i | ) | const |
Get reference to task of a given id.
i | Id of task to be retrieved. |
const std::vector< Task > & PARTONS::Scenario::getTasks | ( | ) | const |
Get vector containing tasks associated to this scenario.
void PARTONS::Scenario::setDescription | ( | const std::string & | description | ) |
Set description of this scenario.
void PARTONS::Scenario::setTasks | ( | const std::vector< Task > & | tasks | ) |
Set vector containing tasks associated to this scenario.
size_t PARTONS::Scenario::size | ( | ) | const |
Return number of tasks in this scenario.
|
virtual |
Return a pre-formatted characters string for output visualization of class member's values.
Reimplemented from PARTONS::DatabaseFileObject.
|
private |
Description of this scenario.
|
private |
Vector containing tasks associated to this scenario.