Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BdbTreeNode Class Reference
[BdbTrees]

#include <BdbTreeNode.hh>

Inheritance diagram for BdbTreeNode:

BdbAbsWrapper List of all members.

Public Methods

 BdbTreeNode ()
 BdbTreeNode (BdbTreeNode &theParent, const char *const theName, BdbHandleAny &placement)
 BdbTreeNode (BdbHandle(BdbTreeNodeP)&theNode)
 BdbTreeNode (const BdbTreeNode &theNode)
virtual ~BdbTreeNode ()
d_ULong count () const
const char * name () const
const char * fullName () const
const char * pathName () const
BdbStatus add (BdbTreeNode &aChild, const char *const theName)
BdbStatus add (BdbHandle(BdbPersObj)&aChild, const char *const theName)
BdbStatus child (BdbTreeNode &aChild, const char *const theName) const
BdbStatus child (BdbHandle(BdbPersObj)&aChild, const char *const theName) const
BdbStatus child (BdbHandle(BdbPersObj)&aChild, const char *const theName, ooTypeNumber theType) const
BdbStatus child (BdbHandle(BdbPersObj)&aChild, const char *const theName, ooTypeNumber theTypes[], d_ULong numTypes) const
BdbStatus clear ()
BdbStatus clearAndDestroy ()
d_Boolean hasChild (const char *const theName) const
d_Boolean hasChild (BdbTreeNode &aChild, d_Boolean descend=d_False) const
d_Boolean hasChild (BdbHandle(BdbPersObj)&aChild, d_Boolean descend=d_False) const
BdbStatus makeChild (BdbTreeNode &aNode, const char *const theName)
BdbStatus parent (BdbTreeNode &theParent) const
BdbStatus remove (const char *const theName)
BdbStatus remove (BdbTreeNode &aChild)
BdbStatus remove (BdbHandle(BdbPersObj)&aChild)
BdbStatus removeAndDestroy (const char *const theName)
BdbStatus removeAndDestroy (BdbTreeNode &aChild)
BdbStatus removeAndDestroy (BdbHandle(BdbPersObj)&aChild)
BdbStatus replace (BdbTreeNode &aChild, const char *const theName)
BdbStatus replace (BdbHandle(BdbPersObj)&aChild, const char *const theName)
BdbStatus upgradeName ()
BdbStatus moveTo (const char *const thePath)
BdbStatus moveUp ()
BdbStatus moveToRoot (const char *const theRootName="main")
BdbStatus moveToRootChild (const char *const theChildName, const char *const theRootName="main")
BdbStatus makeTo (const char *const thePath, d_Boolean createIntermediate=d_True)
BdbStatus makeRoot (const char *const theRootName="main", const char *const placementContName="Roots")
BdbStatus makeRootChild (const char *const theChildName, const char *const theRootName="main")
BdbStatus makeRootChild (const char *const theName, const char *const theRootName, BdbHandleAny &placement)
BdbStatus fetchMetaData (BdbMetaData &theMetaData)
BdbStatus metaData (BdbMetaData &theMetaData) const
 BdbHandle (BdbTreeNodeP) persistent() const
void setPersistent (BdbHandle(BdbTreeNodeP)&aNode)
BdbTreeNode & operator= (const BdbTreeNode &theOther)

Static Public Methods

void startRecordingRLocks ()
void dropRecordedRLocks ()

Protected Methods

const char * lowerRootName (const char *const theRootName)
BdbStatus moveOneLevel (const char *const toString, d_Boolean createIfNeeded=d_False)
BdbStatus updateAndWait ()
BdbStatus findBestCachedNode (const char *thePath, BdbTreeNode &theNode, const char *&startAfterCached)

Static Private Attributes

BdbTreeNodeCache_tnCache = new BdbTreeNodeCache()
BdbTreeNodeLocking_tnLock = new BdbTreeNodeLocking()
const d_Boolean USE_CACHE = (getenv("BDB_DO_NOT_USE_TREE_NODE_CACHE") == 0)

Constructor & Destructor Documentation

BdbTreeNode::BdbTreeNode  
 

Definition at line 73 of file BdbTreeNode.cc.

BdbTreeNode::BdbTreeNode BdbTreeNode &    theParent,
const char *const    theName,
BdbHandleAny &    placement
 

Definition at line 78 of file BdbTreeNode.cc.

References BdbHandle(), BdbHandleAny, BdbIsNull, and setPersistent().

BdbTreeNode::BdbTreeNode BdbHandle(BdbTreeNodeP)&    theNode
 

Definition at line 96 of file BdbTreeNode.cc.

References BdbAbsWrapper::setObject().

BdbTreeNode::BdbTreeNode const BdbTreeNode &    theNode
 

Definition at line 102 of file BdbTreeNode.cc.

References BdbHandleAny, and BdbAbsWrapper::setObject().

BdbTreeNode::~BdbTreeNode   [virtual]
 

Definition at line 113 of file BdbTreeNode.cc.


Member Function Documentation

BdbStatus BdbTreeNode::add BdbHandle(BdbPersObj)&    aChild,
const char *const    theName
 

Definition at line 164 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::add BdbTreeNode &    aChild,
const char *const    theName
 

Definition at line 150 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbHandle(), BdbSignal, BdbStatus, name(), result, and updateAndWait().

Referenced by BdbTreeAccess< T >::add(), and BdbDbRegistrator::finalRegistration().

BdbTreeNode::BdbHandle BdbTreeNodeP    const
 

Referenced by add(), BdbTreeNode(), child(), fetchMetaData(), findBestCachedNode(), hasChild(), makeChild(), makeRoot(), makeRootChild(), makeTo(), metaData(), moveOneLevel(), moveTo(), moveToRoot(), moveUp(), parent(), remove(), removeAndDestroy(), replace(), and updateAndWait().

BdbStatus BdbTreeNode::child BdbHandle(BdbPersObj)&    aChild,
const char *const    theName,
ooTypeNumber    theTypes[],
d_ULong    numTypes
const
 

Definition at line 206 of file BdbTreeNode.cc.

References BdbStatus, and result.

BdbStatus BdbTreeNode::child BdbHandle(BdbPersObj)&    aChild,
const char *const    theName,
ooTypeNumber    theType
const
 

Definition at line 197 of file BdbTreeNode.cc.

References BdbStatus, and result.

BdbStatus BdbTreeNode::child BdbHandle(BdbPersObj)&    aChild,
const char *const    theName
const
 

Definition at line 190 of file BdbTreeNode.cc.

References BdbStatus, and result.

BdbStatus BdbTreeNode::child BdbTreeNode &    aChild,
const char *const    theName
const
 

Definition at line 177 of file BdbTreeNode.cc.

References BdbcError, BdbHandle(), BdbStatus, result, and setPersistent().

Referenced by BdbTreeAccess< T >::child(), BdbTreeAccess< T >::kindOfChild(), makeRootChild(), moveOneLevel(), BdbTreeNodeSimpleIterator::next(), BdbTreeNodeIterator::next(), BdbTreeNodeCollectionTIterator::nextCollection(), BdbTreeNodeIterator::nextItem(), and BdbDbRegistrator::oneLevelDown().

BdbStatus BdbTreeNode::clear  
 

Definition at line 215 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::clearAndDestroy  
 

Definition at line 228 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

d_ULong BdbTreeNode::count  
 

Definition at line 122 of file BdbTreeNode.cc.

Referenced by BdbTreeNodeCommand::listNodeHandler().

void BdbTreeNode::dropRecordedRLocks   [static]
 

Definition at line 961 of file BdbTreeNode.cc.

References _tnLock, and BdbTreeNodeLocking::stopRecordingAndUnlock().

BdbStatus BdbTreeNode::fetchMetaData BdbMetaData   theMetaData
 

