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  

CdbBdbSRevCollectionP Class Reference
[CdbBdbShared]

Inheritance diagram for CdbBdbSRevCollectionP:

BdbPersObj List of all members.

Public Methods

 CdbBdbSRevCollectionP ()
virtual ~CdbBdbSRevCollectionP ()
CdbStatus insert (const BdbRef(CdbBdbSRevisionP)&theRevisionRef)
 Insert a revision into the collection.

CdbStatus find (const BdbTime &theId, BdbRef(CdbBdbSRevisionP)&theRevisionRef) const
 Find a revision in the collection by the revision identifier.

CdbStatus find (const char *theName, BdbRef(CdbBdbSRevisionP)&theRevisionRef) const
 Find a revision in the collection by its name.

CdbStatus last (BdbTime &theId) const
 Get the identifier for the most recent revision if any.

CdbItr< BdbTimeiterator_identifiers () const
 Set an iterator for revisions identifiers.

CdbItr< const char * > iterator_names () const
 Set an iterator for revisions names.

void dump (ostream &o) const
 Dump the contents of the collection.


Private Types

typedef CdbBdbSTimeLineInterval<
BdbRef(CdbBdbSRevisionP
Interval )

Private Methods

CdbStatus insertIntoMap (const BdbRef(CdbBdbSRevisionP)&theRevisionRef)
 Insert specified revision into the map.

void removeFromMap (const char *theName)
 Remove a revision into a map.

CdbStatus insertIntoTimeLine (const BdbRef(CdbBdbSRevisionP)&theRevisionRef)
 Insert specified revision into the TimeLine of "duration"intervals.

 BdbRef (CdbBdbSTimeLineP< BdbRef(CdbBdbSRevisionP) >) _timeLineRef
 The TimeLine of the "revision duration intervals".

 BdbRef (BdbMap) _mapRef
 The (oo-)map of revisions.


Member Typedef Documentation

typedef CdbBdbSTimeLineInterval< BdbRef(CdbBdbSRevisionP) CdbBdbSRevCollectionP::Interval) [private]
 

Definition at line 58 of file CdbBdbSRevCollectionP.ddl.


Constructor & Destructor Documentation

CdbBdbSRevCollectionP::CdbBdbSRevCollectionP  
 

Definition at line 287 of file CdbBdbSRevCollectionP.cc.

References BdbMap.

CdbBdbSRevCollectionP::~CdbBdbSRevCollectionP   [virtual]
 

Definition at line 293 of file CdbBdbSRevCollectionP.cc.

References BdbDelete, BdbIsNull, BdbRef(), and CdbBdbSTimeLineInterval< V >::value.


Member Function Documentation

CdbBdbSRevCollectionP::BdbRef BdbMap    [private]
 

The (oo-)map of revisions.

This map provides sorting facility for the revisions according to their given names.

CdbBdbSRevCollectionP::BdbRef CdbBdbSTimeLineP< BdbRef(CdbBdbSRevisionP) >    [private]
 

The TimeLine of the "revision duration intervals".

This includes both the index for these intervals as well as a double linked list of them.

Referenced by dump(), find(), and ~CdbBdbSRevCollectionP().

void CdbBdbSRevCollectionP::dump ostream &    o const
 

Dump the contents of the collection.

Definition at line 487 of file CdbBdbSRevCollectionP.cc.

References BdbIsNull, BdbRef(), CdbBdbSTimeLineInterval< V >::begin, CdbBdbSTimeLineInterval< V >::end, BdbTime::getGmtNsec(), BdbTime::getGmtSec(), and CdbBdbSTimeLineInterval< V >::value.

CdbStatus CdbBdbSRevCollectionP::find const char *    theName,
BdbRef(CdbBdbSRevisionP)&    theRevisionRef
const
 

Find a revision in the collection by its name.

The name passed as a parameter should not be 0 pointer.

In addition to usual (Success or Error) completion status values, this one can also return CdbStatus::NotFound if the revision was not found.

Parameters:
theName  the revision name
theRevisionRef  the revision reference to be set up upon completion

Definition at line 404 of file CdbBdbSRevCollectionP.cc.

