|
PARTONS
|
PARtonic Tomography Of Nucleon Software
|
![]() |
STL-like container to store basic PARTONS objects. More...
Public Member Functions | |
| List () | |
| Constructor. More... | |
| List (std::vector< T > &stdVector) | |
| Assignment constructor. More... | |
| virtual | ~List () |
| Destructor. More... | |
| virtual void | add (const T &data) |
| Add new element. More... | |
| void | add (const List< T > &list) |
| Add list of new elements. More... | |
| void | add (const std::vector< T > &vector) |
| Add vector of new elements. More... | |
| const T & | get (size_t n) const |
| Get reference to element of given index. More... | |
| T & | operator[] (size_t n) |
| Get reference to element of given index. More... | |
| const T & | operator[] (size_t n) const |
| Get reference to element of given index. More... | |
| size_t | size () const |
| Get size of this list. More... | |
| bool | isEmpty () const |
| Check if list is empty. More... | |
| std::string | toString () |
| Return a pre-formatted characters string for output visualization of class member's values. More... | |
| void | sort () |
| Sort elements of this list. More... | |
| std::vector< T > | getData () const |
| Get vector containing stored elements. More... | |
| void | compare (ComparisonReport &rootComparisonReport, const List< T > &referenceObject, const ComparisonMode &comparisonMode=ComparisonMode::EQUAL, std::string parentObjectInfo=ElemUtils::StringUtils::EMPTY) const |
| Compare to other List and store comparison result in given comparison report. More... | |
| void | clear () |
| Clear list. More... | |
| void | resize (size_t n) |
| Resize list to given size. More... | |
| void | removeLast () |
| Remove the last element from this list. More... | |
| const T & | getLast () const |
| Get the last element of this list. 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... | |
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... | |
| virtual std::string | toString () const |
| Return a pre-formatted characters string for output visualization of class member's values. 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 Attributes | |
| std::vector< T > | m_data |
| Elements of this list. 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... | |
STL-like container to store basic PARTONS objects.
This class is a STL-like container created in order to store PARTONS objects that derivative from BaseObject class. More precisely, it is a wrap of std::vector that provides additional functionalities, like sorting and serialization, all based on functions predefined in BaseObject class. This example illustrates how to use this container:
which gives via Logger:
|
inline |
Constructor.
|
inline |
Assignment constructor.
| stdVector | Vector storing values to be assigned. |
|
inlinevirtual |
Destructor.
|
inline |
Add list of new elements.
| list | List of elements to be added. |
|
inline |
Add vector of new elements.
| list | Vector of elements to be added. |
|
inlinevirtual |
Add new element.
|
inline |
Clear list.
|
inline |
Compare to other List and store comparison result in given comparison report.
| rootComparisonReport | Reference to comparison report to be used to store comparison result. |
| referenceObject | Reference to List to be compared. |
| comparisonMode | Mode of comparison, see documentation of ComparisonMode class. |
| parentObjectInfo | Addition information coming from the parent object (if needed). |
|
inline |
Get reference to element of given index.
| n | Index of requested element. |
|
inline |
Get vector containing stored elements.
|
inline |
Get the last element of this list.
|
inline |
Check if list is empty.
|
inline |
Get reference to element of given index.
| n | Index of requested element. |
|
inline |
Get reference to element of given index.
| n | Index of requested element. |
|
inline |
Remove the last element from this list.
|
inline |
Resize list to given size.
| n | Size to be set. |
|
inline |
Used to split a complex C++ object into a concatenation of simple types.
| packet | Target Packet. |
|
inline |
Get size of this list.
|
inline |
Sort elements of this list.
|
inline |
Return a pre-formatted characters string for output visualization of class member's values.
|
inline |
Used to rebuild a complex C++ object from a concatenation of simple type.
| packet | Input Packet. |
|
protected |
Elements of this list.