Definition at line 778 of file BdbTreeNode.cc.

References BdbcSuccess, BdbHandle(), BdbStatus, result, BdbMetaData::setPersistent(), and updateAndWait().

Referenced by main().

BdbStatus BdbTreeNode::findBestCachedNode const char *    thePath,
BdbTreeNode &    theNode,
const char *&    startAfterCached
[protected]
 

The function sets "theNode" to the farthest cached node. It also sets fragmentStart, to the first character after the part of the path corresponding to cached node. If no cached node is found, the function returns an error, and "theNode"/startAfterCached are not altered. Successful return and startAfterCached == 0 means that an exact match was found.

Definition at line 513 of file BdbTreeNode.cc.

References _tnCache, BdbcError, BdbcSuccess, BdbHandle(), BdbRef, COUT2, BdbTreeNodeCache::findEntry(), BdbPathName::separator(), and setPersistent().

Referenced by moveTo().

const char * BdbTreeNode::fullName  
 

Definition at line 134 of file BdbTreeNode.cc.

Referenced by makeTo(), and moveTo().

d_Boolean BdbTreeNode::hasChild BdbHandle(BdbPersObj)&    aChild,
d_Boolean    descend = d_False
const
 

Definition at line 254 of file BdbTreeNode.cc.

d_Boolean BdbTreeNode::hasChild BdbTreeNode &    aChild,
d_Boolean    descend = d_False
const
 

Definition at line 247 of file BdbTreeNode.cc.

References BdbHandle().

d_Boolean BdbTreeNode::hasChild const char *const    theName const
 

Definition at line 241 of file BdbTreeNode.cc.

Referenced by BdbDbRegistrator::finalRegistration(), main(), moveOneLevel(), and BdbDbRegistrator::oneLevelDown().

const char * BdbTreeNode::lowerRootName const char *const    theRootName [protected]
 

Definition at line 845 of file BdbTreeNode.cc.

References BdbTString::data(), and len.

Referenced by makeRoot(), and moveToRoot().

BdbStatus BdbTreeNode::makeChild BdbTreeNode &    aNode,
const char *const    theName
 

Definition at line 260 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbHandle(), BdbSignal, BdbStatus, name(), result, setPersistent(), and updateAndWait().

Referenced by main().

BdbStatus BdbTreeNode::makeRoot const char *const    theRootName = "main",
const char *const    placementContName = "Roots"
 

Definition at line 668 of file BdbTreeNode.cc.

References BdbDomain::activeInstance(), BdbcError, BdbContObj, BdbcSuccess, BdbcUpdate, BdbcUserError, BdbDBObj, BdbFDObj, BdbHandle(), BdbIsNull, BdbSignal, BdbStatus, BdbDomainOODB::commit(), BdbContAccessMgr::createContainer(), dbH, lowerRootName(), moveToRoot(), BdbDbAccessMgr::openManagementDb(), result, setPersistent(), and BdbDomainOODB::startUpdate().

Referenced by main(), makeRootChild(), and makeTo().

BdbStatus BdbTreeNode::makeRootChild const char *const    theName,
const char *const    theRootName,
BdbHandleAny &    placement
 

Definition at line 740 of file BdbTreeNode.cc.

References BdbDomain::activeInstance(), BdbcSuccess, BdbcUserError, BdbHandle(), BdbHandleAny, BdbIsNull, BdbSignal, BdbStatus, child(), moveToRoot(), result, setPersistent(), BdbDomainOODB::updateAndWait(), and BdbDomainAuth::userName().

BdbStatus BdbTreeNode::makeRootChild const char *const    theChildName,
const char *const    theRootName = "main"
 

Definition at line 726 of file BdbTreeNode.cc.

References BdbcSuccess, BdbStatus, makeRoot(), makeTo(), and result.

Referenced by BdbEventStore::createTreeNode(), and BdbDbRegistrator::moveToRootChild().

