00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _CLIST_H_
00031 #define _CLIST_H_
00032
00033 #include "MdcRecoUtil/AListBase.h"
00034 #include "MdcRecoUtil/AList.h"
00035 #include "MdcRecoUtil/ConstAList.h"
00036
00037 #ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
00038 #define inline
00039 #endif
00040
00041 template <class T>
00042 class HepCList : public HepAListBase {
00043
00044 public:
00045
00046 inline HepCList();
00047
00048
00049 inline HepCList(const HepCList<T> &);
00050
00051
00052 inline HepCList(const HepAList<T> &);
00053 inline HepCList(const HepConstAList<T> &);
00054
00055
00056 inline ~HepCList();
00057
00058
00059 inline void insert(const T &);
00060
00061
00062 inline void insert(const T & e, const T & r);
00063
00064
00065
00066 inline void insert(const T & e, unsigned pos);
00067
00068
00069
00070 inline void append(const T &);
00071 inline void operator += (const T &);
00072
00073
00074 inline void append(const T & e, const T & r);
00075
00076
00077
00078 inline void append(const HepCList<T> &);
00079 inline void operator += (const HepCList<T> &);
00080 inline void append(const HepAList<T> &);
00081 inline void operator += (const HepAList<T> &);
00082 inline void append(const HepConstAList<T> &);
00083 inline void operator += (const HepConstAList<T> &);
00084
00085
00086 inline void remove(const T &);
00087
00088
00089 inline void remove(const HepCList<T> &);
00090 inline void remove(const HepConstAList<T> &);
00091 inline void remove(const HepAList<T> &);
00092
00093
00094
00095 inline void remove(unsigned);
00096
00097
00098 inline void removeAll();
00099
00100
00101 inline void purge();
00102
00103
00104 inline HepBoolean member(const T &) const;
00105 inline HepBoolean hasMember(const T &) const;
00106
00107
00108 inline void replace(const T & eo, const T & en);
00109
00110
00111 inline T * operator[] (unsigned i) const;
00112
00113
00114
00115 inline int index(const T &) const;
00116
00117
00118
00119 inline int fIndex(const T &) const;
00120
00121
00122
00123 inline T * first() const;
00124 inline T * last() const;
00125
00126
00127 inline void operator = (const HepCList<T> &);
00128 inline void operator = (const HepAList<T> &);
00129 inline void operator = (const HepConstAList<T> &);
00130
00131
00132 protected:
00133
00134 inline T * Nth(unsigned i) const;
00135
00136
00137 };
00138
00139 #ifdef HEP_NO_INLINE_IN_TEMPLATE_DECLARATION
00140 #undef inline
00141 #endif
00142
00143 #ifdef HEP_SHORT_NAMES
00144 #define CList HepCList
00145 #endif
00146
00147 #include "MdcRecoUtil/CList.icc"
00148
00149 #endif
00150