ATLAS Offline Software
Loading...
Searching...
No Matches
DbDomain Class Reference

Description: More...

#include <StorageSvc/DbDomain.h>

Inheritance diagram for DbDomain:
Collaboration diagram for DbDomain:

Public Member Functions

 DbDomain (DbDomainObj *dom)
 Friend's constructor.
 DbDomain (const DbType &type)
 Constructor using Db type.
 DbDomain (const DbDomain &copy)
 Copy constructor.
virtual ~DbDomain ()
 Standard destructor.
DbDomain & operator= (const DbDomain &copy)
 Assignment operator.
DbDomain & operator= (const int)
 Assignment operator to reset handel easily using 0.
const std::string & name () const
 Acces to the domain name.
int refCount () const
 Access reference counter.
StatusCode open (ITechFactory *imp, const DbType &technology, Io::IoFlag mod=Io::READ)
 Open the domain.
StatusCode close ()
 Close domain.
Io::IoFlag openMode () const
 Access to access mode.
const DbDatabaseObj * find (const std::string &db_name) const
 Find Database in domain.
DbDatabaseObj * find (const std::string &db_name)
StatusCode add (const std::string &nam, DbDatabaseObj *db)
 Add database to the domain.
StatusCode remove (DbDatabaseObj *db)
 Remove a database from the domain.
StatusCode ageOpenDbs ()
 Increase the age of all open databases.
StatusCode closeAgedDbs ()
 Check if databases are present, which aged a lot and need to be closed.
void setAgeLimit (int value)
 Set the maximal allowed age limit for files in this domain.
int ageLimit () const
 Access the maximal age limit.
ITechDomain * info ()
 Let the implementation access the internals.
const ITechDomain * info () const
StatusCode setOption (const DbOption &refOpt)
 Set domain specific options.
StatusCode getOption (DbOption &refOpt) const
 Access domain specific options.
ITechFactory * techFactory ()
 Allow access to the Database implementation.
const ITechFactory * techFactory () const
DbDomainObj * operator-> ()
 Dereference operator.
bool operator! () const
 Validity check through operator NOT.
const DbDomainObj * 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 DbDomainObj _DataType
 Data type definition.
typedef DbHandleBase< _DataType > Base
 Data type definition.

Protected Member Functions

void setType (const DbType &typ)
 Set handle type.
void setPtr (DbDomainObj *ptr)
 Set data pointer.

Protected Attributes

DbDomainObj * 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 (DbDomainObj *obj)
 Assign transient object properly (including reference counting).

Friends

class DbDomainObj
 Friend declarations.

Detailed Description

Description:

Handle managing a DbDomainObj, a generic Database domain object.

Author
M.Frank

Definition at line 33 of file DbDomain.h.

Member Typedef Documentation

◆ _DataType

typedef DbDomainObj DbHandleBase< DbDomainObj >::_DataType
protectedinherited

Data type definition.

Definition at line 20 of file DbHandleBase.h.

◆ Base

typedef DbHandleBase<_DataType> DbHandleBase< DbDomainObj >::Base
protectedinherited

Data type definition.

Definition at line 22 of file DbHandleBase.h.

Constructor & Destructor Documentation

◆ DbDomain() [1/3]

DbDomain::DbDomain ( DbDomainObj * dom)

Friend's constructor.

◆ DbDomain() [2/3]

DbDomain::DbDomain ( const DbType & type)
inlineexplicit

Constructor using Db type.

Definition at line 44 of file DbDomain.h.

44{ m_type = type.majorType(); }
const DbType & type() const

◆ DbDomain() [3/3]

DbDomain::DbDomain ( const DbDomain & copy)
inline

Copy constructor.

Definition at line 46 of file DbDomain.h.

◆ ~DbDomain()

virtual DbDomain::~DbDomain ( )
inlinevirtual

Standard destructor.

Definition at line 49 of file DbDomain.h.

49{ switchPtr( 0 ); }
void switchPtr(DbDomainObj *obj)
Assign transient object properly (including reference counting).

Member Function Documentation

◆ add()

StatusCode DbDomain::add ( const std::string & nam,
DbDatabaseObj * db )

Add database to the domain.

◆ ageLimit()

int DbDomain::ageLimit ( ) const

Access the maximal age limit.

◆ ageOpenDbs()

StatusCode DbDomain::ageOpenDbs ( )

Increase the age of all open databases.

◆ close()

StatusCode DbDomain::close ( )

Close domain.

◆ closeAgedDbs()

StatusCode DbDomain::closeAgedDbs ( )

Check if databases are present, which aged a lot and need to be closed.

◆ find() [1/2]

DbDatabaseObj * DbDomain::find ( const std::string & db_name)

◆ find() [2/2]

const DbDatabaseObj * DbDomain::find ( const std::string & db_name) const

