17 #if !defined(ON_ARRAY_INC_) 59 #if defined(ON_HAS_RVALUEREF) 87 ON__UINT32
DataCRC(ON__UINT32 current_remainder)
const;
95 #if defined(ON_RUNTIME_APPLE) 103 #if defined(ON_RUNTIME_APPLE) 108 operator const T*()
const;
112 const T*
First()
const;
116 T*
At(
unsigned int );
119 const T*
At(
int )
const;
120 const T*
At(
unsigned int )
const;
121 const T*
At( ON__INT64 )
const;
122 const T*
At( ON__UINT64 )
const;
125 const T*
Last()
const;
137 void Append(
int,
const T* );
140 void Insert(
int,
const T& );
170 int Search(
const T& )
const;
180 int Search(
const T*,
int (*)(
const T*,
const T*) )
const;
200 int BinarySearch(
const T*,
int (*)(
const T*,
const T*) )
const;
201 int BinarySearch(
const T*,
int (*)(
const T*,
const T*),
int )
const;
206 bool HeapSort(
int (*)(
const T*,
const T*) );
211 bool QuickSort(
int (*)(
const T*,
const T*) );
233 ON::sort_algorithm sort_algorithm,
235 int (*)(
const T*,
const T*)
260 ON::sort_algorithm sort_algorithm,
262 int (*)(
const T*,
const T*,
void*),
279 void MemSet(
unsigned char);
315 const T*
Array()
const;
361 void Move(
int ,
int ,
int );
371 #if defined(ON_DLL_TEMPLATE) 428 #if defined(ON_HAS_RVALUEREF) 437 void EmergencyDestroy(
void);
446 unsigned int UnsignedCount()
const;
448 int Capacity()
const;
450 unsigned int SizeOfArray()
const;
452 unsigned int SizeOfElement()
const;
456 T& operator[](
int );
457 T& operator[](
unsigned int );
458 T& operator[]( ON__INT64 );
459 T& operator[]( ON__UINT64 );
460 #if defined(ON_RUNTIME_APPLE) 461 T& operator[](
size_t );
464 const T& operator[](
int )
const;
465 const T& operator[](
unsigned int )
const;
466 const T& operator[]( ON__INT64 )
const;
467 const T& operator[]( ON__UINT64 )
const;
468 #if defined(ON_RUNTIME_APPLE) 469 const T& operator[](
size_t )
const;
473 operator const T*()
const;
476 const T* First()
const;
480 T* At(
unsigned int );
483 const T* At(
int )
const;
484 const T* At(
unsigned int )
const;
485 const T* At( ON__INT64 )
const;
486 const T* At( ON__UINT64 )
const;
489 const T* Last()
const;
497 void Append(
const T& );
500 void Append(
int,
const T*);
502 void Insert(
int,
const T& );
528 int Search(
const T*,
int (*)(
const T*,
const T*) )
const;
548 int BinarySearch(
const T*,
int (*)(
const T*,
const T*) )
const;
549 int BinarySearch(
const T*,
int (*)(
const T*,
const T*),
int )
const;
556 bool HeapSort(
int (*)(
const T*,
const T*) );
561 bool QuickSort(
int (*)(
const T*,
const T*) );
584 ON::sort_algorithm sort_algorithm,
586 int (*)(
const T*,
const T*)
611 ON::sort_algorithm sort_algorithm,
613 int (*)(
const T*,
const T*,
void*),
620 bool Permute(
const int* );
630 T* Reserve(
size_t );
662 const T* Array()
const;
664 void SetCount(
int );
667 T* SetCapacity(
size_t );
671 int NewCapacity()
const;
705 void SetArray(T*,
int,
int);
709 void Move(
int ,
int ,
int );
710 void ConstructDefaultElement(T*);
711 void DestroyElement(T&);
717 #if defined(ON_DLL_TEMPLATE) 741 #if defined(ON_HAS_RVALUEREF) 749 ON__UINT32 DataCRC(ON__UINT32 current_remainder)
const;
760 bool HeapSort(
int (*)(
const T*,
const T*) );
765 bool QuickSort(
int (*)(
const T*,
const T*) );
796 #if defined(ON_DLL_TEMPLATE) 887 bool AddUuid(
ON_UUID uuid,
bool bCheckForDupicates=
true);
906 bool FindUuid(
ON_UUID uuid)
const;
935 bool bSortBeforeWrite
1023 unsigned int Count()
const;
1032 void Reserve(
size_t capacity );
1054 bool bCheckForDupicates=
true);
1079 bool FindUuid(
ON_UUID uuid)
const;
1080 bool FindUuid(
ON_UUID uuid,
int* index)
const;
1090 bool FindUuidIndex(
ON_UUID uuid,
int index)
const;
1100 unsigned int GetUuids(
1116 void ImproveSearchSpeed();
1119 ON_UuidIndex* SearchHelper(
const ON_UUID*)
const;
1120 unsigned int m_sorted_count = 0;
1121 unsigned int m_removed_count = 0;
1146 unsigned int Count()
const;
1155 void Reserve(
size_t capacity );
1177 bool bCheckForDupicates=
true);
1202 bool FindUuid(
ON_UUID uuid)
const;
1203 bool FindUuid(
ON_UUID uuid, ON__UINT_PTR* ptr)
const;
1213 bool FindUuidPtr(
ON_UUID uuid, ON__UINT_PTR index)
const;
1223 unsigned int GetUuids(
1239 void ImproveSearchSpeed();
1242 ON_UuidPtr* SearchHelper(
const ON_UUID*)
const;
1243 unsigned int m_sorted_count = 0;
1244 unsigned int m_removed_count = 0;
1280 void Reserve(
size_t capacity );
1304 bool bCheckForDupicates=
true 1381 void ImproveSearchSpeed();
1393 unsigned int m_sorted_count;
1394 unsigned int m_removed_count;
1406 void Reserve(
size_t capacity);
1408 const ON_2dex*
Array()
const;
1424 void Create(
int count,
int i0,
int j);
1502 const ON_2dex* Find2dex(
int i)
const;
1533 int ON_CompareIncreasing(
const T* a,
const T* b);
1567 int ON_CompareDecreasing(
const T* a,
const T* b);
1573 #include "opennurbs_array_defs.h" void Empty()
Sets count to 0, leaves capacity untouched.
Definition: opennurbs_array_defs.h:558
int Capacity() const
capacity of array
Definition: opennurbs_array_defs.h:173
virtual ~ON_SimpleArray()
Definition: opennurbs_array_defs.h:90
Definition: opennurbs_array.h:1010
ON_SimpleArray() ON_NOEXCEPT
construction ////////////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:63
T * At(int)
At(index) returns nullptr if index < 0 or index >= count.
Definition: opennurbs_array_defs.h:389
void Zero()
Definition: opennurbs_array_defs.h:777
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
void Move(int, int, int)
implimentation //////////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:451
T * KeepArray()
Definition: opennurbs_array_defs.h:349
T * Last()
Definition: opennurbs_array_defs.h:437
int m_count
0 <= m_count <= m_capacity
Definition: opennurbs_array.h:363
static const ON_UuidPairList EmptyList
Definition: opennurbs_array.h:1265
Definition: opennurbs_array.h:814
void SetArray(T *)
Definition: opennurbs_array_defs.h:359
ON_SimpleArray< T > & operator=(const ON_SimpleArray< T > &)
Definition: opennurbs_array_defs.h:96
Definition: opennurbs_array.h:36
void Swap(int, int)
swap elements i and j
Definition: opennurbs_array_defs.h:582
void Shrink()
remove unused capacity
Definition: opennurbs_array_defs.h:803
T * SetCapacity(size_t)
Definition: opennurbs_array_defs.h:824
int m_capacity
actual length of m_a[]
Definition: opennurbs_array.h:714
Definition: opennurbs_array.h:732
int BinarySearch(const T *, int(*)(const T *, const T *)) const
See Also: ON_CompareIncreasing<T> and ON_CompareDeccreasing<T>
Definition: opennurbs_array_defs.h:613
int Search(const T &) const
Definition: opennurbs_array_defs.h:592
virtual T * Realloc(T *, int)
low level memory managment //////////////////////////////////////////
Definition: opennurbs_array_defs.h:57
T * m_a
pointer to array memory
Definition: opennurbs_array.h:362
void MemSet(unsigned char)
Definition: opennurbs_array_defs.h:785
bool QuickSort(int(*)(const T *, const T *))
See Also: ON_CompareIncreasing<T> and ON_CompareDeccreasing<T>
Definition: opennurbs_array_defs.h:721
Definition: opennurbs_array.h:1133
void Insert(int, const T &)
Definition: opennurbs_array_defs.h:526
int m_capacity
actual length of m_a[]
Definition: opennurbs_array.h:364
bool Permute(const int *)
Definition: opennurbs_array_defs.h:761
unsigned int UnsignedCount() const
Definition: opennurbs_array_defs.h:167
void Append(const T &)
Definition: opennurbs_array_defs.h:482
T * Reserve(size_t)
memory managment ////////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:795
bool Sort(ON::sort_algorithm sort_algorithm, int *, int(*)(const T *, const T *)) const
Definition: opennurbs_array_defs.h:733
int m_count
0 <= m_count <= m_capacity
Definition: opennurbs_array.h:713
ON__UINT32 DataCRC(ON__UINT32 current_remainder) const
Definition: opennurbs_array_defs.h:192
T * m_a
pointer to array memory
Definition: opennurbs_array.h:712
unsigned int SizeOfElement() const
amount of memory in an m_a[] array element
Definition: opennurbs_array_defs.h:185
T & operator[](int)
Definition: opennurbs_array_defs.h:198
void Reverse()
reverse order
Definition: opennurbs_array_defs.h:566
unsigned int SizeOfArray() const
amount of memory in the m_a[] array
Definition: opennurbs_array_defs.h:179
Definition: opennurbs_array.h:412
void SetCount(int)
low level memory managment //////////////////////////////////////////
Definition: opennurbs_array_defs.h:817
< use for generic serialization of binary data
Definition: opennurbs_archive.h:1866
Definition: opennurbs_array.h:1256
T * First()
Definition: opennurbs_array_defs.h:377
void EmergencyDestroy(void)
emergency bailout ///////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:151
int NewCapacity() const
Definition: opennurbs_array_defs.h:866
bool HeapSort(int(*)(const T *, const T *))
Definition: opennurbs_array_defs.h:709
Definition: opennurbs_array.h:1397
Definition: opennurbs_array.h:768
int Count() const
query ///////////////////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:161
T * Array()
The Array() function return the.
Definition: opennurbs_array_defs.h:337
void Remove()
Definition: opennurbs_array_defs.h:542
void Destroy()
onfree any memory and set count and capacity to zero
Definition: opennurbs_array_defs.h:809
T & AppendNew()
array operations ////////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:470