00001 #ifndef CDBBDBSHARED_VIEW_COLLECTION_P_HH 00002 #define CDBBDBSHARED_VIEW_COLLECTION_P_HH 00003 00004 // File and Version Information: 00005 // $Id: CdbBdbSViewCollectionP.ddl,v 1.6 2004/12/08 09:26:55 gapon Exp $ 00006 00007 00008 #include "CdbBdbShared/CdbBdbSCollectionP.hh" 00009 00010 /// A persistent implementation the collection of persistent "view". 00011 /** 00012 * In addition to its base class, the current collection brings in 00013 * the concept and extended API for the "newest" element. The "newest" 00014 * element is the view, which has the most recent creation time. 00015 */ 00016 class CdbBdbSViewCollectionP : public CdbBdbSCollectionP { 00017 00018 public: 00019 00020 // Bring the type definitions from the base class into the scope 00021 // of the current one 00022 00023 // using CdbBdbSCollectionP::IteratorOfNames; 00024 // using CdbBdbSCollectionP::IteratorOfIdentifiers; 00025 00026 public: 00027 00028 /// Default constructor 00029 /** 00030 * Initializes empty collection. 00031 */ 00032 CdbBdbSViewCollectionP( ); 00033 00034 /// Destructor 00035 00036 virtual ~CdbBdbSViewCollectionP( ); 00037 00038 /// Insert an element 00039 /** 00040 * Override the method of the base class to perform additional tests 00041 * which are important in the current context. 00042 * 00043 * @see CdbBdbSCollectionP::insert() 00044 */ 00045 virtual CdbStatus insert( const BdbRef( CdbBdbSCollectionElementP )& theRef ); 00046 00047 /// Find the most recent view 00048 /** 00049 * The most recent view is the one having the most recent creation time. 00050 * The method will return CdbStatus::NotFound if the collection is empty. 00051 */ 00052 virtual CdbStatus newest( BdbRef( CdbBdbSCollectionElementP )& theRef ); 00053 00054 private: 00055 00056 BdbRef( CdbBdbSCollectionElementP ) _newestRef; 00057 }; 00058 00059 #endif /* CDBBDBSHARED_VIEW_COLLECTION_P_HH */
1.3-rc3