![]() |
|
|
Bdb packages | Design docs | Source docs | Guidelines | Recent releases |
|
Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members BdbGenericHdrT Class Reference
[BdbTrees]#include <BdbGenericHdrT.hh>
Inheritance diagram for BdbGenericHdrT:
List of all members.
Public Methods
BdbGenericHdrT (BdbRef(BdbGenericHdr)&header) BdbGenericHdrT (BdbHandle(BdbGenericHdr)&header) BdbGenericHdrT (const BdbGenericHdrT &aRhs) const BdbGenericHdrT & operator= (const BdbRef(BdbGenericHdr)&p) const BdbGenericHdrT & operator= (const BdbHandle(BdbGenericHdr)&p) virtual ~BdbGenericHdrT () d_Boolean isNull () const bool ownedBy (const BdbRefAny &owner) const size_t getPersObjs (BdbRefAny *&list) const size_t getKeys (const char **&resultantKeys) const const BdbRefAny & getPersistent () const void reset () void borrowAsNecessary (const BdbGenericHdrT &original) Protected Methods
BdbStatus get (BdbRefAny &object, ooTypeNumber typeNumber, const char *const key=0) const BdbStatus put (const BdbRefAny &object, const ooTypeNumber typeNumber, const char *const key=0) BdbStatus put (BdbRefAny &object, const char *const key=0) Private Methods
BdbGenericHdrT () const BdbGenericHdrT & operator= (const BdbGenericHdrT &aRhs) bool canBeGenericHdrT (ooTypeNumber typeN) const const BdbHandle (BdbGenericHdr) getHandle() const size_t getTypeAndStrings (const BdbTypeAndString *&typeAndStrings) const BdbStatus borrow (const BdbRefAny &object, const ooTypeNumber typeNumber, const char *const key=0) BdbHandle (BdbGenericHdr) getHandle() Private Attributes
BdbRefAny _bdbRef Friends
class BdbHdrAccessBaseT Detailed Description
The BdbGenericHdrT class is a wrapper around a BdbGenericHdr, i.e. persistent, instance.
Definition at line 59 of file BdbGenericHdrT.hh.
Constructor & Destructor Documentation
BdbGenericHdrT::BdbGenericHdrT ( BdbRef(BdbGenericHdr)& header )
Constructs an instanace of this class.
Definition at line 69 of file BdbGenericHdrT.cc.
BdbGenericHdrT::BdbGenericHdrT ( BdbHandle(BdbGenericHdr)& header )
Constructs an instanace of this class.
Definition at line 74 of file BdbGenericHdrT.cc.
BdbGenericHdrT::BdbGenericHdrT ( const BdbGenericHdrT & aRhs )
copy instance of this class
Definition at line 79 of file BdbGenericHdrT.cc.
BdbGenericHdrT::~BdbGenericHdrT ( ) [virtual]
Destroys this instance.
Definition at line 106 of file BdbGenericHdrT.cc.
BdbGenericHdrT::BdbGenericHdrT ( ) [private]
stops default
Referenced by borrowAsNecessary().
Member Function Documentation
BdbGenericHdrT::BdbHandle ( BdbGenericHdr ) [private]
- Returns:
- BdbHandle to persistent header
Reimplemented in BdbEventT, and BdbTreeHdrT.
const BdbGenericHdrT::BdbHandle ( BdbGenericHdr ) const [private]
- Returns:
- BdbHandle to persistent header
Reimplemented in BdbTreeHdrT.
Referenced by ownedBy().
BdbStatus BdbGenericHdrT::borrow ( const BdbRefAny & object, const ooTypeNumber typeNumber, const char *const key = 0 ) [private]
Places specified object into persistent header with specified key, but marks it as not owned.
Definition at line 331 of file BdbGenericHdrT.cc.
References BdbRef, BdbRefAny, and getPersistent().
Referenced by borrowAsNecessary().
void BdbGenericHdrT::borrowAsNecessary ( const BdbGenericHdrT & original )
Copies any object reference in 'original', that does not have a matching type and key, into this header and marks it as borrowed.
Definition at line 255 of file BdbGenericHdrT.cc.
References BdbcError, BdbGenericHdrT(), BdbRef, BdbRefAny, borrow(), canBeGenericHdrT(), get(), and getTypeAndStrings().
Referenced by BdbEventOutput::doEvent().
bool BdbGenericHdrT::canBeGenericHdrT ( ooTypeNumber typeN ) const [private]
- Returns:
- true if the type number can be used as a generic header
Definition at line 215 of file BdbGenericHdrT.cc.
Referenced by borrowAsNecessary().
BdbStatus BdbGenericHdrT::get ( BdbRefAny & object, ooTypeNumber typeNumber, const char *const key = 0 ) const [protected]
Returns, if it exists, requested itme in "object".
Definition at line 196 of file BdbGenericHdrT.cc.
References BdbRef, BdbRefAny, and getPersistent().
Referenced by BdbRef(), and borrowAsNecessary().
size_t BdbGenericHdrT::getKeys ( const char **& resultantKeys ) const
Creates a list containing the key for each object contained in this object.
Returns ownership of the list to the calling routine. If there are no objects then no memory is allocated and resultantKeys is undefined.
- Parameters:
resultantKeys variable to be set to the address of the List.
- Returns:
- the numnber of objects in the list.
Definition at line 156 of file BdbGenericHdrT.cc.
References BdbRef, and getPersistent().
const BdbRefAny & BdbGenericHdrT::getPersistent ( )
- Returns:
- BdbRef to persistent header.
Reimplemented in BdbEventT.
Definition at line 130 of file BdbGenericHdrT.cc.
References isNull().
Referenced by borrow(), get(), getKeys(), BdbEventT::getPersistent(), getPersObjs(), getTypeAndStrings(), ownedBy(), put(), and BdbLocateDb::scanEvent().
size_t BdbGenericHdrT::getPersObjs ( BdbRefAny *& list ) const
Creates a list containing a BdbRef for each object contained in this object.
Returns ownership of the list to the calling routine. If there are no objects then no memory is allocated and list is undefined.
- Parameters:
list variable to be set to the address of the List.
- Returns:
- the numnber of objects in the list.
Definition at line 143 of file BdbGenericHdrT.cc.
References BdbRef, BdbRefAny, and getPersistent().
Referenced by BdbLocateDb::iterateOverHeader().
size_t BdbGenericHdrT::getTypeAndStrings ( const BdbTypeAndString *& typeAndStrings ) const [private]
Creates a list containing the type and string which make up the key for each object contained in this object.
Returns ownership of the list to the calling routine. If there are no objects then no memory is allocated and typeAndStrings is undefined.
- Parameters:
typeAndStrings variable to be set to the address of the List.
- Returns:
- the numnber of objects in the list.
Definition at line 169 of file BdbGenericHdrT.cc.
References BdbRef, and getPersistent().
Referenced by borrowAsNecessary().
d_Boolean BdbGenericHdrT::isNull ( )
- Returns:
- true if there is no matching persistent object.
Reimplemented in BdbTreeHdrT.
Definition at line 124 of file BdbGenericHdrT.cc.
References _bdbRef.
Referenced by BdbEventT::BdbEventT(), BdbEventMerge::event(), getPersistent(), BdbEventInput::inputEvent(), and BdbTreeHdrT::isNull().
const BdbGenericHdrT& BdbGenericHdrT::operator= ( const BdbGenericHdrT & aRhs ) [private]
stops default
const BdbGenericHdrT & BdbGenericHdrT::operator= ( const BdbHandle(BdbGenericHdr)& p )
Definition at line 96 of file BdbGenericHdrT.cc.
References _bdbRef.
const BdbGenericHdrT & BdbGenericHdrT::operator= ( const BdbRef(BdbGenericHdr)& p )
assignment operators. Constructs an instance of this class from a persistent object
Definition at line 89 of file BdbGenericHdrT.cc.
References _bdbRef.
Referenced by BdbEventT::operator=().
bool BdbGenericHdrT::ownedBy ( const BdbRefAny & owner ) const
- Returns:
- true of specified object is owner.
Definition at line 182 of file BdbGenericHdrT.cc.
References BdbHandle(), BdbRef, BdbRefAny, getPersistent(), and owner.
Referenced by BdbEventT::ownsHeader().
BdbStatus BdbGenericHdrT::put ( BdbRefAny & object, const char *const key = 0 ) [protected]
Places specified object into persistent header with specified key.
Definition at line 322 of file BdbGenericHdrT.cc.
BdbStatus BdbGenericHdrT::put ( const BdbRefAny & object, const ooTypeNumber typeNumber, const char *const key = 0 ) [protected]
Places specified object into persistent header with specified key.
Definition at line 302 of file BdbGenericHdrT.cc.
References BdbRef, BdbRefAny, and getPersistent().
Referenced by put(), and BdbHdrAccessBaseT::putPersObj().
void BdbGenericHdrT::reset ( )
Reset state of an object
Reimplemented in BdbEventT.
Definition at line 248 of file BdbGenericHdrT.cc.
References _bdbRef, and BdbRefAny.
Referenced by BdbEventT::reset().
Friends And Related Function Documentation
friend class BdbHdrAccessBaseT [friend]
Definition at line 62 of file BdbGenericHdrT.hh.
Member Data Documentation
BdbRefAny BdbGenericHdrT::_bdbRef [private]
reference to persistent object which this instance wraps
Definition at line 239 of file BdbGenericHdrT.hh.
Referenced by isNull(), operator=(), and reset().
The documentation for this class was generated from the following files:
- /BdbTrees/BdbGenericHdrT.hh
- /BdbTrees/BdbGenericHdrT.cc
BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us
Page Owner: Jacek Becla
Last Update: October 04, 2002