ATLAS Offline Software
Loading...
Searching...
No Matches
IStorageSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef POOL_ISTORAGESVC_H
6#define POOL_ISTORAGESVC_H
7
8// Framework include files
10
11// STL include files
12#include <string>
13
14// Forward declarations
15class Guid;
16class Token;
17class StatusCode;
18
19/*
20 * pool namespace declaration
21 */
22namespace pool {
23
24 // Forward declarations
25 class FileDescriptor;
26 class DbOption;
27
28 typedef class DatabaseConnection *ConnectionH;
29 typedef const class Shape *ShapeH;
30
52 protected:
54 virtual ~IStorageSvc() { }
55
56 public:
58 virtual unsigned int addRef() = 0;
59
61 virtual unsigned int release() = 0;
62
64
69 virtual std::string getContName(FileDescriptor& refDB,
70 Token& pToken) = 0;
71
73
84 virtual StatusCode allocate( FileDescriptor& refDB,
85 const std::string& refCont,
86 int technology,
87 const void* object,
88 ShapeH shapeH,
89 Token*& refpTok) = 0;
90
91
93
101 virtual StatusCode read( const FileDescriptor& refDB,
102 const Token& pToken,
103 ShapeH shapeH,
104 void** object) = 0;
105
107
119 virtual StatusCode getShape( FileDescriptor& refDB,
120 const Guid& objType,
121 ShapeH& shapeH) = 0;
122
124
129 virtual ShapeH createShape( const Guid& shapeID ) = 0;
130
132
146 virtual StatusCode startSession(int mode, int tech) = 0;
147
149
157 virtual StatusCode endSession() = 0;
158
160
167 virtual StatusCode existsConnection(const FileDescriptor& refDB) = 0;
168
170
184 virtual StatusCode connect(int mode, FileDescriptor& refDB) = 0;
185
187
200 virtual StatusCode disconnect( FileDescriptor& refDB) = 0;
201
203
209 virtual StatusCode openMode( FileDescriptor& refDB,
210 int& mode ) = 0;
211
213
225 virtual StatusCode endTransaction( ConnectionH conn, Transaction::Action typ) = 0;
226
228
238 virtual StatusCode getDomainOption(DbOption& opt) = 0;
239
241
251 virtual StatusCode setDomainOption(const DbOption& opt) = 0;
252
253 };
254
255 // Factory function
256 IStorageSvc* createStorageSvc(const std::string& componentName);
257
258} // End namespace pool
259#endif // POOL_ISTORAGESVC_H
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition Guid.h:25
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
Definition of the DbConnection class.
Description: Definition an option to be supplied to database objects.
Definition DbOption.h:37
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:51
virtual StatusCode read(const FileDescriptor &refDB, const Token &pToken, ShapeH shapeH, void **object)=0
Read a persistent object from the medium.
virtual StatusCode startSession(int mode, int tech)=0
Start a new Database Session.
virtual StatusCode getShape(FileDescriptor &refDB, const Guid &objType, ShapeH &shapeH)=0
Retrieve persistent shape from Storage manager.
virtual std::string getContName(FileDescriptor &refDB, Token &pToken)=0
Get container name for object.
virtual StatusCode endSession()=0
End the Database session.
virtual ShapeH createShape(const Guid &shapeID)=0
Create a Shape representation based on a ShapeID.
virtual StatusCode getDomainOption(DbOption &opt)=0
Access options for a given database domain.
virtual ~IStorageSvc()
Destructor (called only by sub-classes)
Definition IStorageSvc.h:54
virtual StatusCode disconnect(FileDescriptor &refDB)=0
Disconnect from a logical Database unit.
virtual unsigned int addRef()=0
IInterface implementation: Reference Interface instance.
virtual StatusCode connect(int mode, FileDescriptor &refDB)=0
Connect to a logical Database unit.
virtual StatusCode openMode(FileDescriptor &refDB, int &mode)=0
Query the access mode of a Database unit.
virtual StatusCode allocate(FileDescriptor &refDB, const std::string &refCont, int technology, const void *object, ShapeH shapeH, Token *&refpTok)=0
Register object for write.
virtual StatusCode setDomainOption(const DbOption &opt)=0
Set options for a given database domain.
virtual StatusCode endTransaction(ConnectionH conn, Transaction::Action typ)=0
End/Finish an existing Transaction sequence.
virtual StatusCode existsConnection(const FileDescriptor &refDB)=0
Check the existence of a logical Database unit.
virtual unsigned int release()=0
IInterface implementation: Release Interface instance.
Description:
Definition Shape.h:35
pool namespace
Definition libname.h:15
IStorageSvc * createStorageSvc(const std::string &componentName)
class DatabaseConnection * ConnectionH
const class Shape * ShapeH