6 #ifndef __ATLSIMPCOLL_H__ 7 #define __ATLSIMPCOLL_H__ 37 template <
typename T,
typename TEqual = CSimpleArrayEqualHelper<T> >
65 T *pNewData = (
T *)
realloc(static_cast<void *>(
m_pData), nNewCapacity *
sizeof(
T));
84 for (
int nIndex = 0; nIndex <
m_nCount; ++nIndex)
120 for (
int nIndex = 0; nIndex < nCount; ++nIndex)
135 if (nIndex < 0 ||
m_nCount <= nIndex)
142 const int nRightCount =
m_nCount - (nIndex + 1);
143 const int nRightSize = nRightCount *
sizeof(
T);
155 if (nIndex < 0 ||
m_nCount <= nIndex)
185 int nNewCount =
src.GetSize();
189 if (pNewData ==
NULL)
199 for (
int nIndex = 0; nIndex <
m_nCount; ++nIndex)
206 for (
int nIndex = 0; nIndex <
src.GetSize(); ++nIndex)
251 static void operator delete(
void *
p,
void* )
260 template <
typename TKey,
typename TVal>
276 template <
typename TKey,
typename TVal>
293 template <
typename TKey,
typename TVal,
294 typename TEqual = CSimpleMapEqualHelper<TKey, TVal> >
318 for (
int nIndex = 0; nIndex < nCount; ++nIndex)
331 for (
int nIndex = 0; nIndex < nCount; ++nIndex)
391 return m_Pairs.RemoveAt(nIndex);
415 if (nIndex < 0 ||
GetSize() <= nIndex)
#define memmove(s1, s2, n)
const T * GetData() const
BOOL SetAtIndex(int nIndex, const TKey &key, const TVal &val)
ConstructImpl(const T &obj)
BOOL SetAt(const TKey &key, const TVal &val)
T & operator[](int nIndex)
int FindVal(const TVal &val) const
CSimpleArray< T, TEqual > & operator=(const CSimpleArray< T, TEqual > &src)
static bool IsEqualValue(const TVal &v1, const TVal &v2)
const TKey & GetKeyAt(int nIndex) const
BOOL Remove(const TKey &key)
static bool IsEqualKey(const TKey &k1, const TKey &k2)
Pair(const TKey &k, const TVal &v)
static bool IsEqualKey(const TKey &k1, const TKey &k2)
TKey ReverseLookup(const TVal &val) const
TVal Lookup(const TKey &key) const
CSimpleArray(const CSimpleArray< T, TEqual > &src)
BOOL Add(const TKey &key, const TVal &val)
TKey & GetKeyAt(int nIndex)
Pair & operator=(const Pair &pair)
GLfloat GLfloat GLfloat v2
const T & operator[](int nIndex) const
static bool IsEqual(const T &, const T &)
void DestructItem(int nIndex)
CSimpleArray< Pair, CSimpleArrayEqualHelperFalse< Pair > > m_Pairs
const TVal & GetValueAt(int nIndex) const
BOOL SetAtIndex(int nIndex, const T &t)
TVal & GetValueAt(int nIndex)
static bool IsEqualValue(const TVal &v1, const TVal &v2)
int FindKey(const TKey &key) const
BOOL RemoveAt(int nIndex)
BOOL RemoveAt(int nIndex)
void ConstructItemInPlace(int nIndex, const T &src)
static bool IsEqual(const T &t1, const T &t2)
int Find(const T &t) const