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
47
49 public:
52 virtual ~IStorageSvc() { }
53
55 virtual unsigned int addRef() = 0;
56
58 virtual unsigned int release() = 0;
59
61
66 virtual std::string getContName(FileDescriptor& refDB,
67 Token& pToken) const = 0;
68
70
81 virtual StatusCode allocate( FileDescriptor& refDB,
82 const std::string& refCont,
83 int technology,
84 const void* object,
85 ShapeH shapeH,
86 Token*& refpTok) = 0;
87
88
90
98 virtual StatusCode read( const FileDescriptor& refDB,
99 const Token& pToken,
100 ShapeH shapeH,
101 void** object) = 0;
102
104
116 virtual StatusCode getShape( FileDescriptor& refDB,
117 const Guid& objType,
118 ShapeH& shapeH) = 0;
119
121
126 virtual ShapeH createShape( const Guid& shapeID ) = 0;
127
129
144 virtual StatusCode startSession(Io::IoFlag mode, int tech, int ageLimit = -1) = 0;
145
147
155 virtual StatusCode endSession() = 0;
156
158
165 virtual StatusCode existsConnection(const FileDescriptor& refDB) = 0;
166
168
182 virtual StatusCode connect(Io::IoFlag mode, FileDescriptor& refDB) = 0;
183
185
198 virtual StatusCode disconnect(FileDescriptor& refDB) = 0;
199
201
207 virtual StatusCode openMode(FileDescriptor& refDB, Io::IoFlag& mode ) = 0;
208
210
222 virtual StatusCode endTransaction(FileDescriptor& refDB, Transaction::Action typ) = 0;
223
225
235 virtual StatusCode getDomainOption(DbOption& opt) = 0;
236
238
248 virtual StatusCode setDomainOption(const DbOption& opt) = 0;
249
250 };
251
252 // Factory function
253 IStorageSvc* createStorageSvc(const std::string& componentName);
254
255} // End namespace pool
256#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:22
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:48
virtual StatusCode openMode(FileDescriptor &refDB, Io::IoFlag &mode)=0
Query the access mode of a Database unit.
virtual StatusCode read(const FileDescriptor &refDB, const Token &pToken, ShapeH shapeH, void **object)=0
Read a persistent object from the medium.
virtual StatusCode getShape(FileDescriptor &refDB, const Guid &objType, ShapeH &shapeH)=0
Retrieve persistent shape from Storage manager.
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 - not protected for now because we create multipile instnces of this object by hand and wa...
Definition IStorageSvc.h:52
virtual StatusCode disconnect(FileDescriptor &refDB)=0
Disconnect from a logical Database unit.
virtual StatusCode connect(Io::IoFlag mode, FileDescriptor &refDB)=0
Connect to a logical Database unit.
virtual unsigned int addRef()=0
IInterface implementation: Reference Interface instance.
virtual StatusCode endTransaction(FileDescriptor &refDB, Transaction::Action typ)=0
End/Finish an existing Transaction sequence.
virtual StatusCode startSession(Io::IoFlag mode, int tech, int ageLimit=-1)=0
Start a new Database Session.
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 std::string getContName(FileDescriptor &refDB, Token &pToken) const =0
Get container name for object.
virtual unsigned int release()=0
IInterface implementation: Release Interface instance.
Description:
Definition Shape.h:35
::StatusCode StatusCode
StatusCode definition for legacy code.
Framework include files.
Definition libname.h:15
IStorageSvc * createStorageSvc(const std::string &componentName)
const class Shape * ShapeH