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

CdbBdbSRevisionP.cc

Go to the documentation of this file.
00001 // File and Version Information:
00002 //      $Id: CdbBdbSRevisionP.cc,v 1.6 2002/09/23 22:41:12 gapon Exp $
00003 
00004 /// Implementation file for the CdbBdbSRallocatorP class
00005 /**
00006   * @see CdbBdbSRallocatorP
00007   */
00008 
00009 #include "BaBar/BaBar.hh"
00010 
00011 #include "CdbBdbShared/CdbBdbSRevisionP.hh"
00012 
00013 #include <assert.h>
00014 
00015 CdbBdbSRevisionP::CdbBdbSRevisionP( ) :
00016     _id(BdbTime::plusInfinity),
00017     _name("<topmost>"),
00018     _collectionRef(0),
00019     _created(BdbTime::now( )),
00020     _description("created automatically")
00021 {
00022     _collectionRef = new( ooThis( )) CdbBdbSViCollectionP( );
00023     assert( !BdbIsNull( _collectionRef ));
00024 }
00025 
00026 CdbBdbSRevisionP::CdbBdbSRevisionP( const BdbTime&                      theId,
00027                                     const char*                         theName,
00028                                     const BdbRef(CdbBdbSViCollectionP)& theCollectionRef,
00029                                     const BdbTime&                      theCreationTime,
00030                                     const char*                         theDescription ) :
00031     _id(theId),
00032     _name(theName),
00033     _collectionRef(theCollectionRef),
00034     _created(theCreationTime),
00035     _description(theDescription)
00036 {
00037     assert( BdbTime::minusInfinity != theId );
00038     assert( BdbTime::plusInfinity  != theId );
00039     assert( 0 != theName );
00040     assert( !BdbIsNull( theCollectionRef ));
00041     assert( 0 != theDescription );
00042     assert( BdbTime::plusInfinity  != theCreationTime );
00043     assert( theCreationTime >= theId );
00044 
00045     CdbStatus status = theCollectionRef->clone( _collectionRef,
00046                                                 ooThis( ));
00047     assert( CdbStatus::Success == status );
00048     assert( !BdbIsNull( _collectionRef ));
00049 }
00050 
00051 CdbBdbSRevisionP::~CdbBdbSRevisionP( ) 
00052 {
00053     BdbDelete( _collectionRef );
00054 }
00055 
00056 BdbTime
00057 CdbBdbSRevisionP::id( ) const
00058 {
00059     return _id;
00060 }
00061 
00062 ooString(32)
00063 CdbBdbSRevisionP::name( ) const
00064 {
00065     return _name;
00066 }
00067 
00068 BdbRef(CdbBdbSViCollectionP)
00069 CdbBdbSRevisionP::collection( ) const
00070 {
00071     return _collectionRef;
00072 }
00073 
00074 BdbTime
00075 CdbBdbSRevisionP::created( ) const
00076 {
00077     return _created;
00078 }
00079 
00080 ooString(32)
00081 CdbBdbSRevisionP::description( ) const
00082 {
00083     return _description;
00084 }
00085 
00086 /////////////////
00087 // End Of File //
00088 /////////////////

Generated on Mon Dec 5 18:22:03 2005 for CDB by doxygen1.3-rc3