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  

BdbCondRCacheNode< Object > Class Template Reference
[BdbCondRemote]

#include <BdbCondRCacheNode.hh>

List of all members.

Public Methods

virtual void keys (std::vector< std::string > &theList)
virtual Object * find (const char *theKey)
virtual Object * add (const char *theKey, Object *theObjectPtr)
virtual void remove (const char *theKey)
virtual void clear ()

Protected Methods

 BdbCondRCacheNode ()
 BdbCondRCacheNode (const BdbCondRCacheNode< Object > &theNode)
virtual ~BdbCondRCacheNode ()
BdbCondRCacheNode & operator= (const BdbCondRCacheNode< Object > &theNode)

Private Methods

void deleteObjects ()

Private Attributes

std::map< std::string, Object * > * _cache

template<class Object>
class BdbCondRCacheNode< Object >


Constructor & Destructor Documentation

template<class Object>
BdbCondRCacheNode< Object >::BdbCondRCacheNode   [protected]
 

Definition at line 70 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache.

template<class Object>
BdbCondRCacheNode< Object >::BdbCondRCacheNode const BdbCondRCacheNode< Object > &    theNode [protected]
 

Definition at line 76 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache.

template<class Object>
BdbCondRCacheNode< Object >::~BdbCondRCacheNode   [protected, virtual]
 

Definition at line 86 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache, and BdbCondRCacheNode< Object >::deleteObjects().


Member Function Documentation

template<class Object>
Object * BdbCondRCacheNode< Object >::add const char *    theKey,
Object *    theObjectPtr
[virtual]
 

Add a next object pointer associated with specified key.

Replace the object pointer and return the previous pointer if there object pointer with the same key and if its pointer is different.

Return null pointer if the key was not known before.

Definition at line 169 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::find().

template<class Object>
void BdbCondRCacheNode< Object >::clear   [virtual]
 

Remove all object pointers from the cache.

This will also invoke the destructors for the corresponding objects following their pointers.

Reimplemented in BdbCondRInfoCache, and BdbCondROIDServerCache.

Definition at line 221 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::deleteObjects().

Referenced by BdbCondROIDServerCache::clear(), and BdbCondRInfoCache::clear().

template<class Object>
void BdbCondRCacheNode< Object >::deleteObjects   [private]
 

Invoke the destructors for all the objects whose pointers are stored in the cache. Then clear the cache itself.

Definition at line 231 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache.

Referenced by BdbCondRCacheNode< Object >::clear(), and BdbCondRCacheNode< Object >::~BdbCondRCacheNode().

template<class Object>
Object * BdbCondRCacheNode< Object >::find const char *    theKey [virtual]
 

Find a pointer to the object corresponding to the specified key.

Return null pointer if the key was not found.

Definition at line 142 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache.

Referenced by BdbCondRCacheNode< Object >::add().

template<class Object>
void BdbCondRCacheNode< Object >::keys std::vector< std::string > &    theList [virtual]
 

Get a list of keys for the object pointers in the cache.

The list is always cleared before to search the cache contents.

Definition at line 123 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache.

template<class Object>
BdbCondRCacheNode< Object > & BdbCondRCacheNode< Object >::operator= const BdbCondRCacheNode< Object > &    theNode [protected]
 

Definition at line 104 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache.

Referenced by BdbCondROIDServerDetector::operator=(), BdbCondROIDServerCache::operator=(), BdbCondRInfoSnapshot::operator=(), BdbCondRInfoOrigin::operator=(), BdbCondRInfoFederation::operator=(), BdbCondRInfoDetector::operator=(), and BdbCondRInfoCache::operator=().

template<class Object>
void BdbCondRCacheNode< Object >::remove const char *    theKey [virtual]
 

Remove the object pointer associated with specified key from the cache.

This is the "deep" operation - it will also invoke the destructor of the corresponding object (if any) following its pointer.

Definition at line 198 of file BdbCondRCacheNode.cc.

References BdbCondRCacheNode< Object >::_cache.


Member Data Documentation

template<class Object>
std::map<std::string, Object*>* BdbCondRCacheNode< Object >::_cache [private]
 

Definition at line 126 of file BdbCondRCacheNode.hh.

Referenced by BdbCondRCacheNode< Object >::BdbCondRCacheNode(), BdbCondRCacheNode< Object >::deleteObjects(), BdbCondRCacheNode< Object >::find(), BdbCondRCacheNode< Object >::keys(), BdbCondRCacheNode< Object >::operator=(), BdbCondRCacheNode< Object >::remove(), and BdbCondRCacheNode< Object >::~BdbCondRCacheNode().


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