Find Database in domain.

◆ getOption()

StatusCode DbDomain::getOption ( DbOption & refOpt) const

Access domain specific options.

Parameters
refOpt[IN] Reference to option object
Returns
StatusCode code indicating success or failure.

◆ info() [1/2]

ITechDomain * DbDomain::info ( )

Let the implementation access the internals.

◆ info() [2/2]

const ITechDomain * DbDomain::info ( ) const

◆ isValid()

bool DbHandleBase< DbDomainObj >::isValid ( ) const
inlineinherited

Validity check (Objy like).

Definition at line 54 of file DbHandleBase.h.

54{ return 0 != m_ptr; }

◆ name()

const std::string & DbDomain::name ( ) const

Acces to the domain name.

◆ open()

StatusCode DbDomain::open ( ITechFactory * imp,
const DbType & technology,
Io::IoFlag mod = Io::READ )

Open the domain.

Parameters
imp[IN] Implementation object.
technology[IN] Technology identifier of this domain.
mod[IN] Access mode: READ, UPDATE, CREATE etc.
Returns
StatusCode code indicating success or failure.

◆ openMode()

Io::IoFlag DbDomain::openMode ( ) const

Access to access mode.

◆ operator!()

bool DbHandleBase< DbDomainObj >::operator! ( ) const
inlineinherited

Validity check through operator NOT.

Definition at line 49 of file DbHandleBase.h.

49{ return !isValid(); }

◆ operator->()

DbDomainObj * DbHandleBase< DbDomainObj >::operator-> ( )
inlineinherited

Dereference operator.

Definition at line 46 of file DbHandleBase.h.

46{ return m_ptr; }

◆ operator=() [1/2]

DbDomain & DbDomain::operator= ( const DbDomain & copy)
inline

Assignment operator.

Definition at line 51 of file DbDomain.h.

51 {
52 if ( &copy != this ) {
53 m_type = copy.m_type;
54 switchPtr(copy.m_ptr);
55 }
56 return *this;
57 }

◆ operator=() [2/2]

DbDomain & DbDomain::operator= ( const int )
inline

Assignment operator to reset handel easily using 0.

Definition at line 59 of file DbDomain.h.

59 {
60 switchPtr(0);
61 return *this;
62 }

◆ ptr()

const DbDomainObj * DbHandleBase< DbDomainObj >::ptr ( ) const
inlineinherited

Access to underlying object.

Definition at line 51 of file DbHandleBase.h.

51{ return m_ptr; }

◆ refCount()

int DbDomain::refCount ( ) const

Access reference counter.

◆ remove()

StatusCode DbDomain::remove ( DbDatabaseObj * db)

Remove a database from the domain.

◆ setAgeLimit()

void DbDomain::setAgeLimit ( int value)

Set the maximal allowed age limit for files in this domain.

◆ setOption()

StatusCode DbDomain::setOption ( const DbOption & refOpt)

Set domain specific options.

Parameters
refOpt[IN] Reference to option object
Returns
StatusCode code indicating success or failure.

◆ setPtr()

void DbHandleBase< DbDomainObj >::setPtr ( DbDomainObj * ptr)
inlineprotectedinherited

Set data pointer.

Definition at line 42 of file DbHandleBase.h.

42{ m_ptr=ptr; }
const DbDomainObj * ptr() const

◆ setType()

void DbHandleBase< DbDomainObj >::setType ( const DbType & typ)
inlineprotectedinherited

Set handle type.

Definition at line 40 of file DbHandleBase.h.

40{ m_type=typ; }
Description: Definition of the generic database object handle.

◆ switchPtr()

void DbDomain::switchPtr ( DbDomainObj * obj)
private

Assign transient object properly (including reference counting).

◆ techFactory() [1/2]

ITechFactory * DbDomain::techFactory ( )

Allow access to the Database implementation.

◆ techFactory() [2/2]

const ITechFactory * DbDomain::techFactory ( ) const

◆ type()

const DbType & DbHandleBase< DbDomainObj >::type ( ) const
inlineinherited

Inquire storage type of the handle.

Definition at line 56 of file DbHandleBase.h.

56{ return m_type; }

◆ DbDomainObj

friend class DbDomainObj
friend

Friend declarations.

Definition at line 36 of file DbDomain.h.

Member Data Documentation

◆ m_ptr

DbDomainObj* DbHandleBase< DbDomainObj >::m_ptr
protectedinherited

Data member: Object pointer. Sub-classes need access on re-assignment.

Definition at line 24 of file DbHandleBase.h.

◆ m_type

DbType DbHandleBase< DbDomainObj >::m_type
protectedinherited

Data member: Technology type. Sub-classes need access on re-assignment.

Definition at line 26 of file DbHandleBase.h.


The documentation for this class was generated from the following file: