| 4 | extern ErrorHandler ErrHandler; |
| 5 | |
| 6 | template <class T> class Array |
| 7 | { |
| 8 | private: |
| 9 | T *Buffer; |
| 10 | size_t BufSize; |
| 11 | size_t AllocSize; |
| 12 | size_t MaxSize; |
| 13 | bool Secure; // Clean memory if true. |
| 14 | public: |
| 15 | Array(); |
| 16 | Array(size_t Size); |
| 17 | Array(const Array &Src); // Copy constructor. |
| 18 | ~Array(); |
| 19 | inline void CleanData(); |
| 20 | inline T& operator [](size_t Item) const; |
| 21 | inline T* operator + (size_t Pos); |
| 22 | inline size_t Size(); // Returns the size in items, not in bytes. |
| 23 | void Add(size_t Items); |
| 24 | void Alloc(size_t Items); |
| 25 | void Reset(); |
| 26 | void SoftReset(); |
| 27 | void operator = (Array<T> &Src); |
| 28 | void Push(T Item); |
| 29 | void Append(T *Item,size_t Count); |
| 30 | T* Addr(size_t Item) {return Buffer+Item;} |
| 31 | void SetMaxSize(size_t Size) {MaxSize=Size;} |
| 32 | T* Begin() {return Buffer;} |
| 33 | T* End() {return Buffer==NULL ? NULL:Buffer+BufSize;} |
| 34 | void SetSecure() {Secure=true;} |
| 35 | }; |
| 36 | |
| 37 | |
| 38 | template <class T> void Array<T>::CleanData() |
nothing calls this directly
no outgoing calls
no test coverage detected