Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

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

CdbBdbSOriginP Class Reference
[CdbBdbShared]

Inheritance diagram for CdbBdbSOriginP:

CdbBdbSCollectionElementP BdbPersObj List of all members.

Public Types

enum  OriginType {
  FIRST = 0, MASTER = FIRST, SLAVE, REPLICA,
  TEST, LAST = TEST
}
 The supported origin types. More...

enum  {
  FIRST_ID = 0, MASTER_ID = FIRST_ID, REPLICA_ID, TEST_ID,
  LAST_ID = 255
}
 Predefined (reserved) origin identifiers (total of 256). More...


Public Methods

 CdbBdbSOriginP (ooInternalObj iobj)
 Special constructor (NOT IMPLEMENTED).

 CdbBdbSOriginP (const char *theName, d_UShort theId, OriginType theType, const BdbTime &theCreationTime, const char *theDescription, const char *theDbIdRange)
 Normal constructor.

virtual ~CdbBdbSOriginP ()
 Destructor.

OriginType type () const
BdbTime created () const
 ooString (32) description() const
 ooString (32) dbidrange() const
void dump (ostream &o) const
 Dump the contents of the origin.


Static Public Methods

CdbStatus name2type (const char *theName, OriginType &theType)
 Convert specified name to the type identifier.

const char * type2name (OriginType theType)
 Convert specified type identifier into the name.

bool isReservedId (d_UShort theId)
 Check if specified identifier is a reserved one.


Static Public Attributes

const char * OriginName []
 The names of the above defined origin types.


Private Methods

 CdbBdbSOriginP ()
 Default constructor (NOT IMPLEMENTED)).

 ooString (32) _description
 ooString (32) _dbidrange

Private Attributes

OriginType _type
BdbTime _created

Member Enumeration Documentation

anonymous enum
 

Predefined (reserved) origin identifiers (total of 256).

Enumeration values:
FIRST_ID 
MASTER_ID 
REPLICA_ID 
TEST_ID 
LAST_ID 

Definition at line 64 of file CdbBdbSOriginP.ddl.

enum CdbBdbSOriginP::OriginType
 

The supported origin types.

Enumeration values:
FIRST 
MASTER 
SLAVE 
REPLICA 
TEST 
LAST 

Definition at line 50 of file CdbBdbSOriginP.ddl.


Constructor & Destructor Documentation

CdbBdbSOriginP::CdbBdbSOriginP ooInternalObj    iobj [inline]
 

Special constructor (NOT IMPLEMENTED).

WARNING: This constructor is defined to avoid automatically generated constructor from Objectivity, which will break the compilation due to missing default constructor of BdbTime class.

Definition at line 79 of file CdbBdbSOriginP.ddl.

References _created.

CdbBdbSOriginP::CdbBdbSOriginP   [private]
 

Default constructor (NOT IMPLEMENTED)).

Also see comments about the special constructor defined above.

CdbBdbSOriginP::CdbBdbSOriginP const char *    theName,
d_UShort    theId,
OriginType    theType,
const BdbTime   theCreationTime,
const char *    theDescription,
const char *    theDbIdRange
 

Normal constructor.

WARNING: Inappropriate values of the parameters will cause the crash of the constructor to avoid creating disformed persistent data structures.

Parameters:
theName  the name of the origin
theId  the identifier of the origin
theType  the type from the above defined enumerated type
theCreationTime  the time when the origin is supposed to be created
theDescription  the description of the origin
theDbIdRange  the name of the range

Definition at line 19 of file CdbBdbSOriginP.cc.

References FIRST, LAST, BdbTime::minusInfinity, and BdbTime::plusInfinity.

CdbBdbSOriginP::~CdbBdbSOriginP   [virtual]
 

Destructor.

Definition at line 41 of file CdbBdbSOriginP.cc.


Member Function Documentation

BdbTime CdbBdbSOriginP::created  
 

Definition at line 51 of file CdbBdbSOriginP.cc.

References _created.

void CdbBdbSOriginP::dump ostream &    o const
 

Dump the contents of the origin.

Definition at line 97 of file CdbBdbSOriginP.cc.

References _created, _type, CdbBdbSCollectionElementP::id(), and type2name().

bool CdbBdbSOriginP::isReservedId d_UShort    theId [static]
 

Check if specified identifier is a reserved one.

Parameters:
theId  the identifier of the origin

Definition at line 91 of file CdbBdbSOriginP.cc.

References LAST_ID.

Referenced by CdbBdbSSlaveRegistryP::CdbBdbSSlaveRegistryP().

CdbStatus CdbBdbSOriginP::name2type const char *    theName,
OriginType   theType
[static]
 

Convert specified name to the type identifier.

The passed name must look in the same way as the corressponding value of the enumerated type. For example MASTER corresponds to string "MASTER". This is the case sensitive translation.

Return CdbStatus::Success if specified name is valid.

Parameters:
theName  the name of the type
theType  the value to be set up

Definition at line 69 of file CdbBdbSOriginP.cc.

References MASTER, CdbStatus::NotFound, OriginName, REPLICA, SLAVE, CdbStatus::Success, and TEST.

CdbBdbSOriginP::ooString 32    [private]
 

Reimplemented from CdbBdbSCollectionElementP.

CdbBdbSOriginP::ooString 32    [private]
 

Reimplemented from CdbBdbSCollectionElementP.

CdbBdbSOriginP::ooString 32    const
 

Reimplemented from CdbBdbSCollectionElementP.

CdbBdbSOriginP::ooString 32    const
 

Reimplemented from CdbBdbSCollectionElementP.

CdbBdbSOriginP::OriginType CdbBdbSOriginP::type  
 

Definition at line 45 of file CdbBdbSOriginP.cc.

References _type.

const char * CdbBdbSOriginP::type2name OriginType    theType [static]
 

Convert specified type identifier into the name.

Will return 0 if specified type does not exist. Will return a pointer onto a static string in case of success.

Parameters:
theType  the type identifier

Definition at line 83 of file CdbBdbSOriginP.cc.

References FIRST, LAST, OriginName, and result.

Referenced by CdbBdbSMasterRegistryP::CdbBdbSMasterRegistryP(), dump(), and CdbBdbSRegistryP::findByOrigin().


Member Data Documentation

BdbTime CdbBdbSOriginP::_created [private]
 

Definition at line 156 of file CdbBdbSOriginP.ddl.

Referenced by CdbBdbSOriginP(), created(), and dump().

OriginType CdbBdbSOriginP::_type [private]
 

Definition at line 155 of file CdbBdbSOriginP.ddl.

Referenced by dump(), and type().

const char * CdbBdbSOriginP::OriginName [static]
 

Initial value:

 { "MASTER",
                                 "SLAVE",
                                 "REPLICA",
                                 "TEST" }
The names of the above defined origin types.

See also:
CdbBdbSOriginP

Definition at line 14 of file CdbBdbSOriginP.cc.

Referenced by name2type(), and type2name().


The documentation for this class was generated from the following files:

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002