| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
IConversionSvc Class Referenceabstract

`#include <GaudiKernel/IConversionSvc.h>`

Inheritance diagram for IConversionSvc:
[legend]
Collaboration diagram for IConversionSvc:
[legend]

## Public Types
enum | Status { CONVERSIONSVC_NO_ERROR = ICONVERSIONSVC_LAST_ERROR+1, NO_CONVERTER }
| Status code definitions. More...
Public Types inherited from IConverter
enum | Status { INVALID_ADDRESS = IInterface::LAST_ERROR+1, INVALID_OBJECT, NO_MEMORY, BAD_STORAGE_TYPE, NO_SOURCE_OBJECT, ICONVERSIONSVC_LAST_ERROR }
| Status code. More...
Public Types inherited from IInterface
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
| Return status. More...
typedef Gaudi::InterfaceId < IInterface, 0, 0 > | iid
| Interface ID.
typedef mpl::set1< iid > | ext_iids
| Extra interfaces.

## Public Member Functions
| DeclareInterfaceID (IConversionSvc, 4, 0)
| InterfaceID.
virtual StatusCode | addConverter (IConverter *pConverter)=0
| Add converter object to conversion service.
virtual StatusCode | addConverter (const CLID &clid)=0
| Add converter object to conversion service.
virtual StatusCode | removeConverter (const CLID &clid)=0
| Remove converter object from conversion service (if present).
virtual IConverter * | converter (const CLID &clid)=0
| Retrieve converter from list.
virtual StatusCode | connectOutput (const std::string &outputFile)=0
| Connect the output file to the service.
virtual StatusCode | connectOutput (const std::string &outputFile, const std::string &openMode)=0
| Connect the output file to the service with open mode.
virtual StatusCode | commitOutput (const std::string &outputFile, bool do_commit)=0
| Commit pending output.
virtual | ~IConversionSvc ()
| Virtual destructor.
Public Member Functions inherited from IConverter
| DeclareInterfaceID (IConverter, 3, 0)
| InterfaceID.
virtual StatusCode | initialize ()=0
| Initialize the converter.
virtual StatusCode | finalize ()=0
| Terminate the converter.
virtual const CLID & | objType () const =0
| Retrieve the class type of objects the converter produces.
virtual long | repSvcType () const =0
| Retrieve the class type of the data store the converter uses.
virtual StatusCode | setDataProvider (IDataProviderSvc *pService)=0
| Set Data provider service.
virtual SmartIF < IDataProviderSvc > & | dataProvider () const =0
| Get Data provider service.
virtual StatusCode | setConversionSvc (IConversionSvc *pService)=0
| Set conversion service the converter is connected to.
virtual SmartIF< IConversionSvc > & | conversionSvc () const =0
| Get conversion service the converter is connected to.
virtual StatusCode | setAddressCreator (IAddressCreator *creator)=0
| Set address creator facility.
virtual SmartIF < IAddressCreator > & | addressCreator () const =0
| Get address creation interface needed to resolve links between objects.
virtual StatusCode | createObj (IOpaqueAddress *pAddress, DataObject *&refpObject)=0
| Create the transient representation of an object.
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject)=0
| Resolve the references of the created transient object.
virtual StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *refpObject)=0
| Update the transient object from the other representation.
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.
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)=0
| Resolve the references of the converted object.
virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject)=0
| Update the converted representation of a transient object.
virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject)=0
| Update the references of an already converted object.
virtual | ~IConverter ()
| Virtual destructor.
Public Member Functions inherited from IInterface
virtual void * | i_cast (const InterfaceID &) const =0
| main cast function
virtual std::vector< std::string > | getInterfaceNames () const =0
| Returns a vector of strings containing the names of all the implemented interfaces.
virtual unsigned long | addRef ()=0
| Increment the reference count of Interface instance.
virtual unsigned long | release ()=0
| Release Interface instance.
virtual unsigned long | refCount () const =0
| Current reference count.
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)=0
| Set the void** to the pointer to the requested interface of the instance.
virtual | ~IInterface ()
| Virtual destructor.

## Additional Inherited Members
Static Public Member Functions inherited from IInterface
static const InterfaceID & | interfaceID ()
| Return an instance of InterfaceID identifying the interface.

## Detailed Description

The conversion service interface allows to:

- Add, get and remove data converters from the service.
- Create objects using converters: e.g. create the transient representation of a persistent object.
- convert objects - the opposite of create: e.g. convert transient objects into the persistent representation of these objects. The objects to be converted are defined by a data selector object.
- update objects which already exist: e.g. update the existing persistent representation of objects which were read from the persistent store and should be modified. The objects to be converted are defined by a data selector object.
- Class specific aspects of the creation/update/conversion mechanism must be handled by the converters, the common aspects will be handled by the service.

Author
  Markus Frank

Version
  1.2

- Version 1.2 Remove createReps, updateReps - replaced by interface IConverter

Definition at line 37 of file IConversionSvc.h.

## Member Enumeration Documentation

enum IConversionSvc::Status

Status code definitions.

Enumerator:

  CONVERSIONSVC_NO_ERROR | Success.
  NO_CONVERTER | No proper converter is available to the service.

Definition at line 97 of file IConversionSvc.h.

{
CONVERSIONSVC_NO_ERROR = ICONVERSIONSVC_LAST_ERROR+1,
NO_CONVERTER
};

## Constructor & Destructor Documentation

virtual IConversionSvc::~IConversionSvc | ( |  | ) |
| inline virtual

Virtual destructor.

Definition at line 94 of file IConversionSvc.h.

{}

## Member Function Documentation

virtual StatusCode IConversionSvc::addConverter | ( | IConverter * | pConverter | ) |
| pure virtual

Add converter object to conversion service.

Parameters

  pConverter | Pointer to converter object

Returns
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::addConverter | ( | const CLID & | clid | ) |
| pure virtual

Add converter object to conversion service.

Parameters

  clid | Class ID of the converter needed

Returns
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::commitOutput | ( | const std::string & | outputFile,
|  | bool | do_commit
| ) |  |
| pure virtual

Commit pending output.

Parameters

  outputFile | String containing output file
  do_commit | if true commit the output and flush eventually pending items to the database if false, discard pending buffers. Note: The possibility to commit or roll-back depends on the database technology used!

Returns
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::connectOutput | ( | const std::string & | outputFile | ) |
| pure virtual

Connect the output file to the service.

Parameters

  outputFile | String containing output file

Returns
  Status code indicating success or failure.

virtual StatusCode IConversionSvc::connectOutput | ( | const std::string & | outputFile,
|  | const std::string & | openMode
| ) |  |
| pure virtual

Connect the output file to the service with open mode.

Parameters

  outputFile | String containing output file
  openMode | String containing opening mode of the output file

Returns
  Status code indicating success or failure.

virtual IConverter* IConversionSvc::converter | ( | const CLID & | clid | ) |
| pure virtual

Retrieve converter from list.

Parameters

  clid | the clid of the converter

Returns
  the converter corresponding to clid or 0 if none was found

IConversionSvc::DeclareInterfaceID | ( | IConversionSvc | ,
|  | 4 | ,
|  | 0 |
| ) |  |

InterfaceID.

virtual StatusCode IConversionSvc::removeConverter | ( | const CLID & | clid | ) |
| pure virtual

Remove converter object from conversion service (if present).

The converter is defined by the class type of the objects created.

Parameters

  clid | Class ID of the converter

Returns
  Status code indicating success or failure.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/GaudiKernel/IConversionSvc.h