Base class for all persistent objects. More...
#include <OpenMS/FORMAT/DB/PersistentObject.h>
Public Member Functions | |
PersistentObject () | |
Default constructor. More... | |
virtual | ~PersistentObject () |
Destructor. More... | |
PersistentObject & | operator= (const PersistentObject &rhs) |
Assignment operator. More... | |
const UID & | getPersistenceId () const |
Returns the persistence id. More... | |
void | setPersistenceId (const UID &persistence_id) |
Sets the persistence id. More... | |
void | clearId (bool deep=true) |
Clears the persistence id. More... | |
Protected Member Functions | |
virtual void | clearChildIds_ ()=0 |
Clears the persistence id of all sub-objects. More... | |
Protected Attributes | |
UID | persistence_id_ |
A persistence id used to refer the data back to the source. More... | |
Base class for all persistent objects.
Interface for all classes that can be stored persistently in the OpenMS DB.
PersistentObject | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
protectedpure virtual |
Clears the persistence id of all sub-objects.
Implemented in MSExperiment< PeakT, ChromatogramPeakT >, MSExperiment< OpenMS::Peak1D >, MSExperiment< Peak1D >, MSExperiment< SimPointType >, MSSpectrum< PeakT >, MSSpectrum< PeakType >, MSSpectrum< Peak1D >, MSSpectrum< OpenMS::Peak2D >, MSSpectrum<>, MSSpectrum< RichPeak1D >, MSChromatogram< PeakT >, MSChromatogram< ChromatogramPeakType >, and BinnedSpectrum.
void clearId | ( | bool | deep = true | ) |
Clears the persistence id.
Sets the id to 0.
deep | determines which ids are cleared. false means that only the id of the current object is reset. true means that the ids of all sub-objects are reset as well (default). |
Referenced by MSChromatogram< ChromatogramPeakType >::clear(), MSSpectrum< RichPeak1D >::clear(), and MSExperiment< SimPointType >::clear().
const UID& getPersistenceId | ( | ) | const |
Returns the persistence id.
This id is only used in the DBAdapter the id is used to connect the object to the data stored in the DB.
PersistentObject& operator= | ( | const PersistentObject & | rhs | ) |
Assignment operator.
Referenced by MSChromatogram< ChromatogramPeakType >::operator=(), MSSpectrum< RichPeak1D >::operator=(), MSExperiment< SimPointType >::operator=(), and MSExperiment< SimPointType >::swap().
void setPersistenceId | ( | const UID & | persistence_id | ) |
Sets the persistence id.
This id is only used in the DBAdapter the id is used to connect the object to the data stored in the DB.
Do not set the persistence id unless you know what you are doing!
|
protected |
A persistence id used to refer the data back to the source.
OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:30 using doxygen 1.8.5 |