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

CdbBdbSOiCollectionP Class Reference

Collection of "original" intervals. More...

Inheritance diagram for CdbBdbSOiCollectionP:

BdbPersObj List of all members.

Public Member Functions

 CdbBdbSOiCollectionP ()
virtual ~CdbBdbSOiCollectionP ()
d_ULong size () const
 Get the current size of the collection.

CdbStatus insert (const CdbBdbSOi &theInterval, d_ULong &theIdx)
 Insert an "original intention/interval" into the collection.

CdbStatus replace (const CdbBdbSOi &theInterval, d_ULong theIdx)
 Replace an "original intention/interval" at the specified position.

CdbStatus find (const BdbTime &theInsertionTime, CdbBdbSOi &theInterval, BdbTime &theBeginOfDuration, BdbTime &theEndOfDuration) const
 Find an interval in the collection by the insertion time.

CdbStatus find (d_ULong theIdx, CdbBdbSOi &theInterval, BdbTime &theBeginOfDuration, BdbTime &theEndOfDuration) const
 Find an interval in the collection by the index.

CdbStatus last (CdbBdbSOi &theInterval) const
 Get the most recent interval if any.

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


Detailed Description

Collection of "original" intervals.

This is a persistent implementation for the timeline (in the insertion dimension) of "original intervals".

Definition at line 27 of file CdbBdbSOiCollectionP.ddl.


Constructor & Destructor Documentation

CdbBdbSOiCollectionP::CdbBdbSOiCollectionP  
 

Definition at line 18 of file CdbBdbSOiCollectionP.cc.

CdbBdbSOiCollectionP::~CdbBdbSOiCollectionP   [virtual]
 

Definition at line 24 of file CdbBdbSOiCollectionP.cc.


Member Function Documentation

void CdbBdbSOiCollectionP::dump std::ostream &    o
 

Dump the contents of the collection.

Definition at line 271 of file CdbBdbSOiCollectionP.cc.

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

CdbStatus CdbBdbSOiCollectionP::find d_ULong    theIdx,
CdbBdbSOi   theInterval,
BdbTime   theBeginOfDuration,
BdbTime   theEndOfDuration
const
 

Find an interval in the collection by the index.

This method if successfull will return an "original" interval and its "duration" in the insertion time dimension.

Parameters:
theIdx  the "original" interval's index
theInterval  the value of the interval
theBeginOfDuration  the beginnig of the interval's duration in the insertion time dimension
theEndOfDuration  the endding of the interval's duration in the insertion time dimension

Definition at line 211 of file CdbBdbSOiCollectionP.cc.

References CdbStatus::Error, CdbBdbSOi::inserted, BdbTime::plusInfinity, and CdbStatus::Success.

CdbStatus CdbBdbSOiCollectionP::find const BdbTime   theInsertionTime,
CdbBdbSOi   theInterval,
BdbTime   theBeginOfDuration,
BdbTime   theEndOfDuration
const
 

Find an interval in the collection by the insertion time.

This method if successfull will return a "original" interval and its "duration" in the insertion time dimension.

Parameters:
theInsertionTime  the point in the insertion time dimension
theInterval  the value of the interval
theBeginOfDuration  the beginnig of the interval's duration in the insertion time dimension
theEndOfDuration  the endding of the interval's duration in the insertion time dimension

Definition at line 166 of file CdbBdbSOiCollectionP.cc.

References CdbBdbSTimeLineInterval< V >::begin, CdbBdbSTimeLineInterval< V >::end, CdbStatus::Error, CdbStatus::NotFound, CdbStatus::Success, and CdbBdbSTimeLineInterval< V >::value.

CdbStatus CdbBdbSOiCollectionP::insert const CdbBdbSOi   theInterval,
d_ULong &    theIdx
 

Insert an "original intention/interval" into the collection.

THis method will return an index of the interval in the collection.

Parameters:
theInterval  the "original" interval to insert
theIdx  the index of the "original" interval

Definition at line 37 of file CdbBdbSOiCollectionP.cc.

References CdbBdbSOi::begin, CdbBdbSOi::end, CdbStatus::Error, CdbBdbSOi::inserted, and CdbStatus::Success.

CdbStatus CdbBdbSOiCollectionP::last CdbBdbSOi   theInterval const
 

Get the most recent interval if any.

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

Parameters:
theInterval  the value of the interval

Definition at line 257 of file CdbBdbSOiCollectionP.cc.

References CdbStatus::NotFound, and CdbStatus::Success.

CdbStatus CdbBdbSOiCollectionP::replace const CdbBdbSOi   theInterval,
d_ULong    theIdx
 

Replace an "original intention/interval" at the specified position.

THis method will replace an interval at specified index with another one.

NOTE #1: An interval with such an index should already exist.

NOTE #2: The 'insertion time' of the interval must be equal to the one already existing.

Parameters:
theInterval  the "original" interval to replace
theIdx  the index of the "original" interval

Definition at line 107 of file CdbBdbSOiCollectionP.cc.

References CdbStatus::Error, BdbTime::getGmtNsec(), BdbTime::getGmtSec(), CdbBdbSOi::inserted, and CdbStatus::Success.

d_ULong CdbBdbSOiCollectionP::size   const
 

Get the current size of the collection.

Returns the actual number of intervals stored in the collection.

Definition at line 31 of file CdbBdbSOiCollectionP.cc.


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