153template <
typename Param1,
typename Param2 = AcArrayMemCopyReallocator<Param1> >
250 return(
mpArray.contains(value, start));
253 bool find(
Param1 const &value,
int &index,
int start = 0)
const
280 return(
mpArray.remove(value, start));
291 mpArray.insertAt(index, value);
422 return(
mpArray.logicalLength());
427 return(
mpArray.physicalLength());
433 return(
mpArray.isValid(index));
552 T*
data()
const {
return (
T*)(
this + 1); }
591 bool _may_use_realloc;
595 if (!_may_use_realloc)
603 if (!
pArray->referenced())
607 if (!_may_use_realloc)
610 m_pBuffer =
pArray->buffer();
623 if (!_may_use_realloc) m_pBuffer->
release();
885 r.reallocate(
this, len + numElements);
892 A::move(pData + numElements, pData, len - index);
894 while (numElements--)
896 pData[numElements] = value;
1057 r.reallocate(
this, 1);
1064 r.reallocate(
this, 1);
1071 r.reallocate(
this, 1);
1132 r.reallocate(
this, len + 1);
1190 const T* pData =
data();
1193 if (pData[
i] == value)
1261 if (
find(value,
i, start))
1292 return (
buffer()->m_nRefCounter > 1);
AcImplArray< Param1, Param2 > mpArray
AcArray< Param1, Param2 > & operator=(AcArray< Param1, Param2 > const &array)
Param1 const & operator[](int index) const
Param1 const & at(int index) const
int find(Param1 const &value) const
AcArray< Param1, Param2 > & setGrowLength(int growLength)
AcArray< Param1, Param2 > & removeFirst(void)
int logicalLength(void) const
Param1 const * asArrayPtr(void) const
const Param1 * begin(void) const
AcArray< Param1, Param2 > & removeAt(int index)
bool find(Param1 const &value, int &index, int start=0) const
AcArray(int physicalLength)
bool remove(Param1 const &value, int start=0)
AcArray< Param1, Param2 > & removeLast(void)
AcArray< Param1, Param2 > & removeAll(void)
int physicalLength(void) const
int append(Param1 const &value)
AcArray< Param1, Param2 > & setLogicalLength(int logicalLength)
Param1 * asArrayPtr(void)
int findFrom(Param1 const &value, int start) const
AcArray(int physicalLength, int growLength)
AcArray< Param1, Param2 > & insertAt(int index, Param1 const &value)
bool isValid(int index) const
Param1 const & first(void) const
bool contains(Param1 const &value, int start=0) const
bool operator==(AcArray< Param1, Param2 > const &array) const
AcArray< Param1, Param2 > & swap(int first, int second)
int growLength(void) const
AcArray< Param1, Param2 > & append(AcArray< Param1, Param2 > const &array)
AcArray< Param1, Param2 > & setPhysicalLength(int physicalLength)
Param1 const & last(void) const
AcArray< Param1, Param2 > & setAt(int index, Param1 const &value)
AcArray(AcArray< Param1, Param2 > const &source)
const Param1 * end(void) const
Param1 & operator[](int index)
AcArray< Param1, Param2 > & removeSubArray(int start, int end)
AcArray< Param1, Param2 > & reverse(void)
AcArray< Param1, Param2 > & setAll(Param1 const &value)
static void constructn(T *pDestination, const T *pSource, size_type numObjects)
static void destroy(T *pObject)
static void copy(T *pDestination, const T *pSource, size_type numObjects)
static void construct(T *pObject, const T &value)
static void constructn(T *pDestination, size_type numObjects, const T &value)
static void move(T *pDestination, const T *pSource, size_type numObjects)
static void destroy(T *objects, size_type numObjects)
static void construct(T *pObject)
static void constructn(T *pDestination, size_type numObjects)
static void move(T *pDestination, const T *pSource, size_type numObjects)
static void construct(T *pObject)
static void construct(T *pObject, const T &value)
static void constructn(T *pDestination, const T *pSource, size_type numObjects)
static void destroy(T *pObject)
static void constructn(T *pDestination, size_type numObjects, const T &value)
static void constructn(T *pDestination, size_type numObjects)
static void destroy(T *objects, size_type numObjects)
static void copy(T *pDestination, const T *pSource, size_type numObjects)
void reallocate(AcImplArray *pArray, size_type nNewLen)
reallocator(bool may_use_realloc=false)
size_type capacity() const
bool remove(const T &value, size_type start=0)
T & at(size_type arrayIndex)
static void rise_error(int e)
iterator erase(iterator where)
void copy_before_write(size_type len, bool may_use_realloc=false)
void assertValid(size_type index) const
bool find(const T &value, size_type &findIndex, size_type start=0) const
void push_back(const T &value)
const_iterator end_const()
AcImplArray & operator=(const AcImplArray &source)
AcImplArray(size_type physicalLength, int growLength=8)
AcImplArray & setAt(size_type arrayIndex, const T &value)
const T * asArrayPtr() const
bool isValid(size_type i) const
const T & getAt(size_type arrayIndex) const
const T & operator[](size_type index) const
AcImplArray(const AcImplArray &source)
void copy_buffer(size_type len, bool may_use_realloc=false, bool force_size=false)
const_iterator begin() const
iterator insert(iterator before, size_type numElements, const T &value)
size_type logicalLength() const
void resize(size_type logicalLength, const T &value)
bool contains(const T &value, size_type start=0) const
iterator erase(iterator first, iterator afterLast)
void reserve(size_type reserveLength)
void insert(iterator before, const_iterator first, const_iterator afterLast)
size_type physicalLength() const
AcImplArray & append(const AcImplArray &otherArray)
iterator begin_non_const()
AcImplArray & removeFirst()
AcImplArray & setPhysicalLength(size_type physLength)
const T & at(size_type arrayIndex) const
AcImplArray & removeLast()
AcImplArray & setLogicalLength(size_type logLength)
AcImplArray & setAll(const T &value)
const_iterator begin_const() const
void copy_if_referenced()
void resize(size_type logicalLength)
size_type append(const T &value)
AcImplArray & insertAt(size_type arrayIndex, const T &value)
AcImplArray & setGrowLength(int growLength)
bool operator==(const AcImplArray &array) const
const_iterator end() const
AcImplArray & removeSubArray(size_type startIndex, size_type endIndex)
AcImplArray & removeAt(size_type arrayIndex)
void assign(const_iterator first, const_iterator afterLast)
iterator insert(iterator before, const T &value=T())
AcImplArray & swap(size_type firstIndex, size_type secondIndex)
static Buffer * _default()
static Buffer * allocate(size_type nLength2Allocate, int nGrowBy)
static ARX_API_STATIC AcImplArrayBuffer g_empty_array_buffer