00001 // File and Version Information: 00002 // $Id: CdbBdbSClusterP.cc,v 1.6 2004/08/06 05:54:24 bartoldu Exp $ 00003 00004 /// Implementation file for the CdbBdbSClusterP class 00005 /** 00006 * @see CdbBdbSClusterP 00007 */ 00008 00009 #include "BaBar/BaBar.hh" 00010 00011 #include "CdbBdbShared/CdbBdbSClusterP.hh" 00012 00013 #include "CdbBdbShared/CdbBdbSConditionP.hh" 00014 #include "CdbBdbShared/CdbBdbSConditionAtClusterPItr.hh" 00015 00016 #include <assert.h> 00017 using std::endl; 00018 using std::ostream; 00019 00020 CdbBdbSClusterP::CdbBdbSClusterP( const char* theName, 00021 d_UShort theId, 00022 const char* theDescription, 00023 const BdbTime& theCreationTime ) : 00024 CdbBdbSCollectionElementP( theName, 00025 theId ), 00026 _description(theDescription), 00027 _created(theCreationTime) 00028 { 00029 assert( 0 != theDescription ); 00030 assert(( BdbTime::minusInfinity != theCreationTime ) && ( BdbTime::plusInfinity != theCreationTime )); 00031 } 00032 00033 CdbBdbSClusterP::~CdbBdbSClusterP( ) 00034 { } 00035 00036 ooString(32) 00037 CdbBdbSClusterP::description( ) const 00038 { 00039 return _description; 00040 } 00041 00042 BdbTime 00043 CdbBdbSClusterP::created( ) const 00044 { 00045 return _created; 00046 } 00047 00048 CdbStatus 00049 CdbBdbSClusterP::iterator( CdbItr< BdbRef(CdbBdbSConditionP) >& theItr ) const 00050 { 00051 theItr = CdbItr< BdbRef(CdbBdbSConditionP) >( new CdbBdbSConditionAtClusterPItr( ooThis( ))); 00052 return CdbStatus::Success; 00053 } 00054 00055 void 00056 CdbBdbSClusterP::dump( ostream& o ) const 00057 { 00058 o << " NAME: " << name( ).head( ) << endl 00059 << " ID: " << id( ) << endl 00060 << "DESCRIPTION: " << _description.head( ) << endl 00061 << " CREATED: " << _created << endl; 00062 } 00063 00064 ///////////////// 00065 // End Of File // 00066 /////////////////
1.3-rc3