00001 #ifndef CDBROOREADONLY_VIEW_COLLECTION_R_RDL 00002 #define CDBROOREADONLY_VIEW_COLLECTION_R_RDL 00003 00004 // File and Version Information: 00005 // $Id: CdbRooRoViewCollectionR.rdl,v 1.4 2004/12/08 17:36:47 gapon Exp $ 00006 00007 #include "CdbBase/CdbCPtr.hh" 00008 00009 #include "CdbRooReadonly/CdbRooRoNameIdCollectionR.hh" 00010 #include "CdbRooReadonly/CdbRooRoViewR.hh" 00011 00012 /// A persistent implementation the collection of persistent "view". 00013 /** 00014 * In addition to its base class, the current collection brings in 00015 * the concept and extended API for the "newest" element. The "newest" 00016 * element is the view, which has the most recent creation time. 00017 */ 00018 class CdbRooRoViewCollectionR : public CdbRooRoNameIdCollectionR< CdbRooRoViewR > { 00019 00020 public: 00021 00022 /// Default constructor 00023 /** 00024 * Initializes empty collection. 00025 */ 00026 CdbRooRoViewCollectionR( ); 00027 00028 /// Destructor 00029 00030 virtual ~CdbRooRoViewCollectionR( ); 00031 00032 /// Insert an element 00033 /** 00034 * Extend the "::add" method of the base class to perform additional tests 00035 * which are important in the current context. 00036 * 00037 * @see CdbRooRoNameIdCollectionR::add() 00038 */ 00039 virtual CdbStatus add( const CdbRooRoViewR& theRef ); 00040 00041 /// Find the most recent view 00042 /** 00043 * The most recent view is the one having the most recent creation time. 00044 * The method will return CdbStatus::NotFound if the collection is empty. 00045 */ 00046 virtual CdbStatus newest( CdbRooRoViewR& theRef ); 00047 00048 /// Find the most recent view 00049 /** 00050 * Being functionally similar to the previous method this one would initialize 00051 * a counted smart pointer onto the found object. 00052 */ 00053 virtual CdbStatus newest( CdbCPtr< CdbRooRoViewR >& thePtr ); 00054 00055 private: 00056 00057 UShort_t _newestId; 00058 00059 ClassDef(CdbRooRoViewCollectionR,1) 00060 }; 00061 00062 #endif /* CDBROOREADONLY_VIEW_COLLECTION_R_RDL */
1.3-rc3