BdbStatus BdbTreeNode::makeTo const char *const    thePath,
d_Boolean    createIntermediate = d_True
 

Definition at line 598 of file BdbTreeNode.cc.

References BdbcError, BdbcSuccess, BdbHandle(), BdbStatus, COUT1, d_True, fullName(), BdbAbsWrapper::isNull(), makeRoot(), moveOneLevel(), result, BdbPathName::separator(), and BdbAbsWrapper::setNull().

Referenced by BdbDistribution::attachCollection(), attachCollection(), BdbEventStore::createTreeNode(), and makeRootChild().

BdbStatus BdbTreeNode::metaData BdbMetaData   theMetaData const
 

Definition at line 792 of file BdbTreeNode.cc.

References BdbHandle(), BdbStatus, result, and BdbMetaData::setPersistent().

Referenced by main(), and print().

BdbStatus BdbTreeNode::moveOneLevel const char *const    toString,
d_Boolean    createIfNeeded = d_False
[protected]
 

Definition at line 861 of file BdbTreeNode.cc.

References BdbcError, BdbcSuccess, BdbHandle(), BdbHandleAny, BdbStatus, child(), hasChild(), parent(), result, setPersistent(), and BdbDomainAuth::userName().

Referenced by makeTo(), and moveTo().

BdbStatus BdbTreeNode::moveTo const char *const    thePath
 

Definition at line 399 of file BdbTreeNode.cc.

References _tnCache, BdbcError, BdbcSuccess, BdbcUserError, BdbHandle(), BdbRef, BdbSignal, BdbStatus, COUT1, d_False, findBestCachedNode(), fullName(), BdbTreeNodeCache::insertEntry(), BdbAbsWrapper::isNull(), moveOneLevel(), moveToRoot(), result, BdbPathName::separator(), BdbAbsWrapper::setNull(), and USE_CACHE.

Referenced by BdbDistribution::attachCollection(), attachCollection(), BdbCollectionTInspector::exist(), fixTreeNode(), main(), moveToRootChild(), BdbCollectionTInspector::scan(), and BdbEventStore::treeNode().

BdbStatus BdbTreeNode::moveToRoot const char *const    theRootName = "main"
 

Definition at line 563 of file BdbTreeNode.cc.

References BdbcError, BdbcRead, BdbcSuccess, BdbcUserError, BdbHandle(), BdbSignal, BdbStatus, BdbTreeNodeP::isTreeNode(), lowerRootName(), result, and setPersistent().

Referenced by main(), makeRoot(), makeRootChild(), moveTo(), and moveToRootChild().

BdbStatus BdbTreeNode::moveToRootChild const char *const    theChildName,
const char *const    theRootName = "main"
 

Definition at line 585 of file BdbTreeNode.cc.

References BdbcSuccess, BdbStatus, moveTo(), moveToRoot(), and result.

Referenced by BdbDbBrowse::browseDomain(), BdbDbBrowse::browseLogicalLayer(), BdbDbBrowse::browsePhysicalLayer(), BdbDbRegistrator::moveToRootChild(), BdbEventStoreIterator::next(), BdbLocateDb::scan(), and BdbEventStore::treeNode().

BdbStatus BdbTreeNode::moveUp  
 

Definition at line 553 of file BdbTreeNode.cc.

References BdbHandle(), BdbStatus, result, and setPersistent().

const char * BdbTreeNode::name  
 

Definition at line 128 of file BdbTreeNode.cc.

Referenced by add(), clear(), clearAndDestroy(), execute_list(), BdbTreeNodeCommand::listNodeHandler(), main(), makeChild(), remove(), removeAndDestroy(), replace(), and updateAndWait().

BdbTreeNode & BdbTreeNode::operator= const BdbTreeNode &    theOther
 

Definition at line 833 of file BdbTreeNode.cc.

References BdbHandleAny, BdbAbsWrapper::object(), and BdbAbsWrapper::setObject().

