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;
371 #if defined(ON_DLL_TEMPLATE) 428 #if defined(ON_HAS_RVALUEREF) 460 #if defined(ON_RUNTIME_APPLE) 468 #if defined(ON_RUNTIME_APPLE) 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;
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*),
662 const T*
Array()
const;
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
978 ON_SimpleArray<ON_UUID>& uuid_list
991 const ON_SimpleArray<ON_UuidPair>& uuid_remap
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(
1101 ON_SimpleArray<ON_UUID>& uuid_list
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(
1224 ON_SimpleArray<ON_UUID>& uuid_list
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 1366 ON_SimpleArray<ON_UUID>& uuid_list
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()
Definition: opennurbs_array_defs.h:558
int Capacity() const
Definition: opennurbs_array_defs.h:173
virtual ~ON_SimpleArray()
Definition: opennurbs_array_defs.h:90
The ON_UuidList class provides a tool to efficiently maintain a list of uuid-index pairs and determin...
Definition: opennurbs_array.h:984
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:778
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()
Expert user tool to take charge of the memory used by the dyanmic array.
Definition: opennurbs_array_defs.h:349
T * Last()
Definition: opennurbs_array_defs.h:437
int m_count
Definition: opennurbs_array.h:360
The ON_UuidList class provides a tool to efficiently maintain a list of uuids and determine if a uuid...
Definition: opennurbs_array.h:803
void SetArray(T *)
Do not use this version of SetArray(). Use the one that takes a pointer, count and capacity...
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)
Definition: opennurbs_array_defs.h:583
void Shrink()
Definition: opennurbs_array_defs.h:804
T * SetCapacity(size_t)
Definition: opennurbs_array_defs.h:825
ON_Object array is used to store lists of classes that are derived from ON_Object. It differs from ON_ClassArray in that the virtual ON_Object::MemoryRelocate function is called when growing the dynamic array requires changing the location of the memory buffer used to store the elements in the array.
Definition: opennurbs_array.h:725
int BinarySearch(const T *, int(*)(const T *, const T *)) const
Definition: opennurbs_array_defs.h:614
int Search(const T &) const
Definition: opennurbs_array_defs.h:593
virtual T * Realloc(T *, int)
low level memory managment //////////////////////////////////////////
Definition: opennurbs_array_defs.h:57
T * m_a
Definition: opennurbs_array.h:359
void MemSet(unsigned char)
Definition: opennurbs_array_defs.h:786
bool QuickSort(int(*)(const T *, const T *))
Definition: opennurbs_array_defs.h:722
The ON_UuidList class provides a tool to efficiently maintain a list of uuid-pointer pairs and determ...
Definition: opennurbs_array.h:1099
void Insert(int, const T &)
Definition: opennurbs_array_defs.h:526
int m_capacity
Definition: opennurbs_array.h:361
bool Permute(const int *)
Definition: opennurbs_array_defs.h:762
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:796
bool Sort(ON::sort_algorithm sort_algorithm, int *, int(*)(const T *, const T *)) const
Sort() fills in the index[] array so that array[index[i]] <= array[index[i+1]]. The array is not modi...
Definition: opennurbs_array_defs.h:734
ON__UINT32 DataCRC(ON__UINT32 current_remainder) const
Definition: opennurbs_array_defs.h:192
unsigned int SizeOfElement() const
Definition: opennurbs_array_defs.h:185
T & operator[](int)
Definition: opennurbs_array_defs.h:198
void Reverse()
Definition: opennurbs_array_defs.h:566
unsigned int SizeOfArray() const
Definition: opennurbs_array_defs.h:179
Definition: opennurbs_array.h:409
void SetCount(int)
low level memory managment //////////////////////////////////////////
Definition: opennurbs_array_defs.h:818
Definition: opennurbs_archive.h:1783
The ON_UuidPairList class provides a tool to efficiently maintain a list of uuid pairs and determine ...
Definition: opennurbs_array.h:1214
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:867
bool HeapSort(int(*)(const T *, const T *))
Definition: opennurbs_array_defs.h:710
Definition: opennurbs_array.h:1348
Definition: opennurbs_array.h:761
int Count() const
query ///////////////////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:161
T * Array()
Definition: opennurbs_array_defs.h:337
void Remove()
Definition: opennurbs_array_defs.h:542
void Destroy()
Definition: opennurbs_array_defs.h:810
T & AppendNew()
array operations ////////////////////////////////////////////////////
Definition: opennurbs_array_defs.h:470