Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

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

/CdbBdbShared/CdbBdbSDatabaseItr.hh

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_DATABASE_ITR_HH
00002 #define CDBBDBSHARED_DATABASE_ITR_HH
00003 
00004 #include "CdbBase/CdbDatabaseItr.hh"
00005 #include "CdbBase/CdbPtrFwd.hh"
00006 
00007 #include <string>
00008 
00009 /// The internal implementation for the public iterators.
00010 /**
00011   * This class provides the actual implementation of the corresponding
00012   * iterator interface. Currently it's a very trivial implementation
00013   * returning a default database name.
00014   *
00015   * @see CdbIItr
00016   * @see CdbIItr::InterfaceType
00017   * @see CdbIItr::ValueType
00018   * @see CdbDatabaseItr
00019   * @see CdbDatabase
00020   * @see CdbDatabasePtr
00021   */
00022 class CdbBdbSDatabaseItr : public CdbDatabaseItr::InterfaceType {
00023 
00024 private:
00025 
00026   /// The default constructor (NOT IMPLEMENTED)
00027   /**
00028     * Is disabled...
00029     */
00030     CdbBdbSDatabaseItr( );
00031 
00032   /// The assignment operator (NOT IMPLEMENTED)
00033   /**
00034     * Is disabled...
00035     */
00036     CdbBdbSDatabaseItr& operator=( const CdbBdbSDatabaseItr& theItr );
00037 
00038 protected:
00039 
00040   /// The copy constructor
00041   /**
00042     * The only reason why we have it implemented is because it's needed
00043     * to implement the clone method.
00044     *
00045     * @see CdbBdbSDatabaseItr::clone()
00046     */
00047     CdbBdbSDatabaseItr( const CdbBdbSDatabaseItr& theItr );
00048 
00049 public:
00050 
00051   /// The normal constructor
00052   /**
00053     * Non 0 smart pointer is expected.
00054     */
00055     CdbBdbSDatabaseItr( const CdbPtr& theParent );
00056 
00057   /// The destructor
00058   /**
00059     * Details...
00060     */
00061     virtual ~CdbBdbSDatabaseItr( );
00062 
00063   /// Reset an iterator to its initial state.
00064   /**
00065     * This implements the corresponding method of the base class.
00066     *
00067     * @see CdbIItr::reset
00068     * @see CdbStatus
00069     */
00070     virtual CdbStatus reset( );
00071 
00072   /// Advance an iterator to the next position.
00073   /**
00074     * This implements the corresponding method of the base class.
00075     *
00076     * @see CdbIItr::next()
00077     */
00078     virtual bool next( );
00079 
00080   /// Obtain the currently reffered value.
00081   /**
00082     * This implements the corresponding method of the base class.
00083     *
00084     * @see CdbIItr::value()
00085     * @see CdbIItr::ValueType
00086     *
00087     * @return the current value the iterator is set on
00088     */
00089     virtual ValueType value( );
00090 
00091   /// Check if an iterator is valid.
00092   /**
00093     * This implements the corresponding method of the base class.
00094     *
00095     * @see CdbIItr::isValid()
00096     */
00097     virtual bool isValid( );
00098 
00099   /// Make a clone of itself
00100   /**
00101     * @see CdbIItr::clone()
00102     */
00103     virtual InterfaceType* clone( ) const;
00104 
00105 private:
00106 
00107     CdbPtr _myParent;
00108 
00109     bool _isValid;
00110     bool _hasEverBeenAdvanced;
00111 
00112     std::string _value;
00113 };
00114 
00115 #endif  // CDBBDBSHARED_DATABASE_ITR_HH

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002