BdbStatus BdbTreeNode::parent BdbTreeNode &    theParent const
 

Definition at line 277 of file BdbTreeNode.cc.

References BdbHandle(), BdbStatus, result, and setPersistent().

Referenced by moveOneLevel().

const char * BdbTreeNode::pathName  
 

Definition at line 140 of file BdbTreeNode.cc.

Referenced by execute_list(), BdbTreeNodeCommand::listNodeHandler(), BdbCollectionCommand::listNodeHandler(), main(), print(), and upgradeNode().

BdbStatus BdbTreeNode::remove BdbHandle(BdbPersObj)&    aChild
 

Definition at line 313 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::remove BdbTreeNode &    aChild
 

Definition at line 299 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbHandle(), BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::remove const char *const    theName
 

Definition at line 286 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

Referenced by BdbDbRegistrator::finalRegistration(), main(), BdbTreeAccess< T >::remove(), and BdbEventStore::removeCollection().

BdbStatus BdbTreeNode::removeAndDestroy BdbHandle(BdbPersObj)&    aChild
 

Definition at line 353 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::removeAndDestroy BdbTreeNode &    aChild
 

Definition at line 339 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbHandle(), BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::removeAndDestroy const char *const    theName
 

Definition at line 326 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::replace BdbHandle(BdbPersObj)&    aChild,
const char *const    theName
 

Definition at line 380 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbSignal, BdbStatus, name(), result, and updateAndWait().

BdbStatus BdbTreeNode::replace BdbTreeNode &    aChild,
const char *const    theName
 

Definition at line 366 of file BdbTreeNode.cc.

References BdbcSuccess, BdbcUserError, BdbHandle(), BdbSignal, BdbStatus, name(), result, and updateAndWait().

void BdbTreeNode::setPersistent BdbHandle(BdbTreeNodeP)&    aNode
 

Definition at line 931 of file BdbTreeNode.cc.

References BdbAbsWrapper::setObject().

Referenced by BdbTreeNode(), child(), BdbEventStore::createTreeNode(), findBestCachedNode(), BdbTreeNodeCommand::listNodeHandler(), BdbCollectionCommand::listNodeHandler(), makeChild(), makeRoot(), makeRootChild(), moveOneLevel(), moveToRoot(), moveUp(), parent(), BdbCollectionTInspector::scan(), and BdbAbsCollectionT< T >::treeNode().

void BdbTreeNode::startRecordingRLocks   [static]
 

Definition at line 954 of file BdbTreeNode.cc.

References _tnLock, and BdbTreeNodeLocking::startRecording().

BdbStatus BdbTreeNode::updateAndWait   [protected]
 

Definition at line 937 of file BdbTreeNode.cc.

References BdbDomain::activeInstance(), BdbcSuccess, BdbcUserError, BdbHandle(), BdbSignal, BdbStatus, name(), result, and BdbDomainOODB::updateAndWait().

Referenced by add(), clear(), clearAndDestroy(), fetchMetaData(), makeChild(), remove(), removeAndDestroy(), and replace().

BdbStatus BdbTreeNode::upgradeName  
 

Definition at line 393 of file BdbTreeNode.cc.

Referenced by upgradeNode().


Member Data Documentation

BdbTreeNodeCache * BdbTreeNode::_tnCache = new BdbTreeNodeCache() [static, private]
 

Definition at line 60 of file BdbTreeNode.cc.

Referenced by findBestCachedNode(), and moveTo().

BdbTreeNodeLocking * BdbTreeNode::_tnLock = new BdbTreeNodeLocking() [static, private]
 

Definition at line 61 of file BdbTreeNode.cc.

Referenced by dropRecordedRLocks(), and startRecordingRLocks().

const d_Boolean BdbTreeNode::USE_CACHE = (getenv("BDB_DO_NOT_USE_TREE_NODE_CACHE") == 0) [static, private]
 

Definition at line 62 of file BdbTreeNode.cc.

Referenced by moveTo().


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

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002