ATLAS Offline Software
IOODatabase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //====================================================================
6 // IOODatabase interface definition
7 //--------------------------------------------------------------------
8 //
9 // Package : StorageSvc (The pool framework)
10 //
11 // Description: Interface of the Db persistenty service
12 //
13 // @author M.Frank
14 //
15 //====================================================================
16 #ifndef POOL_IOODATABASE_H
17 #define POOL_IOODATABASE_H
18 
19 // Framework include files
20 #include "StorageSvc/pool.h"
21 #include "StorageSvc/DbType.h"
22 
23 class Guid;
24 
25 /*
26  * POOL namespace declaration
27  */
28 namespace pool {
29 
30  // Forward declarations
31  class IDbDomain;
32  class IDbDatabase;
33  class IDbContainer;
34 
50  class IOODatabase : public RefCounter {
51  public:
52  virtual ~IOODatabase() {}
53 
54  public:
56  virtual const std::string& name () const = 0;
57 
59  virtual IDbDomain* createDomain(void) = 0;
61  virtual IDbDatabase* createDatabase(void) = 0;
63  virtual IDbContainer* createContainer(const DbType& typ) = 0;
64 
66  void release() { if( RefCounter::subRef() <= 0 ) delete this; }
67  };
68 } // End namespace pool
69 #endif // POOL_IOODATABASE_H
pool
pool namespace
Definition: libname.h:15
pool::IDbContainer
Definition: IDbContainer.h:47
pool::IDbDomain
Definition: IDbDomain.h:40
pool::IOODatabase::release
void release()
delete object if ref count drops to 0
Definition: IOODatabase.h:66
DbType.h
pool::IDbDatabase
Definition: IDbDatabase.h:41
pool::DbType
Definition: DbType.h:31
pool::IOODatabase::name
virtual const std::string & name() const =0
Name of the Database implementation.
pool::RefCounter::subRef
int subRef()
Decrease the reference count.
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:141
pool::RefCounter
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:130
pool.h
pool::IOODatabase::createDatabase
virtual IDbDatabase * createDatabase(void)=0
Create Database.
pool::IOODatabase::createContainer
virtual IDbContainer * createContainer(const DbType &typ)=0
Create Database container.
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition: Guid.h:20
pool::IOODatabase::createDomain
virtual IDbDomain * createDomain(void)=0
Create Database domain.
pool::IOODatabase
Definition: IOODatabase.h:50
pool::IOODatabase::~IOODatabase
virtual ~IOODatabase()
Definition: IOODatabase.h:52