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

CdbBdbSTimeLineP< V > Class Template Reference

Persistent TimeLine class. More...

Inheritance diagram for CdbBdbSTimeLineP< V >:

BdbPersObj List of all members.

Public Types

typedef CdbItr< CdbBdbSTimeLineInterval<
V > > 
IteratorOfIntervals
 Type definitions for the TimeLine's iterators.


Public Member Functions

 CdbBdbSTimeLineP ()
 Default constructor.

 CdbBdbSTimeLineP (const V &theInitialValue)
 Normal constructor.

virtual ~CdbBdbSTimeLineP ()
CdbStatus insert (const BdbTime &theBeginTime, const BdbTime &theEndTime, const V &theValue)
 Insert an interval into the collection.

CdbStatus insert (const CdbBdbSTimeLineInterval< V > &theInterval)
 Insert an interval into the collection.

bool findAtBegin (CdbBdbSTimeLineInterval< V > &theInterval, const BdbTime &theTime) const
 Find an interval in the TimeLine.

bool find (CdbBdbSTimeLineInterval< V > &theInterval, const BdbTime &theTime) const
 Find an interval in the TimeLine.

CdbStatus first (CdbBdbSTimeLineInterval< V > &theInterval) const
 Get the first interval in the TimeLine.

CdbStatus last (CdbBdbSTimeLineInterval< V > &theInterval) const
 Get the last interval in the TimeLine.

IteratorOfIntervals iterator (const BdbTime &theBeginTime=BdbTime::minusInfinity) const
 Get an instance of an iterator for intervals.

void dump (std::ostream &o, const BdbTime &theBeginTime=BdbTime::minusInfinity, const BdbTime &theEndTime=BdbTime::plusInfinity)
 Dump the contents of the collection.

CdbStatus clone (BdbRef(CdbBdbSTimeLineP< V >)&theRef, const BdbRefAny &theHint=0) const
 Clone the timeline object.


Detailed Description

template<class V>
class CdbBdbSTimeLineP< V >

Persistent TimeLine class.

This is a persistent implementation for the timeline of intervals.

Definition at line 22 of file CdbBdbSTimeLineP.ddl.


Member Typedef Documentation

template<class V>
typedef CdbItr< CdbBdbSTimeLineInterval<V> > CdbBdbSTimeLineP< V >::IteratorOfIntervals
 

Type definitions for the TimeLine's iterators.

These types are being introduced here to facilitate more flexible type parametrisation of the class's clients (including its direct and indirect subclasses).

Definition at line 39 of file CdbBdbSTimeLineP.ddl.

Referenced by CdbBdbSTimeLineP< V >::iterator().


Constructor & Destructor Documentation

template<class V>
CdbBdbSTimeLineP< V >::CdbBdbSTimeLineP  
 

Default constructor.

The timeline will be initialized with the value constructed according the default constriuctor of the corresponding class.

Definition at line 21 of file CdbBdbSTimeLineP.cc.

template<class V>
CdbBdbSTimeLineP< V >::CdbBdbSTimeLineP const V &    theInitialValue
 

Normal constructor.

This form of the constructor lets a client to specify the initial value to be put into the timeline. This value will be covering the whole timeline from the -Infinity to +Infinity.

Definition at line 30 of file CdbBdbSTimeLineP.cc.

template<class V>
CdbBdbSTimeLineP< V >::~CdbBdbSTimeLineP   [virtual]
 

Definition at line 38 of file CdbBdbSTimeLineP.cc.


Member Function Documentation

template<class V>
CdbStatus CdbBdbSTimeLineP< V >::clone BdbRef(CdbBdbSTimeLineP< V >)&    theRef,
const BdbRefAny &    theHint = 0
const
 

Clone the timeline object.

An exact copy of the current object will be created at specified location. If the default value for the hint is chosen then an objects will be created next to the current one.

This operation may return a error status in case of problems during the cloning (memory management) or any inconsistency at the internal structure of the current object.

Parameters:
theRef  the reference onto created clone
theHint  the location of the clone

Definition at line 254 of file CdbBdbSTimeLineP.cc.

References CdbBdbSTimeLineNode< V >::begin, CdbBdbSTimeLineNode< V >::end, CdbBdbSTimeLineP< V >::insert(), CdbBdbSTimeLineNode< V >::interval(), CdbBdbSTimeLineNode< V >::next, CdbStatus::Success, and CdbBdbSTimeLineNode< V >::value.

