12#ifndef POOL_DBCONTAINER_H
13#define POOL_DBCONTAINER_H
63 if ( © !=
this ) {
77 const std::string&
name()
const;
105 const std::string& nam,
118 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.
DbStatus close()
Close the container the handle points to.
const DbTypeInfo * objectShape(const Guid &nam)
Retrieve persistent type information by name.
DbStatus next(Token::OID_t &linkH)
Access objects through select staements.
DbContainer & operator=(const int)
Assignment operator to reset the handle easily using 0.
DbContainer(const DbType &typ=POOL_StorageType)
Constructor with initializing arguments.
DbStatus getOption(DbOption &refOpt)
Access options.
const Token * token() const
Access the token of the container object.
DbStatus setOption(const DbOption &refOpt)
Pass options to the implementation.
DbAccessMode openMode() const
Mode of the handle (READ,WRITE,...)
DbStatus transAct(Transaction::Action action)
Execute Database Transaction Action.
int refCount() const
Access reference counter.
DbContainer(DbContainerObj *ptr)
Constructor taking transient object.
uint64_t size()
Access to the size of the container.
const std::string & name() const
Name of the container the handle is supposed to point to.
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.
DbStatus load(void **ptr, ShapeH shape, const Token::OID_t &lH)
Select object in the container identified by its handle.
virtual ~DbContainer()
Standard Destructor.
DbStatus allocate(const void *object, ShapeH shape, Token::OID_t &oid)
Access objects using pointer and shape.
DbStatus 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.
DbStatus store(const void *object, const DbTypeInfo *typ)
Access objects by handle directly.
const IDbContainer * info() const
Let the implementation access the internals.
DbContainer & operator=(const DbContainer ©)
Assignment operator.
DbStatus 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.
DbContainer(const DbContainer &c)
Copy constructor.
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.
This class is highly inspired by the error code distribution system as it is used in DEC/VMS or MS/WN...
Definition of class DbTypeInfo.
const class Shape * ShapeH
static const DbType POOL_StorageType