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
00029
00030
00031
00032
00033 #if !defined(Pegasus_ArrayInter_h) || defined(PEGASUS_ARRAY_T)
00034 #if !defined(PEGASUS_ARRAY_T)
00035 #define Pegasus_ArrayInter_h
00036 #endif
00037
00038 #include <Pegasus/Common/Linkage.h>
00039
00040 #ifndef PEGASUS_ARRAY_T
00041
00044 template<class PEGASUS_ARRAY_T> class Array
00045 #else
00046 PEGASUS_TEMPLATE_SPECIALIZATION
00047 class PEGASUS_COMMON_LINKAGE Array<PEGASUS_ARRAY_T>
00048 #endif
00049 {
00050 public:
00051
00055 Array();
00056
00062 Array(const Array<PEGASUS_ARRAY_T>& x);
00063
00069 Array(Uint32 size);
00070
00077 Array(Uint32 size, const PEGASUS_ARRAY_T& x);
00078
00085 Array(const PEGASUS_ARRAY_T* items, Uint32 size);
00086
00090 ~Array();
00091
00097 Array<PEGASUS_ARRAY_T>& operator=(const Array<PEGASUS_ARRAY_T>& x);
00098
00103 void clear();
00104
00114 void reserveCapacity(Uint32 capacity);
00115
00124 void grow(Uint32 size, const PEGASUS_ARRAY_T& x);
00125
00132 void swap(Array<PEGASUS_ARRAY_T>& x);
00133
00138 Uint32 size() const;
00139
00144 Uint32 getCapacity() const;
00145
00150 const PEGASUS_ARRAY_T* getData() const;
00151
00157 PEGASUS_ARRAY_T& operator[](Uint32 index);
00158
00165 const PEGASUS_ARRAY_T& operator[](Uint32 index) const;
00166
00172 void append(const PEGASUS_ARRAY_T& x);
00173
00179 void append(const PEGASUS_ARRAY_T* x, Uint32 size);
00180
00186 void appendArray(const Array<PEGASUS_ARRAY_T>& x);
00187
00193 void prepend(const PEGASUS_ARRAY_T& x);
00194
00200 void prepend(const PEGASUS_ARRAY_T* x, Uint32 size);
00201
00208 void insert(Uint32 index, const PEGASUS_ARRAY_T& x);
00209
00218 void insert(Uint32 index, const PEGASUS_ARRAY_T* x, Uint32 size);
00219
00225 void remove(Uint32 index);
00226
00234 void remove(Uint32 index, Uint32 size);
00235
00236 private:
00237
00238 PEGASUS_ARRAY_T* _data() const;
00239
00240 void* _rep;
00241 };
00242
00243 #endif