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

CdbBdbSConditionAtClusterPItr.hh

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_CONDITION_AT_CLUSTER_P_ITR_HH
00002 #define CDBBDBSHARED_CONDITION_AT_CLUSTER_P_ITR_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSConditionAtClusterPItr.hh,v 1.4 2003/08/13 23:36:20 gapon Exp $
00006 
00007 #include "BdbUtil/Bdb.hh"
00008 
00009 #include "CdbBase/CdbCommon.hh"
00010 #include "CdbBase/CdbIItr.hh"
00011 
00012 #include "CdbBdbShared/CdbBdbSClusterP.hh"
00013 #include "CdbBdbShared/CdbBdbSConditionP.hh"
00014 
00015 /// The internal implementation for the iterator of persistent conditions at a cluster.
00016 /**
00017   * This class provides the actual implementation of the corresponding
00018   * iterator interface.
00019   *
00020   * @see CdbIItr
00021   * @see CdbIItr::InterfaceType
00022   * @see CdbIItr::ValueType
00023   */
00024 class CdbBdbSConditionAtClusterPItr : public CdbIItr< BdbRef(CdbBdbSConditionP) > {
00025 
00026 public:
00027 
00028     typedef CdbIItr< BdbRef(CdbBdbSConditionP) >::ValueType     ValueType;
00029     typedef CdbIItr< BdbRef(CdbBdbSConditionP) >::InterfaceType InterfaceType;
00030 
00031 private:
00032 
00033   /// The copy constructor (IS DISABLED)
00034   /**
00035     * This is beause the ooMapItr class does not have the copy constructor too.
00036     */
00037     CdbBdbSConditionAtClusterPItr( const CdbBdbSConditionAtClusterPItr& theItr );
00038 
00039   /// The assignment operator (IS DISABLED)
00040   /**
00041     * This is beause the ooMapItr class does not have the assignment operator too.
00042     */
00043     CdbBdbSConditionAtClusterPItr& operator=( const CdbBdbSConditionAtClusterPItr& theItr );
00044 
00045 public:
00046 
00047   /// The normal and default constructor
00048   /**
00049     */
00050     CdbBdbSConditionAtClusterPItr( const BdbRef(CdbBdbSClusterP)& theClusterRef     /**< a cluster with the collection of conditions */
00051                                  );
00052 
00053   /// The destructor
00054   /**
00055     * Details...
00056     */
00057     virtual ~CdbBdbSConditionAtClusterPItr( );
00058 
00059   /// Reset an iterator to its initial state.
00060   /**
00061     * This implements the corresponding method of the base class.
00062     *
00063     * @see CdbIItr::reset
00064     * @see CdbStatus
00065     */
00066     virtual CdbStatus reset( );
00067 
00068   /// Advance an iterator to the next position.
00069   /**
00070     * This implements the corresponding method of the base class.
00071     *
00072     * @see CdbIItr::next()
00073     */
00074     virtual bool next( );
00075 
00076   /// Obtain the currently reffered value.
00077   /**
00078     * This implements the corresponding method of the base class.
00079     *
00080     * @see CdbIItr::value()
00081     * @see CdbIItr::ValueType
00082     *
00083     * @return the current value the iterator is set on
00084     */
00085     virtual ValueType value( );
00086 
00087   /// Check if an iterator is valid.
00088   /**
00089     * This implements the corresponding method of the base class.
00090     *
00091     * @see CdbIItr::isValid()
00092     */
00093     virtual bool isValid( );
00094 
00095   /// Make a clone of itself
00096   /**
00097     * @see CdbIItr::clone()
00098     *
00099     * WARNING: The current implementation of this method will return an instance
00100     *          reset to the original state, as if no "next" method has ever been
00101     *          called against it, even if the original instance is already
00102     *          in the "isValid = true" state.
00103     *          The reason of this is that ooItr does not have neither copy ctor,
00104     *          nor the assignment operator.
00105     */
00106     virtual InterfaceType* clone( ) const;
00107 
00108 private:
00109 
00110     bool _isValid;
00111     bool _hasEverBeenAdvanced;
00112 
00113     BdbRef(CdbBdbSClusterP)   _clusterRef;
00114     BdbRef(CdbBdbSConditionP) _valueRef;
00115 
00116     BdbItr(CdbBdbSConditionP) _itr;
00117 };
00118 
00119 #endif  // CDBBDBSHARED_CONDITION_AT_CLUSTER_P_ITR_HH

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