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
9#include "StorageSvc/pool.h"
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 const class Shape *ShapeH;
29
51 protected:
53 virtual ~IStorageSvc() { }
54
55 public:
57 virtual unsigned int addRef() = 0;
58
60 virtual unsigned int release() = 0;
61
63
68 virtual std::string getContName(FileDescriptor& refDB,
69 Token& pToken) = 0;
70
72
83 virtual StatusCode allocate( FileDescriptor& refDB,
84 const std::string& refCont,
85 int technology,
86 const void* object,
87 ShapeH shapeH,
88 Token*& refpTok) = 0;
89
90
92
100 virtual StatusCode read( const FileDescriptor& refDB,
101 const Token& pToken,
102 ShapeH shapeH,
103 void** object) = 0;
104
106
118 virtual StatusCode getShape( FileDescriptor& refDB,
119 const Guid& objType,
120 ShapeH& shapeH) = 0;
121
123
128 virtual ShapeH createShape( const Guid& shapeID ) = 0;
129
131
145 virtual StatusCode startSession(int mode, int tech) = 0;
146
148
156 virtual StatusCode endSession() = 0;
157
159
166 virtual StatusCode existsConnection(const FileDescriptor& refDB) = 0;
167
169
183 virtual StatusCode connect(int mode, FileDescriptor& refDB) = 0;
184
186
199 virtual StatusCode disconnect(FileDescriptor& refDB) = 0;
200
202
208 virtual StatusCode openMode(FileDescriptor& refDB, int& mode ) = 0;
209
211
223 virtual StatusCode endTransaction(FileDescriptor& refDB, Transaction::Action typ) = 0;
224
226
236 virtual StatusCode getDomainOption(DbOption& opt) = 0;
237
239
249 virtual StatusCode setDomainOption(const DbOption& opt) = 0;
250
251 };
252
253 // Factory function
254 IStorageSvc* createStorageSvc(const std::string& componentName);
255
256} // End namespace pool
257#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
Description: Definition an option to be supplied to database objects.
Definition DbOption.h:36
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:50
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:53
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 endTransaction(FileDescriptor &refDB, Transaction::Action typ)=0
End/Finish an existing Transaction sequence.
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 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
Framework include files.
Definition libname.h:15
IStorageSvc * createStorageSvc(const std::string &componentName)
const class Shape * ShapeH