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/CdbBdbSView.hh

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_VIEW_HH
00002 #define CDBBDBSHARED_VIEW_HH
00003 
00004 #include "CdbBase/CdbView.hh"
00005 #include "CdbBdbShared/CdbBdbSViewP.hh"
00006 #include "CdbBdbShared/CdbBdbSRegistryP.hh"
00007 
00008 /// This class implements an abstract base class CdbView
00009 /**
00010   * This class is based on new implementation of persistent data structures.
00011   *
00012   * @see CdbView
00013   */
00014 class CdbBdbSView : public CdbView {
00015 
00016 private:
00017 
00018   /// The default constructor (NOT IMPLEMENTED)
00019   /**
00020     * Is disabled...
00021     */
00022     CdbBdbSView( );
00023 
00024   /// The copy constructor (NOT IMPLEMENTED)
00025   /**
00026     * Is disabled...
00027     */
00028     CdbBdbSView( const CdbBdbSView& theView );
00029 
00030   /// The assignment operator (NOT IMPLEMENTED)
00031   /**
00032     * Is disabled...
00033     */
00034     CdbBdbSView& operator=( const CdbBdbSView& theView );
00035 
00036 protected:
00037 
00038   /// The cloning method
00039   /**
00040     * Implements the corresponding method of a base class or interface.
00041     *
00042     * @see CdbCloneable::clone()
00043     */
00044     virtual CdbView* clone( ) const;
00045 
00046 public:
00047 
00048   /// The normal constructor...
00049   /**
00050     * More details...
00051     */
00052     CdbBdbSView( const CdbDatabasePtr&              thePtr,             /**< the smart pointer providing a back link to the parent object */
00053                  const char*                        theName,            /**< the name of the view */
00054                  const CdbId&                       theId,              /**< extended identifier of the view */
00055                  const BdbHandle(CdbBdbSViewP)&     theViewH,           /**< the persistent representation of this view */
00056                  const BdbHandle(CdbBdbSRegistryP)& theMasterRegistryH, /**< the main access point to the persistent store */
00057                  const BdbHandle(CdbBdbSRegistryP)& theLocalRegistryH   /**< the main access point to the persistent store */
00058                );
00059 
00060   /// The destructor.
00061   /**
00062     * Is only available for the derived classes and friends to prevent accidental
00063     * deletion of objects.
00064     */
00065     virtual ~CdbBdbSView( );
00066 
00067 public:
00068 
00069   /// Check if the current API context is valid.
00070   /**
00071     * Implements a pure virtual method of a base class or interface.
00072     *
00073     * @see CdbStateControl::isValid()
00074     */
00075     virtual bool isValid( );
00076 
00077   /// Check if the current API component is open.
00078   /**
00079     * Implements a pure virtual method of a base class or interface.
00080     *
00081     * @see CdbStateControl::isOpen()
00082     */
00083     virtual bool isOpen( );
00084 
00085   /// Open the component.
00086   /**
00087     * Implements a pure virtual method of a base class or interface.
00088     *
00089     * @see CdbStateControl::open()
00090     */
00091     virtual CdbStatus open( );
00092 
00093   /// Close the component.
00094   /**
00095     * Implements a pure virtual method of a base class or interface.
00096     *
00097     * @see CdbStateControl::close()
00098     */
00099     virtual CdbStatus close( );
00100 
00101   /// Get the current status of the view
00102   /**
00103     * Implements a pure virtual method of a base class or interface.
00104     *
00105     * @see CdbStateControl::isFrozen()
00106     */
00107     virtual bool isFrozen( ) const;
00108 
00109   /// Find the specified Folder
00110   /**
00111     * Implements a pure virtual method of a base class or interface.
00112     *
00113     * @see CdbFolderLocator::findFolder()
00114     */
00115     virtual CdbStatus findFolder( CdbFolderPtr& thePtr,
00116                                   const char*   theName );
00117 
00118   /// Initialize an instance of an iterator for the known folders names
00119   /**
00120     * Implements a pure virtual method of a base class or interface.
00121     *
00122     * @see CdbFolderLocator::folderIterator()
00123     */
00124     virtual CdbStatus folderIterator( CdbFolderItr& theItr );
00125 
00126   /// Get a "config element" for a condition at specified point of validity time
00127   /**
00128     * Implements a pure virtual method of a base class or interface.
00129     *
00130     * @see CdbView::get()
00131     */
00132     virtual CdbStatus get( const char*       theName,
00133                            const BdbTime&    theValidityTime,
00134                            CdbConfigElement& theConfigElement
00135                          ) const;
00136 
00137   /// Set up an iterator of "config elements" for a condition
00138   /**
00139     * Implements a pure virtual method of a base class or interface.
00140     *
00141     * @see CdbView::configIterator()
00142     */
00143     virtual CdbStatus configIterator( const char*               theName,
00144                                       CdbItr<CdbConfigElement>& theItr ) const;
00145 
00146   /// Get current value of the state identifier
00147   /**
00148    * Implements a pure virtual method of a base class or interface.
00149    *
00150    * @see CdbView::currentStateId()
00151    */
00152     virtual CdbStateId currentStateId( const BdbTime& theValidityTime ) const;
00153 
00154   /// Initialize an instance of an iterator for the history events
00155   /**
00156     * Implements a pure virtual method of a base class or interface.
00157     *
00158     * @see CdbHistoryProvider::historyEventIterator()
00159     */
00160     virtual CdbStatus historyEventIterator( CdbHistoryEventItr& theItr,
00161                                             const BdbTime&      theBeginTime,
00162                                             const BdbTime&      theEndTime,
00163                                             const char**        theEventsToSelect );
00164 
00165   /// Initialize an instance of an iterator for the khistory events
00166   /**
00167     * Implements a pure virtual method of a base class or interface.
00168     *
00169     * @see CdbHistoryProvider::historyEventTypeIterator()
00170     */
00171     virtual CdbStatus historyEventTypeIterator( CdbHistoryEventTypeItr& theItr );
00172 
00173 private:
00174 
00175   // Access points to the persistent store
00176 
00177     BdbHandle(CdbBdbSViewP)     _viewH;
00178     BdbHandle(CdbBdbSRegistryP) _masterRegistryH;
00179     BdbHandle(CdbBdbSRegistryP) _localRegistryH;
00180 };
00181 
00182 #endif  // CDBBDBSHARED_VIEW_HH

 


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

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