PARTONS
|
PARtonic Tomography Of Nucleon Software
|
Value with unit. More...
Public Member Functions | |
PhysicalType () | |
Default constructor. More... | |
PhysicalType (PhysicalUnit::Type unit) | |
Assignment constructor. More... | |
PhysicalType (T value, PhysicalUnit::Type unit) | |
Assignment constructor. More... | |
PhysicalType (const std::string &stringValue, PhysicalUnit::Type unit) | |
Assignment constructor. More... | |
PhysicalType (const ElemUtils::GenericType &value, PhysicalUnit::Type unit) | |
Assignment constructor. More... | |
PhysicalType (const PhysicalType &other) | |
Copy constructor. More... | |
std::string | toString () const |
Return string representing the whole object. More... | |
void | serialize (ElemUtils::Packet &packet) const |
Serialize into given Packet. More... | |
void | unserialize (ElemUtils::Packet &packet) |
Retrieve data from given Packet. More... | |
void | serializeIntoStdVector (std::vector< double > &vec) const |
Serialize into std::vector<double> More... | |
void | unserializeFromStdVector (std::vector< double >::const_iterator &it, const std::vector< double >::const_iterator &end) |
Uneserialize from std::vector<double> More... | |
std::string | toStdString () const |
Return string representing value and unit. More... | |
PhysicalType< T > & | operator= (PhysicalType< T > const &rhs) |
Assignment operator. More... | |
T | operator() () |
Operator to return value. More... | |
T | getValue () const |
Get value. More... | |
void | setValue (T value) |
Set value. More... | |
PhysicalUnit::Type | getUnit () const |
Get unit. More... | |
void | setUnit (PhysicalUnit::Type unit) |
Set unit. More... | |
bool | isInitialized () const |
Check if initialized. More... | |
void | setInitialized (bool initialized) |
Set as initialized. More... | |
PhysicalType< T > | makeSameUnitAs (PhysicalUnit::Type other) const |
Check if the same unit category. More... | |
PhysicalType< T > | makeSameUnitAs (const PhysicalType< T > &other) const |
Check if the same unit category. More... | |
void | checkIfSameUnitAs (PhysicalUnit::Type other) const |
Check if the same unit. More... | |
void | checkIfSameUnitAs (const PhysicalType< T > &other) const |
Check if the same unit. More... | |
void | checkIfSameUnitCategoryAs (PhysicalUnit::Type other) const |
Check if the same unit category. More... | |
void | checkIfSameUnitCategoryAs (const PhysicalType< T > &other) const |
Check if the same unit category. 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 Member Functions | |
void | valueFromStdString (const std::string &stringValue) |
Set value from std::string. More... | |
Private Attributes | |
bool | m_initialized |
True if value initialized. More... | |
T | m_value |
Value. More... | |
PhysicalUnit::Type | m_unit |
Unit. 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... | |
Value with unit.
This class is a container for a value, unit and switch to mark if the value is initialized or not. Setting a value (either via setter or one of constructors) make the object "initialized".
|
inline |
Default constructor.
|
inline |
Assignment constructor.
|
inline |
Assignment constructor.
|
inline |
Assignment constructor.
|
inline |
Assignment constructor.
|
inline |
Copy constructor.
|
inline |
Check if the same unit.
If units are different throw exception.
|
inline |
Check if the same unit.
If units are different throw exception.
|
inline |
Check if the same unit category.
If units are different throw exception.
|
inline |
Check if the same unit category.
If units are different throw exception.
|
inline |
Get unit.
|
inline |
Get value.
|
inline |
Check if initialized.
|
inline |
Check if the same unit category.
If units are different make the conversion.
|
inline |
Check if the same unit category.
If units are different make the conversion.
|
inline |
Operator to return value.
|
inline |
Assignment operator.
|
inline |
Serialize into given Packet.
packet | Target Packet. |
|
inline |
Serialize into std::vector<double>
|
inline |
Set as initialized.
|
inline |
Set unit.
|
inline |
Set value.
This function makes the object marked as initialized.
|
inline |
Return string representing value and unit.
To be used mainly in the generation of hash sums.
|
inlinevirtual |
Return string representing the whole object.
Reimplemented from PARTONS::BaseObject.
|
inline |
Retrieve data from given Packet.
packet | Input Packet. |
|
inline |
Uneserialize from std::vector<double>
|
inlineprivate |
Set value from std::string.
|
private |
True if value initialized.
|
private |
Unit.
|
private |
Value.