References BdbcSuccess, BdbIsNull, BdbRef(), cout, CdbStatus::Error, CdbStatus::NotFound, result, and CdbStatus::Success.

CdbStatus CdbBdbSRevCollectionP::find const BdbTime   theId,
BdbRef(CdbBdbSRevisionP)&    theRevisionRef
const
 

Find a revision in the collection by the revision identifier.

Remember, that "revision id" is a point in the "insertion" time dimension when a revison was created.

The method uses "exact match" method to find the revision.

In addition to usual (Success or Error) completion status values, this one can also return CdbStatus::NotFound if the revision was not found.

Parameters:
theId  the revision identifier
theRevisionRef  the revision reference to be set up upon completion

Definition at line 367 of file CdbBdbSRevCollectionP.cc.

References BdbIsNull, cout, CdbStatus::Error, BdbTime::minusInfinity, CdbStatus::NotFound, BdbTime::plusInfinity, result, CdbStatus::Success, and CdbBdbSTimeLineInterval< V >::value.

CdbStatus CdbBdbSRevCollectionP::insert const BdbRef(CdbBdbSRevisionP)&    theRevisionRef
 

Insert a revision into the collection.

The specified revision is registered in the collection by its name (must be present) and its identifier (revision creation time). The values of the correspondinig keys are obtained through the revision class interface.

This operation does not have any side effects for the inserted revisions.

The operation may fail if any of the following conditions is met:

  • the passed revision exposes inproper identification (missing name or wrong identifier)
  • any system (Objectivity) error occures
  • the collection is internally inconsistent
  • specified revision is "out-of-sequence" (see documentation for the explanation of the concepts of revisions).

Definition at line 315 of file CdbBdbSRevCollectionP.cc.

References BdbIsNull, cout, CdbStatus::Error, CdbBdbSRevisionP::id(), insertIntoMap(), insertIntoTimeLine(), BdbTime::minusInfinity, BdbTime::plusInfinity, removeFromMap(), result, and CdbStatus::Success.

CdbStatus CdbBdbSRevCollectionP::insertIntoMap const BdbRef(CdbBdbSRevisionP)&    theRevisionRef [private]
 

Insert specified revision into the map.

The revision name will be inquired from the passed revision as a key for the registration.

Definition at line 530 of file CdbBdbSRevCollectionP.cc.

References BdbcSuccess, cout, CdbStatus::Error, result, and CdbStatus::Success.

Referenced by insert().

CdbStatus CdbBdbSRevCollectionP::insertIntoTimeLine const BdbRef(CdbBdbSRevisionP)&    theRevisionRef [private]
 

Insert specified revision into the TimeLine of "duration"intervals.

The revision identifier will be inquired from the passed revision as a key for the registration.

Definition at line 573 of file CdbBdbSRevCollectionP.cc.

References CdbBdbSTimeLineInterval< V >::begin, cout, CdbStatus::Error, CdbBdbSRevisionP::id(), BdbTime::plusInfinity, result, and CdbStatus::Success.

Referenced by insert().

CdbItr< BdbTime > CdbBdbSRevCollectionP::iterator_identifiers  
 

Set an iterator for revisions identifiers.

Definition at line 468 of file CdbBdbSRevCollectionP.cc.

CdbItr< const char * > CdbBdbSRevCollectionP::iterator_names  
 

Set an iterator for revisions names.

Definition at line 478 of file CdbBdbSRevCollectionP.cc.

CdbStatus CdbBdbSRevCollectionP::last BdbTime   theId const
 

Get the identifier for the most recent revision if any.

Return CdbStatus::NotFound if there is no revisions in the collection.

Parameters:
theId  the value of the identifier to be returned

Definition at line 457 of file CdbBdbSRevCollectionP.cc.

References CdbBdbSTimeLineInterval< V >::begin, result, and CdbStatus::Success.

void CdbBdbSRevCollectionP::removeFromMap const char *    theName [private]
 

Remove a revision into a map.

The method does not check the value of passed name. Non-zero string is expected.

Definition at line 567 of file CdbBdbSRevCollectionP.cc.

Referenced by insert().


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