The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
IConverter.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
13#include <GaudiKernel/ClassID.h>
15
17class IAddressCreator;
18class IConversionSvc;
19class IOpaqueAddress;
20class DataObject;
21template <class T>
22class SmartIF;
23
65class GAUDI_API IConverter : virtual public IInterface {
66public:
69
74 virtual StatusCode initialize() = 0;
75
80 virtual StatusCode finalize() = 0;
81
85 virtual const CLID& objType() const = 0;
86
91 virtual long repSvcType() const = 0;
92
98
103
109
114
120
125
137 virtual StatusCode createObj( IOpaqueAddress* pAddress, DataObject*& refpObject ) = 0;
138
148 virtual StatusCode fillObjRefs( IOpaqueAddress* pAddress, DataObject* pObject ) = 0;
149
159 virtual StatusCode updateObj( IOpaqueAddress* pAddress, DataObject* refpObject ) = 0;
160
171 virtual StatusCode updateObjRefs( IOpaqueAddress* pAddress, DataObject* pObject ) = 0;
172
180 virtual StatusCode createRep( DataObject* pObject, IOpaqueAddress*& refpAddress ) = 0;
181
188 virtual StatusCode fillRepRefs( IOpaqueAddress* pAddress, DataObject* pObject ) = 0;
189
196 virtual StatusCode updateRep( IOpaqueAddress* pAddress, DataObject* pObject ) = 0;
197
205 virtual StatusCode updateRepRefs( IOpaqueAddress* pAddress, DataObject* pObject ) = 0;
206};
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
#define GAUDI_API
Definition Kernel.h:49
A DataObject is the base class of any identifiable object on any data store.
Definition DataObject.h:37
IAddressCreator interface definition.
The data converters are responsible to translate data from one representation into another.
Definition IConverter.h:65
virtual StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an already converted object.
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
virtual SmartIF< IAddressCreator > & addressCreator() const =0
Get address creation interface needed to resolve links between objects.
virtual StatusCode finalize()=0
Terminate the converter.
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject)=0
Update the transient object from the other representation.
virtual SmartIF< IDataProviderSvc > & dataProvider() const =0
Get Data provider service.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject)=0
Create the transient representation of an object.
virtual SmartIF< IConversionSvc > & conversionSvc() const =0
Get conversion service the converter is connected to.
virtual StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the converted representation of a transient object.
virtual StatusCode setConversionSvc(IConversionSvc *pService)=0
Set conversion service the converter is connected to.
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an updated transient object.
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)=0
Convert the transient object to the requested representation.
DeclareInterfaceID(IConverter, 3, 0)
InterfaceID.
virtual StatusCode initialize()=0
Initialize the converter.
virtual const CLID & objType() const =0
Retrieve the class type of objects the converter produces.
virtual StatusCode setAddressCreator(IAddressCreator *creator)=0
Set address creator facility.
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the converted object.
Data provider interface definition.
Definition of the basic interface.
Definition IInterface.h:225
Opaque address interface definition.
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64