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

CdbBdbSConfigCollectionP Class Reference

A collection of configuration records. More...

Inheritance diagram for CdbBdbSConfigCollectionP:

BdbPersObj List of all members.

Public Types

typedef CdbItr< CdbBdbSConfigIntervalIteratorOfIntervals
 Type definitions for the collection's iterators.


Public Member Functions

 CdbBdbSConfigCollectionP ()
 Default constructor.

 CdbBdbSConfigCollectionP (const CdbBdbSConfigElement &theConfig)
 Normal constructor.

 CdbBdbSConfigCollectionP (const CdbBdbSConfigInterval &theConfigInterval)
 Normal constructor.

virtual ~CdbBdbSConfigCollectionP ()
void reset ()
 Reset the collection and set default "simple" configuration.

CdbStatus insert (const CdbBdbSConfigElement &theInitialConfig, const BdbTime &theBeginTime=BdbTime::minusInfinity, const BdbTime &theEndTime=BdbTime::plusInfinity)
 Modify the configuration for specified range of the validity time.

CdbStatus insert (const CdbBdbSConfigInterval &theConfigInterval)
 Modify the configuration for specified range of the validity time.

CdbStatus find (const BdbTime &theTime, CdbBdbSConfigInterval &theConfigInterval) const
 Find the value of the configuration and its interval of validity...

IteratorOfIntervals iterator () const
 Get an instance of an iterator for intervals.

CdbStatus clone (BdbRef(CdbBdbSConfigCollectionP)&theRef, const BdbRefAny &theHint=0) const
 Clone the collection object.

bool isEqual (const BdbRef(CdbBdbSConfigCollectionP)&theRef) const
 Compare the current collection with the one specified.

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


Detailed Description

A collection of configuration records.

This is a persistent implementation for the timeline (in the "validity" dimension) of "condition configuration". This configuration describes which revision and/or partition to use for the corresponding condition at specified point at the validity dimension. This class also provides access to the duration of each interval of the stable configuration.

Definition at line 35 of file CdbBdbSConfigCollectionP.ddl.


Member Typedef Documentation

typedef CdbItr< CdbBdbSConfigInterval > CdbBdbSConfigCollectionP::IteratorOfIntervals
 

Type definitions for the collection'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 45 of file CdbBdbSConfigCollectionP.ddl.

Referenced by iterator().


Constructor & Destructor Documentation

CdbBdbSConfigCollectionP::CdbBdbSConfigCollectionP  
 

Default constructor.

Will initialize the "simple" configuration option using the default value of the "simple" configuration class as it's initialized by the simple configuratio's default constructor.

Definition at line 19 of file CdbBdbSConfigCollectionP.cc.

Referenced by clone().

CdbBdbSConfigCollectionP::CdbBdbSConfigCollectionP const CdbBdbSConfigElement   theConfig
 

Normal constructor.

Will initialize the "simple" configuration option using the specified value of the "simple" configuration class.

Definition at line 23 of file CdbBdbSConfigCollectionP.cc.

CdbBdbSConfigCollectionP::CdbBdbSConfigCollectionP const CdbBdbSConfigInterval   theConfigInterval
 

Normal constructor.

Will initialize the "simple" configuration option using the value taken from specified iinterval for the interval's validity range and default configuration outside this interval.

Definition at line 28 of file CdbBdbSConfigCollectionP.cc.

References BdbTime::minusInfinity, BdbTime::plusInfinity, and CdbStatus::Success.

CdbBdbSConfigCollectionP::~CdbBdbSConfigCollectionP   [virtual]
 

Definition at line 56 of file CdbBdbSConfigCollectionP.cc.


Member Function Documentation

CdbStatus CdbBdbSConfigCollectionP::clone BdbRef(CdbBdbSConfigCollectionP)&    theRef,
const BdbRefAny &    theHint = 0
const
 

Clone the collection 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 194 of file CdbBdbSConfigCollectionP.cc.

References BdbRef(), CdbBdbSConfigCollectionP(), and CdbStatus::Success.

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

Dump the contents of the collection.

Definition at line 278 of file CdbBdbSConfigCollectionP.cc.

CdbStatus CdbBdbSConfigCollectionP::find const BdbTime   theTime,
CdbBdbSConfigInterval   theConfigInterval
const
 

Find the value of the configuration and its interval of validity...

...where the specified validity time falls into.

Parameters:
theTime  the validity time
theConfigInterval  the configuration interval to be set up upon completion

Definition at line 154 of file CdbBdbSConfigCollectionP.cc.

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

CdbStatus CdbBdbSConfigCollectionP::insert const CdbBdbSConfigInterval   theConfigInterval
 

Modify the configuration for specified range of the validity time.

A simplified version of the previous method.

Definition at line 88 of file CdbBdbSConfigCollectionP.cc.

References CdbBdbSTimeLineInterval< CdbBdbSConfigElement >::begin, CdbBdbSTimeLineInterval< CdbBdbSConfigElement >::end, CdbStatus::Error, BdbTime::minusInfinity, BdbTime::plusInfinity, CdbStatus::Success, and CdbBdbSTimeLineInterval< CdbBdbSConfigElement >::value.

CdbStatus CdbBdbSConfigCollectionP::insert const CdbBdbSConfigElement   theInitialConfig,
const BdbTime   theBeginTime = BdbTime::minusInfinity,
const BdbTime   theEndTime = BdbTime::plusInfinity
 

Modify the configuration for specified range of the validity time.

The currently existing configuration will be replaced with the specified value for the specified range of the validity dimension.

Definition at line 78 of file CdbBdbSConfigCollectionP.cc.

References CdbBdbSConfigInterval.

bool CdbBdbSConfigCollectionP::isEqual const BdbRef(CdbBdbSConfigCollectionP)&    theRef const
 

Compare the current collection with the one specified.

This operation will return 'true' if collections are equal or 'false' otherwise, including various kind of errors (if any) faced during the comparision.

Parameters:
theRef  the reference onto a collection to compare with

Definition at line 238 of file CdbBdbSConfigCollectionP.cc.

References _simpleConfig, CdbBdbSTimeLineInterval< CdbBdbSConfigElement >::begin, CdbBdbSTimeLineInterval< CdbBdbSConfigElement >::end, iterator(), CdbItr< CdbBdbSConfigInterval >::next(), CdbBdbSTimeLineInterval< CdbBdbSConfigElement >::value, and CdbItr< CdbBdbSConfigInterval >::value().

CdbBdbSConfigCollectionP::IteratorOfIntervals CdbBdbSConfigCollectionP::iterator   const
 

Get an instance of an iterator for intervals.

Definition at line 181 of file CdbBdbSConfigCollectionP.cc.

References IteratorOfIntervals.

Referenced by isEqual().

void CdbBdbSConfigCollectionP::reset  
 

Reset the collection and set default "simple" configuration.

THis method will remove any previously existing configuration and replace it with the default value for the whole range of the validity dimension.

Definition at line 65 of file CdbBdbSConfigCollectionP.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