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

CdbRooRoTimeLineR< V > Class Template Reference

Persistent TimeLine class. More...

List of all members.

Public Types

typedef CdbRooRoTimeLineIntervalR<
V > 
Interval
typedef CdbRooRoTimeLineNodeR<
V > 
Node
typedef CdbItr< IntervalIteratorOfIntervals
 Type definitions for the TimeLine's iterators.


Public Member Functions

 CdbRooRoTimeLineR ()
 Default constructor.

 CdbRooRoTimeLineR (const V &theInitialValue)
 Normal constructor.

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

CdbStatus insert (const Interval &theInterval)
 Insert an interval into the collection.

bool findAtBegin (Interval &theInterval, const BdbTime &theTime) const
 Find an interval in the TimeLine.

bool find (Interval &theInterval, const BdbTime &theTime) const
 Find an interval in the TimeLine.

CdbStatus first (Interval &theInterval) const
 Get the first interval in the TimeLine.

CdbStatus last (Interval &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) const
 Dump the contents of the collection.


Detailed Description

template<class V>
class CdbRooRoTimeLineR< V >

Persistent TimeLine class.

This is a persistent implementation for the timeline of intervals.

Definition at line 139 of file CdbRooRoTimeLineR.rdl.


Member Typedef Documentation

template<class V>
typedef CdbRooRoTimeLineIntervalR< V > CdbRooRoTimeLineR< V >::Interval
 

Definition at line 143 of file CdbRooRoTimeLineR.rdl.

template<class V>
typedef CdbItr< Interval > CdbRooRoTimeLineR< 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 159 of file CdbRooRoTimeLineR.rdl.

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

template<class V>
typedef CdbRooRoTimeLineNodeR< V > CdbRooRoTimeLineR< V >::Node
 

Definition at line 144 of file CdbRooRoTimeLineR.rdl.


Constructor & Destructor Documentation

template<class V>
CdbRooRoTimeLineR< V >::CdbRooRoTimeLineR  
 

Default constructor.

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

Definition at line 221 of file CdbRooRoTimeLineR.cc.

template<class V>
CdbRooRoTimeLineR< V >::CdbRooRoTimeLineR 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 230 of file CdbRooRoTimeLineR.cc.

template<class V>
virtual CdbRooRoTimeLineR< V >::~CdbRooRoTimeLineR   [inline, virtual]
 

Definition at line 180 of file CdbRooRoTimeLineR.rdl.


Member Function Documentation

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

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 389 of file CdbRooRoTimeLineR.cc.

References CdbRooRoTimeLineNodeR< V >::begin(), CdbRooRoTimeLineNodeR< V >::end(), CdbRooRoAbsBtreeR< CdbRooRoInterValBteR, CdbRooRoInterValBteFCPR, ORDER >::fuzzySearch(), CdbRooRoTimeLineNodeR< V >::next(), CdbRooRoTimeLineNodeR< V >::prev(), CdbTimeUtils::time2string(), CdbRooRoTimeLineNodeR< V >::value(), and CdbRooRoInterValBteR::value().

template<class V>
bool CdbRooRoTimeLineR< V >::find Interval   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 330 of file CdbRooRoTimeLineR.cc.

References CdbRooRoAbsBtreeR< CdbRooRoInterValBteR, CdbRooRoInterValBteFCPR, ORDER >::fuzzySearch(), and CdbRooRoInterValBteR::value().

template<class V>
bool CdbRooRoTimeLineR< V >::findAtBegin Interval   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 316 of file CdbRooRoTimeLineR.cc.

References CdbRooRoAbsBtreeR< CdbRooRoInterValBteR, CdbRooRoInterValBteFCPR, ORDER >::search(), and CdbRooRoInterValBteR::value().

template<class V>
CdbStatus CdbRooRoTimeLineR< V >::first Interval   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 344 of file CdbRooRoTimeLineR.cc.

References CdbStatus::Success.

template<class V>
CdbStatus CdbRooRoTimeLineR< V >::insert const Interval   theInterval
 

Insert an interval into the collection.

This method will "cut in" the specified interval.

Parameters:
theInterval  the interval to insert

Definition at line 307 of file CdbRooRoTimeLineR.cc.

References CdbRooRoTimeLineIntervalR< V >::begin(), CdbRooRoTimeLineIntervalR< V >::end(), CdbRooRoTimeLineR< V >::insert(), and CdbRooRoTimeLineIntervalR< V >::value().

template<class V>
CdbStatus CdbRooRoTimeLineR< 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 239 of file CdbRooRoTimeLineR.cc.

References CdbStatus::Error, CdbRooRoAbsBtreeR< CdbRooRoInterValBteR, CdbRooRoInterValBteFCPR, ORDER >::fuzzySearch(), CdbStatus::Success, and CdbRooRoInterValBteR::value().

Referenced by CdbRooRoTimeLineR< V >::insert().

template<class V>
CdbRooRoTimeLineR< V >::IteratorOfIntervals CdbRooRoTimeLineR< 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 360 of file CdbRooRoTimeLineR.cc.

References CdbRooRoAbsBtreeR< CdbRooRoInterValBteR, CdbRooRoInterValBteFCPR, ORDER >::fuzzySearch(), CdbRooRoTimeLineR< V >::IteratorOfIntervals, BdbTime::minusInfinity, BdbTime::plusInfinity, and CdbRooRoInterValBteR::value().

template<class V>
CdbStatus CdbRooRoTimeLineR< V >::last Interval   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 352 of file CdbRooRoTimeLineR.cc.

References CdbStatus::Success.


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