#include <CdbObjectTranslator.hh>
Inheritance diagram for CdbObjectTranslator:

Public Member Functions | |
| virtual | ~CdbObjectTranslator () |
| Destructor. | |
| unsigned int | transientTypeId () const |
| Returns a transient type number. | |
| std::string | persistentTypeName () const |
| Returns a transient type number. | |
| template<class T> CdbStatus | transient (T *&theTransientPtr, const CdbObjectPtr &theObjectPtr) const |
| Translate into a transient object (type-safe wrapper). | |
Protected Member Functions | |
| CdbObjectTranslator (unsigned int theTransientTypeId, const std::string &thePersistentTypeName) | |
| Normal constructor. | |
| virtual CdbStatus | toTransient (void *&theTransientPtr, const CdbObjectPtr &theObjectPtr) const=0 |
| Translate into a transient object. | |
This class is an element of the "persistent-to-transient" translation facility extending the core CDB API and allowing a better (and more confined) controll over persistency in client applications.
Roles of this class are:
1. to represent translators in a dictionary of ones 2. to handle the type-independednt context of translators 3. to force its subclasses to implement an actual translation procedure 4. to provide a type-safe wrapper to the translation procedure
Definition at line 25 of file CdbObjectTranslator.hh.
|
||||||||||||
|
Normal constructor.
Definition at line 45 of file CdbObjectTranslator.hh. |
|
|
Destructor.
Definition at line 78 of file CdbObjectTranslator.hh. |
|
|
Returns a transient type number.
Definition at line 86 of file CdbObjectTranslator.hh. |
|
||||||||||||
|
Translate into a transient object. This method is supposed to be implemented by subclasses. In case of its successful completion (CdbStatus::Success) it's supposed to set up the supplied reference to point onto a new transinet object. The ownership of this object is also returned with the object. DESIGN NOTE: It's up to the caller of this method to interprete the actual type of the returned object. That type is the one corresponding to a value of the "transient type identifier" passed to the class's constructor. Normally, this method shouldn't be used by users directly. It has to be wrrapped into a type-safe ionterface.
Referenced by transient(). |
|
||||||||||||||||
|
Translate into a transient object (type-safe wrapper). The only role of this wrapper is to make sure that
Definition at line 93 of file CdbObjectTranslator.hh. References CdbType2Id< T, GENERATOR >::id(), CdbStatus::IllegalParameters, toTransient(), and transientTypeId(). |
|
|
Returns a transient type number.
Definition at line 82 of file CdbObjectTranslator.hh. Referenced by transient(). |
1.3-rc3