Referenced by CdbBdbSRevisionP::CdbBdbSRevisionP().

template<class V>
void CdbBdbSTimeLineP< V >::dump std::ostream &    o,
const BdbTime   theBeginTime = BdbTime::minusInfinity,
const BdbTime   theEndTime = BdbTime::plusInfinity
 

Dump the contents of the collection.

The range of the dumped interval is controlled by mean of two optional parameters.

Parameters:
o  the output stream
theBeginTime  the begin time of the interval
theEndTime  the end time of the interval

Definition at line 197 of file CdbBdbSTimeLineP.cc.

References CdbBdbSTimeLineNode< V >::begin, CdbBdbSTimeLineNode< V >::end, BdbTime::getGmtNsec(), BdbTime::getGmtSec(), CdbBdbSTimeLineNode< V >::next, CdbBdbSTimeLineNode< V >::prev, CdbBdbSTimeLineNode< V >::value, and CdbBdbSInterValBte::value.

template<class V>
bool CdbBdbSTimeLineP< V >::find CdbBdbSTimeLineInterval< V > &    theInterval,
const BdbTime   theTime
const
 

Find an interval in the TimeLine.

This method if successfull (returned value is TRUE) will return the information about the interval where the specified time falls into.

Definition at line 139 of file CdbBdbSTimeLineP.cc.

References CdbBdbSInterValBte::value.

template<class V>
bool CdbBdbSTimeLineP< V >::findAtBegin CdbBdbSTimeLineInterval< V > &    theInterval,
const BdbTime   theTime
const
 

Find an interval in the TimeLine.

This method will only return "true" if specified time macthes to the begin time of an interval in the TimeLine.

Definition at line 125 of file CdbBdbSTimeLineP.cc.

References CdbBdbSInterValBte::value.

template<class V>
CdbStatus CdbBdbSTimeLineP< V >::first CdbBdbSTimeLineInterval< V > &    theInterval const
 

Get the first interval in the TimeLine.

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

Parameters:
theInterval  the value of the interval to be returned

Definition at line 153 of file CdbBdbSTimeLineP.cc.

References CdbStatus::Success.

template<class V>
CdbStatus CdbBdbSTimeLineP< V >::insert const CdbBdbSTimeLineInterval< V > &    theInterval
 

Insert an interval into the collection.

This method will "cut in" the specified interval.

Parameters:
theInterval  the interval to insert

Definition at line 116 of file CdbBdbSTimeLineP.cc.

References CdbBdbSTimeLineInterval< V >::begin, CdbBdbSTimeLineInterval< V >::end, CdbBdbSTimeLineP< V >::insert(), and CdbBdbSTimeLineInterval< V >::value.

template<class V>
CdbStatus CdbBdbSTimeLineP< V >::insert const BdbTime   theBeginTime,
const BdbTime   theEndTime,
const V &    theValue
 

Insert an interval into the collection.

This method will "cut in" the specified interval.

Parameters:
theBeginTime  the begin time of the interval
theEndTime  the end time of the interval
theValue  the value associated with this interval

Definition at line 46 of file CdbBdbSTimeLineP.cc.

References CdbStatus::Error, CdbStatus::Success, and CdbBdbSInterValBte::value.

Referenced by CdbBdbSTimeLineP< V >::clone(), and CdbBdbSTimeLineP< V >::insert().

template<class V>
CdbBdbSTimeLineP< V >::IteratorOfIntervals CdbBdbSTimeLineP< V >::iterator const BdbTime   theBeginTime = BdbTime::minusInfinity const
 

Get an instance of an iterator for intervals.

The intervals delivered via this iterator are sorted in the TimeLIne dimension. The first interval in the list will include the specified begin time.

Definition at line 169 of file CdbBdbSTimeLineP.cc.

References CdbBdbSTimeLineP< V >::IteratorOfIntervals, BdbTime::minusInfinity, BdbTime::plusInfinity, and CdbBdbSInterValBte::value.

template<class V>
CdbStatus CdbBdbSTimeLineP< V >::last CdbBdbSTimeLineInterval< V > &    theInterval const
 

Get the last interval in the TimeLine.

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

Parameters:
theInterval  the value of the interval to be returned

Definition at line 161 of file CdbBdbSTimeLineP.cc.

References 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