The Gaudi Framework  v30r4 (9b837755)
PersistencySvc.cpp
Go to the documentation of this file.
1 //====================================================================
2 // PersistencySvc.cpp
3 //--------------------------------------------------------------------
4 //
5 // Package : System ( The LHCb Offline System)
6 //
7 // Description: implementation of the PersistencySvc
8 //
9 // Author : M.Frank
10 // History :
11 // +---------+----------------------------------------------+---------
12 // | Date | Comment | Who
13 // +---------+----------------------------------------------+---------
14 // | 29/10/98| Initial version | MF
15 // +---------+----------------------------------------------+---------
16 //
17 //====================================================================
18 #define PERSISTENCYSVC_PERSISTENCYSVC_CPP
19 
20 // Interface definitions
21 #include "GaudiKernel/DataObject.h"
22 #include "GaudiKernel/IConverter.h"
27 #include "GaudiKernel/MsgStream.h"
28 #include "GaudiKernel/SmartIF.h"
30 #include "GaudiKernel/strcasecmp.h"
31 
32 // Implementation specific definitions
33 #include "PersistencySvc.h"
34 
35 // Instantiation of a static factory class used by clients to create
36 // instances of this service
38 
48 };
49 
51 {
52  if ( m_enable ) {
53  IConversionSvc* svc = nullptr;
54  switch ( typ ) {
55  case CREATE_REP:
56  case FILL_REP_REFS:
57  case UPDATE_REP:
58  case UPDATE_REP_REFS:
59  svc = m_cnvDefault;
60  break;
61  default:
62  if ( !pAddress ) return Status::INVALID_ADDRESS;
63  svc = service( pAddress->svcType() );
64  if ( !svc ) return Status::BAD_STORAGE_TYPE;
65  break;
66  }
67 
68  StatusCode status( StatusCode::FAILURE, true );
69  switch ( typ ) {
70  case CREATE_OBJ:
71  pObject = nullptr;
72  status = svc->createObj( pAddress, pObject );
73  break;
74  case FILL_OBJ_REFS:
75  status = svc->fillObjRefs( pAddress, pObject );
76  break;
77  case UPDATE_OBJ:
78  status = svc->updateObj( pAddress, pObject );
79  break;
80  case UPDATE_OBJ_REFS:
81  status = svc->updateObjRefs( pAddress, pObject );
82  break;
83  case CREATE_REP:
84  status = svc->createRep( pObject, pAddress );
85  break;
86  case FILL_REP_REFS:
87  status = svc->fillRepRefs( pAddress, pObject );
88  break;
89  case UPDATE_REP:
90  status = svc->updateRep( pAddress, pObject );
91  break;
92  case UPDATE_REP_REFS:
93  status = svc->updateRepRefs( pAddress, pObject );
94  break;
95  default:
96  status = StatusCode::FAILURE;
97  break;
98  }
99  status.ignore();
100  return status;
101  }
102  return StatusCode::SUCCESS;
103 }
104 
107 {
108  return makeCall( CREATE_OBJ, pAddr, refpObj );
109 }
110 
113 {
114  return makeCall( FILL_OBJ_REFS, pAddr, pObj );
115 }
116 
119 {
120  return makeCall( UPDATE_OBJ, pAddr, pObj );
121 }
122 
125 {
126  return makeCall( UPDATE_OBJ_REFS, pAddr, pObj );
127 }
128 
131 {
132  return makeCall( CREATE_REP, refpAddr, pObj );
133 }
134 
137 {
138  return makeCall( FILL_REP_REFS, pAddr, pObj );
139 }
140 
143 {
144  return makeCall( UPDATE_REP, pAddr, pObj );
145 }
146 
149 {
150  return makeCall( UPDATE_REP_REFS, pAddr, pObj );
151 }
152 
155 {
156  long typ = type;
157  auto it = m_cnvServices.find( typ );
158  if ( it == m_cnvServices.end() ) {
159  IConversionSvc* s = service( type );
160  if ( s ) {
161  it = m_cnvServices.find( typ );
162  if ( it != m_cnvServices.end() ) return it->second.addrCreator();
163  }
164  static SmartIF<IAddressCreator> no_creator;
165  return no_creator;
166  }
167  return it->second.addrCreator();
168 }
169 
172 {
173  m_dataSvc = pDataSvc;
174  for ( auto& i : m_cnvServices ) {
175  i.second.conversionSvc()->setDataProvider( m_dataSvc ).ignore();
176  }
177  return StatusCode( StatusCode::SUCCESS, true );
178 }
179 
182 
185 {
186  m_cnvDefault = svc;
187  return StatusCode( StatusCode::SUCCESS, true );
188 }
189 
192 
195 
198 {
199  if ( !pConverter ) return Status::NO_CONVERTER;
200  IConversionSvc* svc = service( pConverter->repSvcType() );
201  return svc ? svc->addConverter( pConverter ) : Status::BAD_STORAGE_TYPE;
202 }
203 
206 {
207  // Remove converter type from all services
208  StatusCode status = Status::NO_CONVERTER, iret = StatusCode::SUCCESS;
209  for ( auto& i : m_cnvServices ) {
210  iret = i.second.conversionSvc()->removeConverter( clid );
211  if ( iret.isSuccess() ) status = iret;
212  }
213  return status;
214 }
215 
217 IConverter* PersistencySvc::converter( const CLID& /*clid*/ ) { return nullptr; }
218 
221 {
224  [&]( Services::const_reference i ) { return i.second.service()->name() == tn.name(); } );
225  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
226 
227  auto svc = Service::service<IConversionSvc>( nam, true );
228  if ( svc && addCnvService( svc.get() ).isSuccess() ) {
229  return service( nam ); // now it is in the list
230  }
231 
232  info() << "Cannot access Conversion service:" << nam << endmsg;
233  static SmartIF<IConversionSvc> no_svc;
234  return no_svc;
235 }
236 
239 {
240  // Check wether this is already an active service
241  auto it = m_cnvServices.find( type );
242  if ( it != m_cnvServices.end() ) return it->second.conversionSvc();
243  // if not, check if the service is in the list and may be requested
244  for ( const auto& i : m_svcNames.value() ) {
245  auto& svc = service( i );
246  if ( svc && svc->repSvcType() == type ) return svc;
247  }
248  static SmartIF<IConversionSvc> no_svc;
249  return no_svc;
250 }
251 
254 {
255  if ( !servc ) return Status::BAD_STORAGE_TYPE;
256  long type = servc->repSvcType();
257  long def_typ = ( m_cnvDefault ? m_cnvDefault->repSvcType() : 0 );
258  auto it = m_cnvServices.find( type );
259  auto cnv_svc = ( it != m_cnvServices.end() ? it->second.conversionSvc() : nullptr );
260  if ( type == def_typ ) m_cnvDefault = servc;
261  if ( cnv_svc == servc ) return StatusCode::SUCCESS;
262 
263  auto iservc = make_SmartIF( servc );
264  auto icr = iservc.as<IAddressCreator>();
265  if ( icr ) {
266  auto isvc = iservc.as<IService>();
267  if ( isvc ) {
268  if ( cnv_svc ) removeCnvService( type ).ignore();
269  auto p = m_cnvServices.emplace( type, ServiceEntry( type, isvc, iservc, icr ) );
270  if ( !p.second ) {
271  info() << "Cannot add Conversion service of type " << isvc->name() << endmsg;
272  return StatusCode::FAILURE;
273  }
274  info() << "Added successfully Conversion service:" << isvc->name() << endmsg;
275  iservc->setAddressCreator( this ).ignore();
276  iservc->setDataProvider( m_dataSvc ).ignore();
277  return StatusCode::SUCCESS;
278  }
279  }
280  info() << "Cannot add Conversion service of type " << type << endmsg;
281  return StatusCode::FAILURE;
282 }
283 
286 {
287  auto it = m_cnvServices.find( svctype );
288  if ( it == m_cnvServices.end() ) return Status::BAD_STORAGE_TYPE;
289  it->second.service()->release();
290  it->second.addrCreator()->release();
291  m_cnvServices.erase( it );
292  return StatusCode::SUCCESS;
293 }
294 
297 
300 {
301  m_cnvDefault = service( type );
302  return StatusCode::SUCCESS;
303 }
304 
306 StatusCode PersistencySvc::connectOutput( const std::string& outputFile, const std::string& /* openMode */ )
307 {
308  return connectOutput( outputFile );
309 }
310 
313 
316 
318 StatusCode PersistencySvc::createAddress( long svc_type, const CLID& clid, const std::string* pars,
319  const unsigned long* ipars, IOpaqueAddress*& refpAddress )
320 {
321  refpAddress = nullptr;
322  IAddressCreator* svc = addressCreator( svc_type );
323  return svc ? svc->createAddress( svc_type, clid, pars, ipars, refpAddress ) : Status::BAD_STORAGE_TYPE;
324 }
325 
328 {
329  // Assumuption is that the Persistency service prepends a header
330  // and requests the conversion service refered to by the service
331  // type to encode the rest
332  long svc_type = 0;
333  CLID clid = 0;
334  if ( pAddress ) {
335  svc_type = pAddress->svcType();
336  clid = pAddress->clID();
337  }
338  IAddressCreator* svc = addressCreator( svc_type );
339  StatusCode status = Status::BAD_STORAGE_TYPE; // Preset error
340  refAddress.clear();
341 
342  if ( svc ) {
343  // Found service, set header
344  encodeAddrHdr( svc_type, clid, refAddress );
345  std::string address;
346  // Get rest of address from conversion service
347  status = svc->convertAddress( pAddress, address );
348  refAddress += address;
349  }
350  return status;
351 }
352 
354 StatusCode PersistencySvc::createAddress( long /* svc_type */, const CLID& /* clid */, const std::string& refAddress,
355  IOpaqueAddress*& refpAddress )
356 {
357  // Assumption is that the Persistency service decodes that header
358  // and requests the conversion service referred to by the service
359  // type to decode the rest
360  long new_svc_type = 0;
361  CLID new_clid = 0;
362  std::string address_trailer;
363  decodeAddrHdr( refAddress, new_svc_type, new_clid, address_trailer );
364  IAddressCreator* svc = addressCreator( new_svc_type );
365  return svc ? svc->createAddress( new_svc_type, new_clid, address_trailer, refpAddress ) : Status::BAD_STORAGE_TYPE;
366 }
367 
369 void PersistencySvc::encodeAddrHdr( long service_type, const CLID& clid, std::string& address ) const
370 {
371  // For address header, use xml-style format of
372  // <addrhdr service_type="xxx" clid="yyy" />
373  std::stringstream stream;
374  int svctyp = service_type; // must put int into stream, not char
375  stream << "<address_header service_type=\"" << svctyp << "\" clid=\"" << clid << "\" /> ";
376  address = stream.str();
377 }
378 
380 void PersistencySvc::decodeAddrHdr( const std::string& address, long& service_type, CLID& clid,
381  std::string& address_trailer ) const
382 {
383  // For address header, use xml-style format of
384  // <address_header service_type="xxx" clid="yyy" />
385  service_type = 0;
386  clid = 0;
387  address_trailer.clear();
388 
389  // Check for address_header tag
390  size_t pos = address.find( "<address_header" );
391  if ( std::string::npos != pos ) {
392  // Get service_type
393  pos = address.find( "service_type=\"" );
394  if ( std::string::npos != pos ) {
395  pos += 14;
396  size_t end = address.find( '"', pos );
397  if ( std::string::npos != end ) {
398  service_type = std::stol( address.substr( pos, end - pos ) );
399  // Get clid
400  pos = address.find( "clid=\"" );
401  if ( std::string::npos != pos ) {
402  pos += 6;
403  end = address.find( '\"', pos );
404  if ( std::string::npos != end ) {
405  std::istringstream str;
406  str.str( address.substr( pos, end - pos ) );
407  str >> clid;
408  // Get trailer_address
409  pos = address.find( '>' );
410  if ( pos < ( address.size() - 2 ) ) { // this means that '>' was found (pos != npos)
411  // it is before the last char
412  address_trailer = address.substr( pos + 1 );
413  }
414  }
415  }
416  }
417  }
418  }
419 }
420 
423 {
424  // The persistency service is a address creation dispatcher istelf.
425  // The persistency service can NEVER create addresses itself.
426  // The entry point must only be provided in order to fulfill the needs of the
427  // implementing interfaces.
428  return StatusCode::FAILURE;
429 }
430 
433 
435 StatusCode PersistencySvc::getService( long service_type, IConversionSvc*& refpSvc )
436 {
437  refpSvc = service( service_type );
438  return refpSvc ? StatusCode::SUCCESS : StatusCode::FAILURE;
439 }
440 
443 {
444  const char* imp = service_type.c_str();
445  long len = service_type.length();
446  if (::strncasecmp( imp, "SICB", len ) == 0 )
447  return getService( SICB_StorageType, refpSvc );
448  else if (::strncasecmp( imp, "ZEBRA", len ) == 0 )
449  return getService( SICB_StorageType, refpSvc );
450  else if (::strncasecmp( imp, "MS Access", len ) == 0 )
451  return getService( ACCESS_StorageType, refpSvc );
452  else if (::strncasecmp( imp, "Microsoft Access", strlen( "Microsoft Access" ) ) == 0 )
453  return getService( ACCESS_StorageType, refpSvc );
454  else if (::strncasecmp( imp, "SQL Server", len ) == 0 )
455  return getService( SQLSERVER_StorageType, refpSvc );
456  else if (::strncasecmp( imp, "Microsoft ODBC for Oracle", len ) == 0 )
457  return getService( ORACLE_StorageType, refpSvc );
458  else if (::strncasecmp( imp, "Oracle ODBC", strlen( "Oracle ODBC" ) ) == 0 )
459  return getService( ORACLE_StorageType, refpSvc );
460  else if (::strncasecmp( imp, "Oracle OCI", strlen( "Oracle OCI" ) ) == 0 )
461  return getService( ORACLE_StorageType, refpSvc );
462  else if (::strncasecmp( imp, "MySQL", len ) == 0 )
463  return getService( MYSQL_StorageType, refpSvc );
464  else if (::strncasecmp( imp, "ROOT", len ) == 0 )
465  return getService( ROOT_StorageType, refpSvc );
466  else if (::strncasecmp( imp, "OBJY", len ) == 0 )
467  return getService( OBJY_StorageType, refpSvc );
468  else if (::strncasecmp( imp, "OBJYECTI", 7 ) == 0 )
469  return getService( OBJY_StorageType, refpSvc );
470  else if (::strncasecmp( imp, "POOL_ROOTKEY", 12 ) == 0 )
471  return getService( POOL_ROOTKEY_StorageType, refpSvc );
472  else if (::strncasecmp( imp, "POOL_ROOTTREE", 12 ) == 0 )
473  return getService( POOL_ROOTTREE_StorageType, refpSvc );
474  else if (::strncasecmp( imp, "POOL_ROOT", 9 ) == 0 )
475  return getService( POOL_ROOT_StorageType, refpSvc );
476  else if (::strncasecmp( imp, "POOL_MySQL", 8 ) == 0 )
477  return getService( POOL_MYSQL_StorageType, refpSvc );
478  else if (::strncasecmp( imp, "POOL_ORACLE", 8 ) == 0 )
479  return getService( POOL_ORACLE_StorageType, refpSvc );
480  else if (::strncasecmp( imp, "POOL_ACCESS", 8 ) == 0 )
481  return getService( POOL_ACCESS_StorageType, refpSvc );
482  else if (::strncasecmp( imp, "POOL", 4 ) == 0 )
483  return getService( POOL_StorageType, refpSvc );
484 
485  for ( const auto& i : m_cnvServices ) {
486  SmartIF<IService> svc( i.second.conversionSvc() );
487  if ( svc ) {
488  // Check wether this is already an active service: first check by service name
489  if ( svc->name() == service_type ) {
490  refpSvc = i.second.conversionSvc();
491  return StatusCode::SUCCESS;
492  }
493  // Check wether this is already an active service: now check by service type
494  auto instance = svc.get();
495  if ( System::typeinfoName( typeid( *instance ) ) == service_type ) {
496  refpSvc = i.second.conversionSvc();
497  return StatusCode::SUCCESS;
498  }
499  }
500  }
501  // if not, check if the service is in the list and may be requested
502  for ( const auto& i : m_svcNames.value() ) {
504  if ( itm.name() == service_type || itm.type() == service_type ) {
505  IConversionSvc* svc = service( i );
506  if ( svc ) {
507  refpSvc = svc;
508  return StatusCode::SUCCESS;
509  }
510  }
511  }
512  return StatusCode::FAILURE;
513 }
514 
516 const CLID& PersistencySvc::objType() const { return CLID_NULL; }
517 
520 {
521  m_addrCreator = this; // initialize internal pointer to IAddressCreator interface
522  // Initialize basic service
523  StatusCode status = Service::initialize();
524  if ( UNLIKELY( !status.isSuccess() ) ) {
525  error() << "Error initializing Service base class." << endmsg;
526  }
527  return status;
528 }
529 
532 {
533  // Release all workers
535  // Release references to this to avoid loops
536  m_addrCreator = nullptr;
537  return StatusCode::SUCCESS;
538 }
539 
541 bool PersistencySvc::enable( bool value )
542 {
543  std::swap( value, m_enable );
544  return value;
545 }
SmartIF< IAddressCreator > m_addrCreator
Pointer to the IAddressCreator interface of this, for addressCreator().
#define UNLIKELY(x)
Definition: Kernel.h:89
SmartIF< IConversionSvc > & service(const std::string &nam)
Retrieve conversion service by name.
constexpr static const auto FAILURE
Definition: StatusCode.h:88
SmartIF< IConversionSvc > & conversionSvc() const
SmartIF< IAddressCreator > & addressCreator() const override
Retrieve address creator facility.
StatusCode initialize() override
Definition: Service.cpp:63
SmartIF< IAddressCreator > & addrCreator() const
The data converters are responsible to translate data from one representation into another...
Definition: IConverter.h:58
virtual const CLID & clID() const =0
Retrieve class information from link.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject)=0
Create the transient representation of an object.
StatusCode initialize() override
Initialize the service.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
StatusCode connectOutput(const std::string &outputFile, const std::string &openMode) override
Connect the output file to the service with open mode.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:332
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ipar, IOpaqueAddress *&refpAddress)=0
Create a Generic address using explicit arguments to identify a single object.
T swap(T...args)
Gaudi::Property< std::vector< std::string > > m_svcNames
bool isSuccess() const
Definition: StatusCode.h:287
const long ACCESS_StorageType
Definition: ClassID.h:60
IAddressCreator interface definition.
SmartIF< IService > & service() const
bool m_enable
Flag to indicate that the service is enabled.
StatusCode setConversionSvc(IConversionSvc *svc) override
Set conversion service the converter is connected to.
virtual StatusCode addConverter(IConverter *pConverter)=0
Add converter object to conversion service.
StatusCode makeCall(int typ, IOpaqueAddress *&pAddress, DataObject *&pObject)
Implementation helper.
T end(T...args)
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)=0
Convert the transient object to the requested representation.
const long MYSQL_StorageType
Definition: ClassID.h:64
Data provider interface definition.
StatusCode removeConverter(const CLID &clid) override
Remove converter object from conversion service (if present).
virtual StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an already converted object.
const long POOL_MYSQL_StorageType
Definition: ClassID.h:72
StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the converted representation of a transient object.
StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the references of an updated transient object.
StatusCode addConverter(IConverter *pConverter) override
Add converter object to conversion service.
virtual StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject)=0
Update the transient object from the other representation.
StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress) override
Convert an address to string form.
STL class.
const long POOL_ROOTKEY_StorageType
Definition: ClassID.h:69
#define DECLARE_COMPONENT(type)
StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the created transient object.
bool enable(bool value)
Set enabled flag.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
StatusCode setDataProvider(IDataProviderSvc *pStore) override
Define transient datastore.
const long POOL_ACCESS_StorageType
Definition: ClassID.h:71
Helper class to parse a string of format "type/name".
void encodeAddrHdr(long service_type, const CLID &clid, std::string &address) const
Retrieve string from storage type and clid.
General service interface definition.
Definition: IService.h:18
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Implementation of IConverter: Convert the transient object to the requested representation.
StatusCode finalize() override
stop the service.
virtual StatusCode updateObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the references of an updated transient object.
StatusCode getService(long service_type, IConversionSvc *&refpSvc) override
Retrieve conversion service identified by technology.
T erase(T...args)
CnvSvcAction
const long POOL_ORACLE_StorageType
Definition: ClassID.h:73
SmartIF< IConversionSvc > m_cnvDefault
Default output service.
StatusCode commitOutput(const std::string &output, bool do_commit) override
Commit pending output.
T str(T...args)
PersistencySvc class implementation definition.
const long ROOT_StorageType
Definition: ClassID.h:52
StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Resolve the references of the converted object.
SmartIF< IConversionSvc > & conversionSvc() const override
Get conversion service the converter is connected to.
virtual long svcType() const =0
Retrieve service type.
SmartIF< IDataProviderSvc > & dataProvider() const override
Access reference to transient datastore.
virtual StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject)=0
Update the converted representation of a transient object.
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
T clear(T...args)
const long ORACLE_StorageType
Definition: ClassID.h:65
const long POOL_ROOT_StorageType
Definition: ClassID.h:68
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
StatusCode addCnvService(IConversionSvc *service) override
Add a new Service.
StatusCode removeCnvService(long type) override
Remove a Service.
StatusCode updateObj(IOpaqueAddress *pAddress, DataObject *refpObject) override
Implementation of IConverter: Update the transient object from the other representation.
StatusCode createAddress(long svc_type, const CLID &clid, const std::string *pars, const unsigned long *ipars, IOpaqueAddress *&refpAddress) override
Create a Generic address using explicit arguments to identify a single object.
const long POOL_StorageType
Definition: ClassID.h:67
T find(T...args)
T size(T...args)
virtual StatusCode fillObjRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the created transient object.
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
const long POOL_ROOTTREE_StorageType
Definition: ClassID.h:70
virtual StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress)=0
Convert an address to string form.
T begin(T...args)
StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Implementation of IConverter: Create the transient representation of an object.
const std::string & type() const
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:165
T c_str(T...args)
Services m_cnvServices
List of convermsion workers.
T emplace(T...args)
string s
Definition: gaudirun.py:253
StatusCode setAddressCreator(IAddressCreator *creator) override
Set address creator facility.
T substr(T...args)
SmartIF< IFace > make_SmartIF(IFace *iface)
Definition: SmartIF.h:152
void decodeAddrHdr(const std::string &address, long &service_type, CLID &clid, std::string &address_trailer) const
Retrieve storage type and clid from address header of string.
const long SQLSERVER_StorageType
Definition: ClassID.h:63
const std::string & name() const
virtual SmartIF< IConversionSvc > & conversionSvc() const =0
Get conversion service the converter is connected to.
Opaque address interface definition.
const long OBJY_StorageType
Definition: ClassID.h:53
StatusCode setDefaultCnvService(long type) override
Set default service type.
const long SICB_StorageType
Definition: ClassID.h:51
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
const CLID & objType() const override
Retrieve the class type of objects the converter produces. (DUMMY)
virtual StatusCode fillRepRefs(IOpaqueAddress *pAddress, DataObject *pObject)=0
Resolve the references of the converted object.
StatusCode updateRepRefs(IOpaqueAddress *pAddress, DataObject *pObject) override
Implementation of IConverter: Update the references of an already converted object.
T stol(T...args)
long repSvcType() const override
Return default service type.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to datma provider service.
IConverter * converter(const CLID &clid) override
Retrieve converter from list.