![]() |
ATLAS Offline Software
|
#include <StorageSvc/DbContainer.h>
Public Member Functions | |
| DbContainer (const DbType &typ=POOL_StorageType) | |
| Constructor with initializing arguments. More... | |
| DbContainer (const DbContainer &c) | |
| Copy constructor. More... | |
| DbContainer (DbContainerObj *ptr) | |
| Constructor taking transient object. More... | |
| virtual | ~DbContainer () |
| Standard Destructor. More... | |
| DbContainer & | operator= (const DbContainer ©) |
| Assignment operator. More... | |
| DbContainer & | operator= (const int) |
| Assignment operator to reset the handle easily using 0. More... | |
| int | refCount () const |
| Access reference counter. More... | |
| const std::string & | name () const |
| Name of the container the handle is supposed to point to. More... | |
| DbAccessMode | openMode () const |
| Mode of the handle (READ,WRITE,...) More... | |
| uint64_t | size () |
| Access to the size of the container. More... | |
| DbDatabase & | containedIn () |
| Access to the Database the container resides in. More... | |
| const IDbContainer * | info () const |
| Let the implementation access the internals. More... | |
| IDbContainer * | info () |
| const DbTypeInfo * | objectShape (const Guid &nam) |
| Retrieve persistent type information by name. More... | |
| const Token * | token () const |
| Access the token of the container object. More... | |
| DbStatus | close () |
| Close the container the handle points to. More... | |
| 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. More... | |
| 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. More... | |
| bool | isOpen () const |
| Check if the container was opened. More... | |
| DbStatus | transAct (Transaction::Action action) |
| Execute Database Transaction Action. More... | |
| DbStatus | setOption (const DbOption &refOpt) |
| Pass options to the implementation. More... | |
| DbStatus | getOption (DbOption &refOpt) |
| Access options. More... | |
| DbStatus | select (DbSelect &sel) |
| Access objects through select staements. More... | |
| DbStatus | fetch (DbSelect &sel) |
| Fetch next object address of the selection to set token. More... | |
| DbStatus | allocate (const void *object, ShapeH shape, Token::OID_t &oid) |
| Access objects using pointer and shape. More... | |
| DbStatus | save (const void *object, ShapeH shape, Token::OID_t &linkH) |
| Save new object in the container and return its handle. More... | |
| DbStatus | load (void **ptr, ShapeH shape, const Token::OID_t &lH) |
| Select object in the container identified by its handle. More... | |
| void * | allocate (unsigned long siz, const DbTypeInfo *typ) |
| Access objects by handle directly. More... | |
| DbStatus | free (void *ptr) |
| In place free of raw memory. More... | |
| template<class T > | |
| DbStatus | remove (const DbObjectHandle< T > &objH) |
| Remove the transient representation of the object from memory. More... | |
| template<class T > | |
| DbStatus | save (DbObjectHandle< T > &objH, const DbTypeInfo *typ) |
| Add an object to the container identified by its handle. More... | |
| template<class T > | |
| DbStatus | load (DbObjectHandle< T > &objH, const Token::OID_t &linkH, const DbTypeInfo *typ) |
| Load object in the container identified by its handle. More... | |
| template<class T > | |
| DbStatus | loadNext (DbObjectHandle< T > &objH, Token::OID_t &linkH, const DbTypeInfo *typ) |
| Load object in the container identified by its handle. More... | |
| DbContainerObj * | operator-> () |
| Dereference operator. More... | |
| const DbContainerObj * | operator-> () const |
| bool | operator! () const |
| Validity check through operator NOT. More... | |
| const DbContainerObj * | ptr () const |
| Access to underlying object. More... | |
| DbContainerObj * | ptr () |
| bool | isValid () const |
| Validity check (Objy like) More... | |
| const DbType & | type () const |
| Inquire storage type of the handle. More... | |
Protected Types | |
| typedef DbContainerObj | _DataType |
| Data type definition. More... | |
| typedef DbHandleBase< _DataType > | Base |
| Data type definition. More... | |
Protected Member Functions | |
| void | setType (const DbType &typ) |
| Set handle type. More... | |
| void | setPtr (DbContainerObj *ptr) |
| Set data pointer. More... | |
Protected Attributes | |
| DbContainerObj * | m_ptr |
| Data member: Object pointer. Sub-classes need access on re-assignment. More... | |
| DbType | m_type |
| Data member: Technology type. Sub-classes need access on re-assignment. More... | |
Private Member Functions | |
| void | switchPtr (DbContainerObj *obj) |
| Assign transient object properly (including reference counting) More... | |
| DbStatus | _load (DbObjectHandle< DbObject > &objH, const Token::OID_t &linkH, const DbTypeInfo *typ, bool any_next) |
| Load object in the container identified by its link handle. More... | |
| DbStatus | _loadNext (DbObjectHandle< DbObject > &objH, Token::OID_t &linkH, const DbTypeInfo *typ) |
| Load next object in the container identified by its link handle. More... | |
| DbStatus | _save (DbObjectHandle< DbObject > &objH, const DbTypeInfo *typ) |
| Internal add of an object entry identified by its handle. More... | |
| DbStatus | _remove (DbObjectHandle< DbObject > &objH) |
| Remove the transient representation of the object from memory. More... | |
Description: Definition of the object describing a database container Handle managing a DbContainerObj, which is a container of persistent objects.
Definition at line 48 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.
|
inline |
|
inline |
Constructor taking transient object.
Definition at line 73 of file DbContainer.h.
|
inlinevirtual |
|
private |
Load object in the container identified by its link handle.
|
private |
Load next object in the container identified by its link handle.
|
private |
Remove the transient representation of the object from memory.
|
private |
Internal add of an object entry identified by its handle.
| DbStatus pool::DbContainer::allocate | ( | const void * | object, |
| ShapeH | shape, | ||
| Token::OID_t & | oid | ||
| ) |
Access objects using pointer and shape.
In place allocation of object location
| void* pool::DbContainer::allocate | ( | unsigned long | siz, |
| const DbTypeInfo * | typ | ||
| ) |
Access objects by handle directly.
This is the generic "direct" object access. In place allocation of raw memory
| DbStatus 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) |
| DbStatus pool::DbContainer::close | ( | ) |
Close the container the handle points to.
| DbDatabase& pool::DbContainer::containedIn | ( | ) |
Access to the Database the container resides in.
Fetch next object address of the selection to set token.
| DbStatus pool::DbContainer::free | ( | void * | ptr | ) |
In place free of raw memory.
| 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 |
|
inline |
Load object in the container identified by its handle.
Definition at line 184 of file DbContainer.h.
| DbStatus pool::DbContainer::load | ( | void ** | ptr, |
| ShapeH | shape, | ||
| const Token::OID_t & | lH | ||
| ) |
Select object in the container identified by its handle.
|
inline |
Load object in the container identified by its handle.
Definition at line 189 of file DbContainer.h.
| const std::string& pool::DbContainer::name | ( | ) | const |
Name of the container the handle is supposed to point to.
| const DbTypeInfo* pool::DbContainer::objectShape | ( | const Guid & | nam | ) |
Retrieve persistent type information by name.
| DbStatus 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 |
|
inlineinherited |
Definition at line 61 of file DbHandleBase.h.
|
inline |
|
inline |
Assignment operator to reset the handle easily using 0.
Definition at line 85 of file DbContainer.h.
|
inlineinherited |
Definition at line 66 of file DbHandleBase.h.
|
inlineinherited |
| int pool::DbContainer::refCount | ( | ) | const |
Access reference counter.
|
inline |
Remove the transient representation of the object from memory.
Definition at line 177 of file DbContainer.h.
| DbStatus pool::DbContainer::save | ( | const void * | object, |
| ShapeH | shape, | ||
| Token::OID_t & | linkH | ||
| ) |
Save new object in the container and return its handle.
|
inline |
Add an object to the container identified by its handle.
Definition at line 180 of file DbContainer.h.
Access objects through select staements.
This access type is ideal for relational Databases. Other technologies only have very limited support for this interface. Perform selection. The statement belongs to the container afterwards.
Pass options to the implementation.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
| uint64_t pool::DbContainer::size | ( | ) |
Access to the size of the container.
|
private |
Assign transient object properly (including reference counting)
| DbStatus 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.
1.8.18