Changeset 5390 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- Oct 16, 2005, 2:25:22 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/array.h
r5388 r5390 16 16 /*! 17 17 @file array.h 18 @brief Contains the Array Class that handles arrays of classes.18 @brief Contains the tArray Class that handles arrays of classes. 19 19 this class creates a Array of a semi-Dynamic length. 20 20 beware, that after finalizing the array may not be resized again. … … 27 27 using namespace std; 28 28 29 //! Array Class that handles dynamic-type arrays.30 template<class T> class Array29 //! tArray Class that handles dynamic-type arrays. 30 template<class T> class tArray 31 31 { 32 32 public: 33 Array ();34 ~ Array();33 tArray (); 34 ~tArray(); 35 35 36 36 void finalizeArray (); … … 67 67 */ 68 68 template<class T> 69 Array<T>::Array ()70 { 71 PRINTF(5)("crating new Array\n");69 tArray<T>::tArray () 70 { 71 PRINTF(5)("crating new tArray\n"); 72 72 this->firstEntry = new Entry; 73 73 this->firstEntry->next =NULL; … … 78 78 79 79 template<class T> 80 const T Array<T>::getEntry(unsigned int number) const80 const T tArray<T>::getEntry(unsigned int number) const 81 81 { 82 82 if (this->finalized && number < this->entryCount) … … 89 89 */ 90 90 template<class T> 91 Array<T>::~Array()91 tArray<T>::~tArray() 92 92 { 93 93 PRINTF(5)("deleting array\n"); … … 112 112 */ 113 113 template<class T> 114 void Array<T>::finalizeArray ()114 void tArray<T>::finalizeArray () 115 115 { 116 116 if (this->finalized) … … 142 142 */ 143 143 template<class T> 144 void Array<T>::addEntry (T entry)144 void tArray<T>::addEntry (T entry) 145 145 { 146 146 if (!this->finalized) … … 162 162 */ 163 163 template<class T> 164 void Array<T>::addEntry (T entry0, T entry1, T entry2)164 void tArray<T>::addEntry (T entry0, T entry1, T entry2) 165 165 { 166 166 this->addEntry(entry0); … … 176 176 */ 177 177 template<class T> 178 int Array<T>::getIndex(T* entry) const178 int tArray<T>::getIndex(T* entry) const 179 179 { 180 180 if( unlikely(this->finalized == false)) … … 193 193 */ 194 194 template<class T> 195 void Array<T>::debug () const195 void tArray<T>::debug () const 196 196 { 197 197 PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
Note: See TracChangeset
for help on using the changeset viewer.