The Gaudi Framework  v33r1 (b1225454)
IClassIDSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 // dear emacs, this is -*- C++ -*-
12 #ifndef GAUDIKERNEL_ICLASSIDSVC_H
13 #define GAUDIKERNEL_ICLASSIDSVC_H
14 
15 //<<<<<< INCLUDES >>>>>>
16 #include <string>
17 
18 #include "GaudiKernel/ClassID.h"
19 #include "GaudiKernel/IService.h"
20 #include "GaudiKernel/StatusCode.h"
21 
22 //<<<<<< FORWARD DECLARATIONS >>>>>>
23 namespace Athena {
24  class PackageInfo;
25 }
26 //<<<<<< CLASS DECLARATIONS >>>>>>
32 class IClassIDSvc : virtual public IService {
33 public:
36  virtual CLID nextAvailableID() const = 0;
38  virtual bool isIDInUse( const CLID& id ) const = 0;
40  virtual bool isNameInUse( const std::string& name ) const = 0;
42  virtual StatusCode getTypeNameOfID( const CLID& id, std::string& typeName ) const = 0;
44  virtual StatusCode getTypeInfoNameOfID( const CLID& id, std::string& typeInfoName ) const = 0;
46  virtual StatusCode getIDOfTypeName( const std::string& typeName, CLID& id ) const = 0;
48  virtual StatusCode getIDOfTypeInfoName( const std::string& typeInfoName, CLID& id ) const = 0;
50  virtual StatusCode getPackageInfoForID( const CLID& id, Athena::PackageInfo& info ) const = 0;
52  virtual StatusCode setTypePackageForID( const CLID&, const std::string& typeName, const Athena::PackageInfo&,
53  const std::string& typeInfoName = "" ) = 0;
55  static const InterfaceID& interfaceID();
56 };
57 
58 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
60  static const InterfaceID _IID( "IClassIDSvc", 1, 0 );
61  return _IID;
62 }
63 
64 #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:32
virtual bool isNameInUse(const std::string &name) const =0
check if name is used
Interface ID class.
Definition: IInterface.h:39
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:28
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
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:18
static const InterfaceID & interfaceID()
Gaudi boilerplate.
Definition: IClassIDSvc.h:59
std::string typeName(const std::type_info &typ)
Definition: Dictionary.cpp:31