Rhino C++ API  8.7
Public Member Functions | List of all members
ON_ObjectArray< T > Class Template Reference

#include <opennurbs_array.h>

Inheritance diagram for ON_ObjectArray< T >:
ON_ClassArray< T >

Public Member Functions

 ON_ObjectArray ()
 Class ON_ObjectArray<> More...
 
 ON_ObjectArray (const ON_ObjectArray< T > &)
 
 ON_ObjectArray (size_t)
 size_t parameter = initial capacity More...
 
 ~ON_ObjectArray ()
 override for struct member deallocation, etc. More...
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
bool HeapSort (int(*)(const T *, const T *))
 
ON_ObjectArray< T > & operator= (const ON_ObjectArray< T > &)
 
bool QuickSort (int(*)(const T *, const T *))
 
T * Realloc (T *, int)
 
- Public Member Functions inherited from ON_ClassArray< T >
 ON_ClassArray () ON_NOEXCEPT
 construction //////////////////////////////////////////////////////// More...
 
 ON_ClassArray (const ON_ClassArray< T > &)
 Copy constructor. More...
 
 ON_ClassArray (size_t)
 size_t parameter = initial capacity More...
 
virtual ~ON_ClassArray ()
 override for struct member deallocation, etc. More...
 
void Append (const T &)
 
void Append (int, const T *)
 Append copy of an array T[count]. More...
 
T & AppendNew ()
 array operations //////////////////////////////////////////////////// More...
 
T * Array ()
 The Array() function return the. More...
 
const T * Array () const
 m_a pointer value. More...
 
T * At (int)
 At(index) returns nullptr if index < 0 or index >= count. More...
 
const T * At (int) const
 
T * At (ON__INT64)
 
const T * At (ON__INT64) const
 
T * At (ON__UINT64)
 
const T * At (ON__UINT64) const
 
T * At (unsigned int)
 
const T * At (unsigned int) const
 
int BinarySearch (const T *, int(*)(const T *, const T *)) const
 See Also: ON_CompareIncreasing<T> and ON_CompareDeccreasing<T> More...
 
int BinarySearch (const T *, int(*)(const T *, const T *), int) const
 
int Capacity () const
 capacity of array More...
 
int Count () const
 query /////////////////////////////////////////////////////////////// More...
 
void Destroy ()
 onfree any memory and set count and capacity to zero More...
 
void EmergencyDestroy (void)
 emergency bailout /////////////////////////////////////////////////// More...
 
void Empty ()
 Sets count to 0, leaves capacity untouched. More...
 
T * First ()
 
const T * First () const
 returns nullptr if count = 0 More...
 
void Insert (int, const T &)
 Insert called with a reference uses operator =. More...
 
int InsertInSortedList (const T &, int(*)(const T *, const T *))
 
int InsertInSortedList (const T &, int(*)(const T *, const T *), int)
 
T * KeepArray ()
 
T * Last ()
 
const T * Last () const
 returns nullptr if count = 0 More...
 
int NewCapacity () const
 
 operator const T * () const
 
 operator T* ()
 The cast operators return a pointer. More...
 
ON_ClassArray< T > & operator= (const ON_ClassArray< T > &)
 Assignment operator. More...
 
T & operator[] (int)
 
const T & operator[] (int) const
 
T & operator[] (ON__INT64)
 
const T & operator[] (ON__INT64) const
 
T & operator[] (ON__UINT64)
 
const T & operator[] (ON__UINT64) const
 
T & operator[] (unsigned int)
 
const T & operator[] (unsigned int) const
 
bool Permute (const int *)
 
void Remove ()
 
void Remove (int)
 
T * Reserve (size_t)
 memory management ///////////////////////////////////////////////// More...
 
void Reverse ()
 reverse order More...
 
int Search (const T *, int(*)(const T *, const T *)) const
 
void SetArray (T *)
 
void SetArray (T *, int, int)
 
T * SetCapacity (size_t)
 
void SetCount (int)
 low level memory management ////////////////////////////////////////// More...
 
void Shrink ()
 remove unused capacity More...
 
unsigned int SizeOfArray () const
 amount of memory in the m_a[] array More...
 
unsigned int SizeOfElement () const
 amount of memory in an m_a[] array element More...
 
bool Sort (ON::sort_algorithm sort_algorithm, int *, int(*)(const T *, const T *)) const
 
bool Sort (ON::sort_algorithm sort_algorithm, int *, int(*)(const T *, const T *, void *), void *) const
 
void Swap (int, int)
 swap elements i and j More...
 
unsigned int UnsignedCount () const
 
void Zero ()
 

Additional Inherited Members

- Protected Member Functions inherited from ON_ClassArray< T >
void ConstructDefaultElement (T *)
 
void DestroyElement (T &)
 
void Move (int, int, int)
 implementation ////////////////////////////////////////////////////// More...
 
- Protected Attributes inherited from ON_ClassArray< T >
T * m_a
 pointer to array memory More...
 
int m_capacity
 actual length of m_a[] More...
 
int m_count
 0 <= m_count <= m_capacity More...
 

Detailed Description

template<class T>
class ON_ObjectArray< T >

Description: 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.