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

CdbBdbSRevCollectionP Class Reference

A collection of revisions. More...

Inheritance diagram for CdbBdbSRevCollectionP:

BdbPersObj List of all members.

Public Member Functions

 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 (std::ostream &o) const
 Dump the contents of the collection.


Detailed Description

A collection of revisions.

This is a persistent implementation for the timeline (in the insertion dimension) of "revisions". Each revision occupies a "validity" interavl in the "insertion" timeline. When a new revision is put into the collection it's inserted into an apporpriate position.

Definition at line 32 of file CdbBdbSRevCollectionP.ddl.


Constructor & Destructor Documentation

CdbBdbSRevCollectionP::CdbBdbSRevCollectionP  
 

Definition at line 293 of file CdbBdbSRevCollectionP.cc.

CdbBdbSRevCollectionP::~CdbBdbSRevCollectionP   [virtual]
 

Definition at line 299 of file CdbBdbSRevCollectionP.cc.

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


Member Function Documentation

void CdbBdbSRevCollectionP::dump std::ostream &    o const
 

Dump the contents of the collection.

Definition at line 493 of file CdbBdbSRevCollectionP.cc.

References 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 410 of file CdbBdbSRevCollectionP.cc.

References BdbRef(), CdbStatus::Error, CdbStatus::NotFound, 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 373 of file CdbBdbSRevCollectionP.cc.

References CdbStatus::Error, BdbTime::minusInfinity, CdbStatus::NotFound, BdbTime::plusInfinity, 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 321 of file CdbBdbSRevCollectionP.cc.

References CdbStatus::Error, CdbBdbSRevisionP::id(), BdbTime::minusInfinity, BdbTime::plusInfinity, and CdbStatus::Success.

CdbItr< BdbTime > CdbBdbSRevCollectionP::iterator_identifiers   const
 

Set an iterator for revisions identifiers.

Definition at line 474 of file CdbBdbSRevCollectionP.cc.

CdbItr< const char * > CdbBdbSRevCollectionP::iterator_names   const
 

Set an iterator for revisions names.

Definition at line 484 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 463 of file CdbBdbSRevCollectionP.cc.

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


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:20 2005 for CDB by doxygen1.3-rc3