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  

/CdbBase/CdbViewLocator.hh

Go to the documentation of this file.
00001 #ifndef CDB_VIEW_LOCATOR_HH
00002 #define CDB_VIEW_LOCATOR_HH
00003 
00004 #include "CdbBase/CdbId.hh"
00005 #include "CdbBase/CdbViewPtrFwd.hh"
00006 #include "CdbBase/CdbViewItr.hh"
00007 
00008 #include <string>
00009 
00010 /// This is a base class for a view locator
00011 /**
00012   * This is an interface defining a set of methods for view location.
00013   */
00014 class CdbViewLocator {
00015 
00016 protected:
00017 
00018   /// The destructor
00019   /**
00020     * Is disabled to prevent deleting subclassing objects by a pointer
00021     * at this interface.
00022     */
00023     virtual ~CdbViewLocator( );
00024 
00025 public:
00026 
00027   /// Default view name
00028   /**
00029     * This name is delivered when a client is relying on this default.
00030     */
00031     virtual std::string defaultView( ) const = 0;
00032 
00033   /// Find the specified view
00034   /**
00035     * This method initializes a smart pointer to a transient object
00036     * of the CdbView class representing the found view. It will initialize
00037     * the smart pointer to point onto 0 and return the corresponding error status
00038     * when specified object is not found or is not awailable for some
00039     * other reason.
00040     *
00041     * The only parameter to be specified when looking for a view is its name. If
00042     * a 0 pointer is passed instead of the name then a default view will be open.
00043     *
00044     * @see CdbView
00045     * @see CdbViewPtr
00046     * @see CdbStatus
00047     *
00048     * @return a completion status of the operation
00049     */
00050     virtual CdbStatus findView( CdbViewPtr& thePtr,         /**< a smart pointer to an object to be initialized */
00051                                 const char* theName = 0     /**< the object specifications */
00052                               ) = 0;
00053 
00054   /// Find the specified view
00055   /**
00056     * Unlike the previous method, this one uses "extended" identifier of a view
00057     * to find the corresponding object.
00058     *
00059     * @see CdbId
00060     */
00061     virtual CdbStatus findView( CdbViewPtr&  thePtr,        /**< a smart pointer to an object to be initialized */
00062                                 const CdbId& theId          /**< the object specifications */
00063                               ) = 0;
00064 
00065   /// Initialize an instance of an iterator for the known views names
00066   /**
00067     * The iterator will be set into a "valid" state upon successfull completion.
00068     *
00069     * @see CdbIItr::isValid()
00070     * @see CdbView
00071     * @see CdbViewItr
00072     * @see CdbStatus
00073     *
00074     * @return completion status
00075     */
00076     virtual CdbStatus viewIterator( CdbViewItr& theItr ) = 0;
00077 };
00078 
00079 #endif  // CDB_VIEW_LOCATOR_HH
00080 

 


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

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