The Gaudi Framework  v32r2 (46d42edc)
IClassIDSvc.h
Go to the documentation of this file.
1 // dear emacs, this is -*- C++ -*-
2 #ifndef GAUDIKERNEL_ICLASSIDSVC_H
3 #define GAUDIKERNEL_ICLASSIDSVC_H
4 
5 //<<<<<< INCLUDES >>>>>>
6 #include <string>
7 
8 #include "GaudiKernel/ClassID.h"
9 #include "GaudiKernel/IService.h"
10 #include "GaudiKernel/StatusCode.h"
11 
12 //<<<<<< FORWARD DECLARATIONS >>>>>>
13 namespace Athena {
14  class PackageInfo;
15 }
16 //<<<<<< CLASS DECLARATIONS >>>>>>
22 class IClassIDSvc : virtual public IService {
23 public:
26  virtual CLID nextAvailableID() const = 0;
28  virtual bool isIDInUse( const CLID& id ) const = 0;
30  virtual bool isNameInUse( const std::string& name ) const = 0;
32  virtual StatusCode getTypeNameOfID( const CLID& id, std::string& typeName ) const = 0;
34  virtual StatusCode getTypeInfoNameOfID( const CLID& id, std::string& typeInfoName ) const = 0;
36  virtual StatusCode getIDOfTypeName( const std::string& typeName, CLID& id ) const = 0;
38  virtual StatusCode getIDOfTypeInfoName( const std::string& typeInfoName, CLID& id ) const = 0;
40  virtual StatusCode getPackageInfoForID( const CLID& id, Athena::PackageInfo& info ) const = 0;
42  virtual StatusCode setTypePackageForID( const CLID&, const std::string& typeName, const Athena::PackageInfo&,
43  const std::string& typeInfoName = "" ) = 0;
45  static const InterfaceID& interfaceID();
46 };
47 
48 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
50  static const InterfaceID _IID( "IClassIDSvc", 1, 0 );
51  return _IID;
52 }
53 
54 #endif // GAUDIKERNEL_ICLASSIDSVC_H
virtual StatusCode getTypeInfoNameOfID(const CLID &id, std::string &typeInfoName) const =0
get user assigned type-info name associated with clID
virtual CLID nextAvailableID() const =0
get next available CLID
virtual StatusCode setTypePackageForID(const CLID &, const std::string &typeName, const Athena::PackageInfo &, const std::string &typeInfoName="")=0
associate type name, package info and type-info name with clID
virtual bool isIDInUse(const CLID &id) const =0
check if id is used
virtual StatusCode getIDOfTypeName(const std::string &typeName, CLID &id) const =0
get id associated with type name (if any)
STL class.
interface to the CLID database
Definition: IClassIDSvc.h:22
virtual bool isNameInUse(const std::string &name) const =0
check if name is used
Interface ID class.
Definition: IInterface.h:29
virtual StatusCode getTypeNameOfID(const CLID &id, std::string &typeName) const =0
get user assigned type name associated with clID
General service interface definition.
Definition: IService.h:18
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
virtual StatusCode getIDOfTypeInfoName(const std::string &typeInfoName, CLID &id) const =0
get id associated with type-info name (if any)
virtual StatusCode getPackageInfoForID(const CLID &id, Athena::PackageInfo &info) const =0
get type name associated with clID (if any)
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
static const InterfaceID & interfaceID()
Gaudi boilerplate.
Definition: IClassIDSvc.h:49
std::string typeName(const std::type_info &typ)
Definition: Dictionary.cpp:21