![]() |
ATLAS Offline Software
|
Description: Definition of the object describing a database container Handle managing a DbContainerObj, which is a container of persistent objects. More...
#include <StorageSvc/DbContainer.h>
Public Member Functions | |
| DbContainer (const DbType &typ=POOL_StorageType) | |
| Constructor with initializing arguments. | |
| DbContainer (const DbContainer &c) | |
| Copy constructor. | |
| DbContainer (DbContainerObj *ptr) | |
| Constructor taking transient object. | |
| virtual | ~DbContainer () |
| Standard Destructor. | |
| DbContainer & | operator= (const DbContainer ©) |
| Assignment operator. | |
| DbContainer & | operator= (const int) |
| Assignment operator to reset the handle easily using 0. | |
| int | refCount () const |
| Access reference counter. | |
| const std::string & | name () const |
| Name of the container the handle is supposed to point to. | |
| DbAccessMode | openMode () const |
| Mode of the handle (READ,WRITE,...) | |
| uint64_t | size () |
| Access to the size of the container. | |
| DbDatabase & | containedIn () |
| Access to the Database the container resides in. | |
| const IDbContainer * | info () const |
| Let the implementation access the internals. | |
| IDbContainer * | info () |
| const DbTypeInfo * | objectShape (const Guid &nam) |
| Retrieve persistent type information by name. | |
| const Token * | token () const |
| Access the token of the container object. | |
| StatusCode | close () |
| Close the container the handle points to. | |
| 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 | 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. | |
| bool | isOpen () const |
| Check if the container was opened. | |
| StatusCode | transAct (Transaction::Action action) |
| Execute Database Transaction Action. | |
| StatusCode | setOption (const DbOption &refOpt) |
| Pass options to the implementation. | |
| StatusCode | getOption (DbOption &refOpt) |
| Access options. | |
| StatusCode | next (Token::OID_t &linkH) |
| Access objects through select staements. | |
| StatusCode | allocate (const void *object, ShapeH shape, Token::OID_t &oid) |
| Access objects using pointer and shape. | |
| StatusCode | load (void **ptr, ShapeH shape, const Token::OID_t &lH) |
| Select object in the container identified by its handle. | |
| StatusCode | store (const void *object, const DbTypeInfo *typ) |
| Access objects by handle directly. | |
| DbContainerObj * | operator-> () |
| Dereference operator. | |
| bool | operator! () const |
| Validity check through operator NOT. | |
| const DbContainerObj * | ptr () const |
| Access to underlying object. | |
| bool | isValid () const |
| Validity check (Objy like) | |
| const DbType & | type () const |
| Inquire storage type of the handle. | |
Protected Types | |
| typedef DbContainerObj | _DataType |
| Data type definition. | |
| typedef DbHandleBase< _DataType > | Base |
| Data type definition. | |
Protected Member Functions | |
| void | setType (const DbType &typ) |
| Set handle type. | |
| void | setPtr (DbContainerObj *ptr) |
| Set data pointer. | |
Protected Attributes | |
| DbContainerObj * | m_ptr |
| Data member: Object pointer. Sub-classes need access on re-assignment. | |
| DbType | m_type |
| Data member: Technology type. Sub-classes need access on re-assignment. | |
Private Member Functions | |
| void | switchPtr (DbContainerObj *obj) |
| Assign transient object properly (including reference counting) | |
Description: Definition of the object describing a database container Handle managing a DbContainerObj, which is a container of persistent objects.
Definition at line 49 of file DbContainer.h.
|
protectedinherited |
Data type definition.
Definition at line 34 of file DbHandleBase.h.
|
protectedinherited |
Data type definition.
Definition at line 36 of file DbHandleBase.h.
|
inlineexplicit |
Constructor with initializing arguments.
Definition at line 56 of file DbContainer.h.
|
inline |
Copy constructor.
Definition at line 58 of file DbContainer.h.
|
inline |
Constructor taking transient object.
Definition at line 60 of file DbContainer.h.
|
inlinevirtual |
| StatusCode pool::DbContainer::allocate | ( | const void * | object, |
| ShapeH | shape, | ||
| Token::OID_t & | oid ) |
Access objects using pointer and shape.
In place allocation of object location
| StatusCode pool::DbContainer::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.
| dbH | [IN] Valid handle to database object |
| nam | [IN] Name of the container to be opened. |
| dbtyp | [IN] Database type (including minor type) |
| StatusCode pool::DbContainer::close | ( | ) |
Close the container the handle points to.
| DbDatabase & pool::DbContainer::containedIn | ( | ) |
Access to the Database the container resides in.
| StatusCode pool::DbContainer::getOption | ( | DbOption & | refOpt | ) |
Access options.
| IDbContainer * pool::DbContainer::info | ( | ) |
| const IDbContainer * pool::DbContainer::info | ( | ) | const |
Let the implementation access the internals.
| bool pool::DbContainer::isOpen | ( | ) | const |
Check if the container was opened.
|
inlineinherited |
Validity check (Objy like)
Definition at line 68 of file DbHandleBase.h.
| StatusCode pool::DbContainer::load | ( | void ** | ptr, |
| ShapeH | shape, | ||
| const Token::OID_t & | lH ) |
Select object in the container identified by its handle.
| const std::string & pool::DbContainer::name | ( | ) | const |
Name of the container the handle is supposed to point to.
| StatusCode pool::DbContainer::next | ( | Token::OID_t & | linkH | ) |
Access objects through select staements.
This access type is ideal for relational Databases. Other technologies only have very limited support for this interface. Fetch next object address to set token
| const DbTypeInfo * pool::DbContainer::objectShape | ( | const Guid & | nam | ) |
Retrieve persistent type information by name.
| StatusCode pool::DbContainer::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.
| dbH | [IN] Valid handle to database object |
| nam | [IN] Name of the container to be opened. |
| typ | [IN] Type information in the event the container must be created. |
| dbtyp | [IN] Database type (including minor type) |
| mod | [IN] Access mode. |
| DbAccessMode pool::DbContainer::openMode | ( | ) | const |
Mode of the handle (READ,WRITE,...)
|
inlineinherited |
|
inlineinherited |
|
inline |
Assignment operator.
Definition at line 64 of file DbContainer.h.
|
inline |
Assignment operator to reset the handle easily using 0.
Definition at line 72 of file DbContainer.h.
|
inlineinherited |
| int pool::DbContainer::refCount | ( | ) | const |
Access reference counter.
| StatusCode pool::DbContainer::setOption | ( | const DbOption & | refOpt | ) |
Pass options to the implementation.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
| uint64_t pool::DbContainer::size | ( | ) |
Access to the size of the container.
| StatusCode pool::DbContainer::store | ( | const void * | object, |
| const DbTypeInfo * | typ ) |
Access objects by handle directly.
This is the generic "direct" object access. Store object in location
|
private |
Assign transient object properly (including reference counting)
| const Token * pool::DbContainer::token | ( | ) | const |
Access the token of the container object.
| StatusCode pool::DbContainer::transAct | ( | Transaction::Action | action | ) |
Execute Database Transaction Action.
|
inlineinherited |
|
protectedinherited |
Data member: Object pointer. Sub-classes need access on re-assignment.
Definition at line 38 of file DbHandleBase.h.
|
protectedinherited |
Data member: Technology type. Sub-classes need access on re-assignment.
Definition at line 40 of file DbHandleBase.h.