00001 #ifndef DATAUTILITIES_DYBARCHIVELIST_H 00002 #define DATAUTILITIES_DYBARCHIVELIST_H 00003 00004 00005 // Include files 00006 #include "GaudiKernel/Kernel.h" 00007 #include "GaudiKernel/ClassID.h" 00008 #include "GaudiKernel/StreamBuffer.h" 00009 #include "GaudiKernel/DataObject.h" 00010 00011 #include "Event/TemporalDataObject.h" 00012 00013 #include <list> 00014 #include <iomanip> 00015 00016 using namespace DayaBay; 00017 00018 class DybArchiveList : public DataObject { 00019 00020 public: 00021 typedef TemporalDataObject contained_type; 00022 typedef std::list<DataObject*>::value_type value_type; 00023 00024 typedef std::list<DataObject*>::reference reference; 00025 typedef std::list<DataObject*>::const_reference const_reference; 00026 00027 typedef std::list<DataObject*>::size_type size_type; 00028 00029 typedef std::list<DataObject*>::iterator iterator; 00030 typedef std::list<DataObject*>::const_iterator const_iterator; 00031 00032 typedef std::list<DataObject*>::reverse_iterator reverse_iterator; 00033 typedef std::list<DataObject*>::const_reverse_iterator const_reverse_iterator; 00034 00035 #ifdef _WIN32 00036 typedef std::vector<TemporalDataObject*>::_Tptr pointer; 00037 typedef std::vector<TemporalDataObject*>::_Ctptr const_pointer; 00038 #else 00039 typedef std::vector<TemporalDataObject*>::pointer pointer; 00040 typedef std::vector<TemporalDataObject*>::const_pointer const_pointer; 00041 #endif 00042 00043 public: 00045 DybArchiveList(); 00046 00048 DybArchiveList( const DybArchiveList& value ); 00049 00051 virtual ~DybArchiveList(); 00052 00054 virtual const CLID& clID() const; 00055 00056 static const CLID& classID(); 00057 00059 /* This does not appear to be used so have not fixed it!o 00060 const DybArchiveList& operator = (const DybArchiveList &right); 00061 */ 00062 00064 DybArchiveList::iterator begin (); 00065 00067 DybArchiveList::const_iterator begin () const; 00068 00070 DybArchiveList::iterator end (); 00071 00073 DybArchiveList::const_iterator end () const; 00074 00077 DybArchiveList::reverse_iterator rbegin (); 00078 00080 DybArchiveList::const_reverse_iterator rbegin () const; 00081 00083 DybArchiveList::reverse_iterator rend (); 00084 00086 DybArchiveList::const_reverse_iterator rend () const; 00087 00091 DybArchiveList::size_type size () const ; 00092 00094 virtual long numberOfObjects() const ; 00095 00097 DybArchiveList::size_type max_size () const ; 00098 00100 bool empty () const ; 00101 00103 DybArchiveList::reference front () ; 00104 00106 DybArchiveList::const_reference front () const ; 00107 00109 DybArchiveList::reference back () ; 00110 00112 DybArchiveList::const_reference back () const ; 00113 00115 void push_back( DybArchiveList::const_reference value ) ; 00116 00118 void push_front( DybArchiveList::const_reference value ) ; 00119 00122 void pop_back () ; 00123 00125 DybArchiveList::iterator insert( DybArchiveList::iterator position, 00126 DybArchiveList::const_reference value ) ; 00127 00130 DybArchiveList::iterator erase( DybArchiveList::iterator position ) ; 00131 00134 DybArchiveList::iterator erase( DybArchiveList::iterator first, 00135 DybArchiveList::iterator last ) ; 00136 00139 void clear(); 00140 00144 virtual long index( const DataObject* obj ) const; 00145 00149 virtual long index( const TemporalDataObject* obj ) const; 00150 00152 virtual DataObject* dataObject( long dist ) const; 00153 00155 virtual TemporalDataObject* temporalDataObject( long dist ) const; 00156 00158 virtual std::ostream& fillStream( std::ostream& s ) const; 00159 00160 private: 00161 00163 std::list<DataObject*> m_list; 00164 }; 00165 00166 00167 #endif // DATAUTILTITIES_DYBARCHIVELIST_H