![]() |
The Gaudi Framework
master (77e7e51e)
|
#include <GaudiKernel/IConverter.h>
Public Member Functions | |
DeclareInterfaceID (IConverter, 3, 0) | |
InterfaceID. More... | |
virtual StatusCode | initialize ()=0 |
Initialize the converter. More... | |
virtual StatusCode | finalize ()=0 |
Terminate the converter. More... | |
virtual const CLID & | objType () const =0 |
Retrieve the class type of objects the converter produces. More... | |
virtual long | repSvcType () const =0 |
Retrieve the class type of the data store the converter uses. More... | |
virtual StatusCode | setDataProvider (IDataProviderSvc *pService)=0 |
Set Data provider service. More... | |
virtual SmartIF< IDataProviderSvc > & | dataProvider () const =0 |
Get Data provider service. More... | |
virtual StatusCode | setConversionSvc (IConversionSvc *pService)=0 |
Set conversion service the converter is connected to. More... | |
virtual SmartIF< IConversionSvc > & | conversionSvc () const =0 |
Get conversion service the converter is connected to. More... | |
virtual StatusCode | setAddressCreator (IAddressCreator *creator)=0 |
Set address creator facility. More... | |
virtual SmartIF< IAddressCreator > & | addressCreator () const =0 |
Get address creation interface needed to resolve links between objects. More... | |
virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject)=0 |
Create the transient representation of an object. More... | |
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)=0 |
Resolve the references of the created transient object. More... | |
virtual StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject)=0 |
Update the transient object from the other representation. More... | |
virtual StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)=0 |
Update the references of an updated transient object. More... | |
virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress)=0 |
Convert the transient object to the requested representation. More... | |
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)=0 |
Resolve the references of the converted object. More... | |
virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject)=0 |
Update the converted representation of a transient object. More... | |
virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)=0 |
Update the references of an already converted object. More... | |
![]() | |
virtual void * | i_cast (const InterfaceID &) const =0 |
main cast function More... | |
virtual std::vector< std::string > | getInterfaceNames () const =0 |
Returns a vector of strings containing the names of all the implemented interfaces. More... | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | release ()=0 |
Release Interface instance. More... | |
virtual unsigned long | refCount () const =0 |
Current reference count. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)=0 |
Set the void** to the pointer to the requested interface of the instance. More... | |
virtual | ~IInterface ()=default |
Virtual destructor. More... | |
Additional Inherited Members | |
![]() | |
enum | Status : StatusCode::code_t { Status::FAILURE = 0, Status::SUCCESS = 1, Status::NO_INTERFACE, Status::VERSMISMATCH, Status::LAST_ERROR } |
Return status. More... | |
using | iid = Gaudi::InterfaceId< IInterface, 0, 0 > |
Interface ID. More... | |
using | ext_iids = Gaudi::interface_list< iid > |
Extra interfaces. More... | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
The data converters are responsible to translate data from one representation into another. Concrete examples are e.g. converters creating transient objects representing parts of an event from the persistent (and disk based) representations. Converters will have to deal with the technology both representations are based on: in the upper example they have to know about the database internals as well as the structure of the transient representations. The converters know about the mechanism to retrieve persistent objects (ZEBRA, Objectivity, ) and only pass abstract instances of the converted objects, hence shielding the calling service from internals.
Data converters are meant to be light. This means there should not be all-in-one converters, which are able to convert the "world", but rather many converters. Each converter is then able to create a representation of a given type.
In order to function a converter must be able to
The interface should cover the entry points of concrete converter instances in order to serve conversion requests.
Definition at line 68 of file IConverter.h.
|
pure virtual |
Get address creation interface needed to resolve links between objects.
|
pure virtual |
Get conversion service the converter is connected to.
|
pure virtual |
Create the transient representation of an object.
The transient representation is created by loading the persistent object using the source information contained in the address.
pAddress | Opaque address information to retrieve the requested object from the store in order to produce the transient object. |
refpObject | Reference to location of pointer of the created object. |
|
pure virtual |
Convert the transient object to the requested representation.
e.g. conversion to persistent objects.
pObject | Pointer to location of the object |
refpAddress | Reference to location of pointer with the object address. |
|
pure virtual |
Get Data provider service.
IConverter::DeclareInterfaceID | ( | IConverter | , |
3 | , | ||
0 | |||
) |
|
pure virtual |
Resolve the references of the created transient object.
After the object creation references of the objects pointing to objects outside its scope will have to be filled. The actual objects will not be loaded, but the recipe to load them will be present.
pAddress | Opaque address information to retrieve the requested object from the store. |
pObject | Pointer to location of the object |
|
pure virtual |
Resolve the references of the converted object.
After the requested representation was created the references in this representation must be resolved.
pObject | Pointer to location of the object |
|
pure virtual |
Terminate the converter.
exception | (STL standard) in case of fatal errors |
|
pure virtual |
Initialize the converter.
exception | (STL standard) in case of fatal errors |
|
pure virtual |
Retrieve the class type of objects the converter produces.
|
pure virtual |
Retrieve the class type of the data store the converter uses.
|
pure virtual |
Set address creator facility.
creator | Reference to address creator interface |
|
pure virtual |
Set conversion service the converter is connected to.
pService | Pointer to IConversionSvc interface |
|
pure virtual |
Set Data provider service.
pService | Pointer to data provider service |
|
pure virtual |
Update the transient object from the other representation.
The transient representation will be updated by loading the persistent object using the source information contained in the address and then refill transient data.
pAddress | Opaque address information to retrieve the requested object from the store. |
pObject | Pointer to the object to be updated. |
|
pure virtual |
Update the references of an updated transient object.
After the object was updated also the references of the objects pointing to objects outside its scope will have to be filled. The actual pointers to objects will only be filled if already present. Otherwise only the recipe to load them will be present.
pAddress | Opaque address information to retrieve the requested object from the store. |
pObject | Pointer to location of the object |
|
pure virtual |
Update the converted representation of a transient object.
pObject | Pointer to location of the object |
refpAddress | Reference to location of pointer with the object address. |
|
pure virtual |
Update the references of an already converted object.
The object must be retrieved before it can be updated.
pAddress | Pointer to location of object address with the store. |
pObject | Pointer to location of the object |