summaryrefslogtreecommitdiff
path: root/common/array.h
diff options
context:
space:
mode:
authorleo2002-04-12 21:30:55 +0000
committerleo2002-04-12 21:30:55 +0000
commitd3b46f0412d25ffd7ab1407b7bc892aa5eea4147 (patch)
tree955588b5610945fbe3f2fad745d7b5bad869a617 /common/array.h
parent1f277ccc64ecc55e6ed284a0f21bbdf932c72b65 (diff)
Added InsertAt and AddSorted functions.
git-svn-id: http://svn.leocad.org/trunk@289 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/array.h')
-rwxr-xr-xcommon/array.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/array.h b/common/array.h
index c8ce59c..1c5d5a3 100755
--- a/common/array.h
+++ b/common/array.h
@@ -8,6 +8,8 @@ class PtrArray
PtrArray (int nSize = 0);
~PtrArray ();
+ typedef int (*LC_PTRARRAY_COMPARE_FUNC) (T* a, T* b, void* data);
+
void SetSize (int nSize);
int GetSize () const
{ return m_nLength; }
@@ -15,6 +17,8 @@ class PtrArray
T* RemoveIndex (int nIndex);
T* RemovePointer (T* pObj);
void Add (T* pObj);
+ void AddSorted (T* pObj, LC_PTRARRAY_COMPARE_FUNC pFunc, void* pData);
+ void InsertAt (int nIndex, T* pObj);
T* operator [](int nIndex) const
{ return m_pData[nIndex]; }