12#ifndef POOL_DBCONTAINER_H
13#define POOL_DBCONTAINER_H
65 if ( © !=
this ) {
79 const std::string&
name()
const;
107 const std::string& nam,
120 const std::string& nam,
This file contains the class definition for the Token class (migrated from POOL).
This class provides a token that identifies in a unique way objects on the persistent storage.
StatusCode transAct(Transaction::Action action)
Execute Database Transaction Action.
StatusCode allocate(const void *object, ShapeH shape, Token::OID_t &oid)
Access objects using pointer and shape.
StatusCode getOption(DbOption &refOpt)
Access options.
StatusCode store(const void *object, const DbTypeInfo *typ)
Access objects by handle directly.
StatusCode close()
Close the container the handle points to.
const DbTypeInfo * objectShape(const Guid &nam)
Retrieve persistent type information by name.
StatusCode open(DbDatabase &dbH, const std::string &nam, const DbTypeInfo *typ, const DbType &dbtyp, DbAccessMode mod)
Open the container residing in <file> with given name and access mode.
StatusCode load(void **ptr, ShapeH shape, const Token::OID_t &lH)
Select object in the container identified by its handle.
DbContainer & operator=(const int)
Assignment operator to reset the handle easily using 0.
DbContainer(const DbType &typ=POOL_StorageType)
Constructor with initializing arguments.
const Token * token() const
Access the token of the container object.
DbAccessMode openMode() const
Mode of the handle (READ,WRITE,...)
int refCount() const
Access reference counter.
DbContainer(DbContainerObj *ptr)
Constructor taking transient object.
uint64_t size()
Access to the size of the container.
StatusCode setOption(const DbOption &refOpt)
Pass options to the implementation.
const std::string & name() const
Name of the container the handle is supposed to point to.
StatusCode next(Token::OID_t &linkH)
Access objects through select staements.
void switchPtr(DbContainerObj *obj)
Assign transient object properly (including reference counting)
DbDatabase & containedIn()
Access to the Database the container resides in.
bool isOpen() const
Check if the container was opened.
virtual ~DbContainer()
Standard Destructor.
const IDbContainer * info() const
Let the implementation access the internals.
DbContainer & operator=(const DbContainer ©)
Assignment operator.
DbContainer(const DbContainer &c)
Copy constructor.
StatusCode checkAccess(DbDatabase &dbH, const std::string &nam, const DbType &dbtyp)
Check if we can access the residing in <file> container for reading with the given type.
Description: Handle managing a DbDatabaseObj, a generic Database object.
const DbContainerObj * ptr() const
DbHandleBase< _DataType > Base
Description: Definition an option to be supplied to database objects.
Definition of class DbTypeInfo.
const class Shape * ShapeH
static const DbType POOL_StorageType