00001 // File and Version Information: 00002 // $Id: CdbBdbSCollectionIdItr.cc,v 1.5 2002/09/23 22:41:07 gapon Exp $ 00003 00004 /// Implementation file for the CdbBdbSCollectionIdItr class. 00005 /** 00006 * @see CdbBdbSCollectionIdItr 00007 */ 00008 00009 #include "BaBar/BaBar.hh" 00010 00011 #include "CdbBdbShared/CdbBdbSCollectionIdItr.hh" 00012 00013 CdbBdbSCollectionIdItr::CdbBdbSCollectionIdItr( const CdbItr< CdbBdbSCollectionBte >& theInputItr ) : 00014 _inputItr(theInputItr) 00015 { } 00016 00017 CdbBdbSCollectionIdItr::CdbBdbSCollectionIdItr( const CdbBdbSCollectionIdItr& theItr ) : 00018 _inputItr(theItr._inputItr) 00019 { } 00020 00021 CdbBdbSCollectionIdItr::~CdbBdbSCollectionIdItr( ) 00022 { } 00023 00024 CdbStatus 00025 CdbBdbSCollectionIdItr::reset( ) 00026 { 00027 return _inputItr.reset( ); 00028 } 00029 00030 bool 00031 CdbBdbSCollectionIdItr::next( ) 00032 { 00033 bool result = _inputItr.next( ); 00034 00035 // Load/update the cached value. 00036 00037 if( result ) 00038 _inputValue = _inputItr.value( ); 00039 00040 return result; 00041 } 00042 00043 CdbBdbSCollectionIdItr::ValueType 00044 CdbBdbSCollectionIdItr::value( ) 00045 { 00046 assert( _inputItr.isValid( )); // Inproper use of the iterator if not advanced or beyond the end. 00047 00048 // Return the value from the cache. 00049 00050 return _inputValue.key; 00051 } 00052 00053 bool 00054 CdbBdbSCollectionIdItr::isValid( ) 00055 { 00056 return _inputItr.isValid( ); 00057 } 00058 00059 CdbBdbSCollectionIdItr::InterfaceType* 00060 CdbBdbSCollectionIdItr::clone( ) const 00061 { 00062 return new CdbBdbSCollectionIdItr( *this ); 00063 } 00064 00065 ///////////////// 00066 // End Of File // 00067 /////////////////
1.3-rc3