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

CdbBdbSCollectionIdItr.hh

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_COLLECTION_ID_ITR_HH
00002 #define CDBBDBSHARED_COLLECTION_ID_ITR_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSCollectionIdItr.hh,v 1.6 2003/08/13 23:36:20 gapon Exp $
00006 
00007 #include "BdbUtil/Bdb.hh"
00008 
00009 #include "CdbBase/CdbIItr.hh"
00010 #include "CdbBase/CdbItr.hh"
00011 
00012 #include "CdbBdbShared/CdbBdbSCollectionBte.hh"
00013 #include "CdbBdbShared/CdbBdbSCollectionElementP.hh"
00014 
00015 /// The internal implementation for the public iterator for elements of collections
00016 /**
00017   * The iterator will return extract end return the identifiers of elements stored
00018   * in the collection.
00019   */
00020 class CdbBdbSCollectionIdItr : public CdbIItr<d_UShort> {
00021 
00022 public:
00023 
00024     typedef CdbIItr<d_UShort>::ValueType     ValueType;
00025     typedef CdbIItr<d_UShort>::InterfaceType InterfaceType;
00026 
00027 private:
00028 
00029   /// The default constructor (NOT IMPLEMENTED)
00030   /**
00031     * Is disabled...
00032     */
00033     CdbBdbSCollectionIdItr( );
00034 
00035   /// The assignment operator (NOT IMPLEMENTED)
00036   /**
00037     * Is disabled...
00038     */
00039     CdbBdbSCollectionIdItr& operator=( const CdbBdbSCollectionIdItr& theItr );
00040 
00041 protected:
00042 
00043   /// The copy constructor
00044   /**
00045     * The only reason why we have it implemented is because it's needed
00046     * to implement the clone method.
00047     *
00048     * @see CdbBdbSCollectionIdItr::clone()
00049     */
00050     CdbBdbSCollectionIdItr( const CdbBdbSCollectionIdItr& theItr );
00051 
00052 public:
00053 
00054   /// The normal constructor
00055   /**
00056     * Moste of the operations will be just forwarded
00057     * to the specified iterator.
00058     */
00059     CdbBdbSCollectionIdItr( const CdbItr< CdbBdbSCollectionBte >& theInputItr );
00060 
00061   /// The destructor
00062   /**
00063     * Details...
00064     */
00065     virtual ~CdbBdbSCollectionIdItr( );
00066 
00067   /// Reset an iterator to its initial state.
00068   /**
00069     * This implements the corresponding method of the base class.
00070     *
00071     * @see CdbIItr::reset
00072     * @see CdbStatus
00073     */
00074     virtual CdbStatus reset( );
00075 
00076   /// Advance an iterator to the next position.
00077   /**
00078     * This implements the corresponding method of the base class.
00079     *
00080     * @see CdbIItr::next()
00081     */
00082     virtual bool next( );
00083 
00084   /// Obtain the currently reffered value.
00085   /**
00086     * This implements the corresponding method of the base class.
00087     *
00088     * @see CdbIItr::value()
00089     * @see CdbIItr::ValueType
00090     *
00091     * @return the current value the iterator is set on
00092     */
00093     virtual ValueType value( );
00094 
00095   /// Check if an iterator is valid.
00096   /**
00097     * This implements the corresponding method of the base class.
00098     *
00099     * @see CdbIItr::isValid()
00100     */
00101     virtual bool isValid( );
00102 
00103   /// Make a clone of itself
00104   /**
00105     * @see CdbIItr::clone()
00106     */
00107     virtual InterfaceType* clone( ) const;
00108 
00109 private:
00110 
00111     CdbItr< CdbBdbSCollectionBte > _inputItr;   // The source of values.
00112     CdbBdbSCollectionBte           _inputValue; // Just a cache for the currently accessed value
00113 };
00114 
00115 #endif  // CDBBDBSHARED_COLLECTION_ID_ITR_HH

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