#include <UT_Vector2Array.h>
Public Member Functions | |
| UT_Vector2Array (unsigned int sz=0) | |
| UT_Vector2Array (unsigned int sz, unsigned int count) | |
| virtual | ~UT_Vector2Array (void) |
| UT_Vector2Array (const UT_Vector2Array &a) | |
| unsigned int | append (void) |
| unsigned int | append (const UT_Vector2 &t) |
| unsigned int | insert (unsigned int index) |
| unsigned int | insert (const UT_Vector2 &t, unsigned int index) |
| unsigned int | concat (const UT_Vector2Array &a) |
| unsigned int | multipleInsert (unsigned int index, unsigned int count) |
| unsigned int | append (const UT_Vector2 &t, int(*compare)(const UT_Vector2 *t1, const UT_Vector2 *t2)) |
| unsigned int | insert (const UT_Vector2 &t, unsigned int index, int(*compare)(const UT_Vector2 *t1, const UT_Vector2 *t2)) |
| unsigned int | insertAt (const UT_Vector2 &t, unsigned int index) |
| int | remove (const UT_Vector2 &t, int(*compare)(const UT_Vector2 *t1, const UT_Vector2 *t2)) |
| int | shift (unsigned int srcIdx, unsigned int destIdx, unsigned int howMany) |
| void | cycle (int howMany) |
| int | find (const UT_Vector2 &t, unsigned int s=0) const |
| int | find (const UT_Vector2 &t, int(*compare)(const UT_Vector2 *t1, const UT_Vector2 *t2), unsigned int s=0) const |
| int | find (const void *any, int(*compare)(const UT_Vector2 *t1, const UT_Vector2 *t2), unsigned int s=0) const |
| int | index (const UT_Vector2 &t) const |
| int | safeIndex (const UT_Vector2 &t) const |
| void | sort (int(*compare)(const UT_Vector2 *t1, const UT_Vector2 *t2)) |
| void | resize (unsigned int sz, unsigned short copyFlag=1) |
| void | resizeIfNeeded (uint sz, bool copyFlag=true) |
| uint | capacity (void) const |
| int64 | getMemoryUsage () const |
| uint | entries (void) const |
| bool | isEmpty (void) const |
| void | entries (unsigned int ne) |
| UT_Vector2Array & | operator= (const UT_Vector2Array &a) |
| int | operator== (const UT_Vector2Array &a) const |
| int | isEqual (const UT_Vector2Array &a, int(*compare)(const UT_Vector2 *t1, const UT_Vector2 *t2)) const |
| UT_Vector2 & | operator() (unsigned int i) |
| const UT_Vector2 & | operator() (unsigned int i) const |
| UT_Vector2 & | operator[] (unsigned int i) |
| const UT_Vector2 & | operator[] (unsigned int i) const |
| UT_Vector2 & | last () |
| UT_Vector2 | last () const |
| unsigned int | apply (int(*applyFct)(UT_Vector2 &t, void *d), void *d) |
| const UT_Vector2 * | getRawArray (void) const |
| UT_Vector2 * | array (void) |
| int | remove (const UT_Vector2 &t) |
| int | remove (unsigned int aindex) |
Definition at line 29 of file UT_Vector2Array.h.
| UT_Vector2Array::UT_Vector2Array | ( | unsigned int | sz = 0 |
) | [inline, explicit] |
Definition at line 32 of file UT_Vector2Array.h.
| UT_Vector2Array::UT_Vector2Array | ( | unsigned int | sz, | |
| unsigned int | count | |||
| ) |
| virtual UT_Vector2Array::~UT_Vector2Array | ( | void | ) | [virtual] |
| UT_Vector2Array::UT_Vector2Array | ( | const UT_Vector2Array & | a | ) |
| unsigned int UT_Vector2Array::append | ( | const UT_Vector2 & | t, | |
| int(*)(const UT_Vector2 *t1, const UT_Vector2 *t2) | compare | |||
| ) |
| unsigned int UT_Vector2Array::append | ( | const UT_Vector2 & | t | ) |
| unsigned int UT_Vector2Array::append | ( | void | ) | [inline] |
Definition at line 60 of file UT_Vector2Array.h.
| unsigned int UT_Vector2Array::apply | ( | int(*)(UT_Vector2 &t, void *d) | applyFct, | |
| void * | d | |||
| ) |
| UT_Vector2* UT_Vector2Array::array | ( | void | ) | [inline] |
Definition at line 215 of file UT_Vector2Array.h.
| uint UT_Vector2Array::capacity | ( | void | ) | const [inline] |
Definition at line 157 of file UT_Vector2Array.h.
| unsigned int UT_Vector2Array::concat | ( | const UT_Vector2Array & | a | ) |
| void UT_Vector2Array::cycle | ( | int | howMany | ) |
| void UT_Vector2Array::entries | ( | unsigned int | ne | ) | [inline] |
Definition at line 163 of file UT_Vector2Array.h.
| uint UT_Vector2Array::entries | ( | void | ) | const [inline] |
Definition at line 159 of file UT_Vector2Array.h.
| int UT_Vector2Array::find | ( | const void * | any, | |
| int(*)(const UT_Vector2 *t1, const UT_Vector2 *t2) | compare, | |||
| unsigned int | s = 0 | |||
| ) | const |
| int UT_Vector2Array::find | ( | const UT_Vector2 & | t, | |
| int(*)(const UT_Vector2 *t1, const UT_Vector2 *t2) | compare, | |||
| unsigned int | s = 0 | |||
| ) | const |
| int UT_Vector2Array::find | ( | const UT_Vector2 & | t, | |
| unsigned int | s = 0 | |||
| ) | const |
| int64 UT_Vector2Array::getMemoryUsage | ( | void | ) | const [inline] |
Definition at line 158 of file UT_Vector2Array.h.
| const UT_Vector2* UT_Vector2Array::getRawArray | ( | void | ) | const [inline] |
Definition at line 214 of file UT_Vector2Array.h.
| int UT_Vector2Array::index | ( | const UT_Vector2 & | t | ) | const [inline] |
Definition at line 136 of file UT_Vector2Array.h.
| unsigned int UT_Vector2Array::insert | ( | const UT_Vector2 & | t, | |
| unsigned int | index, | |||
| int(*)(const UT_Vector2 *t1, const UT_Vector2 *t2) | compare | |||
| ) |
| unsigned int UT_Vector2Array::insert | ( | const UT_Vector2 & | t, | |
| unsigned int | index | |||
| ) |
| unsigned int UT_Vector2Array::insert | ( | unsigned int | index | ) |
| unsigned int UT_Vector2Array::insertAt | ( | const UT_Vector2 & | t, | |
| unsigned int | index | |||
| ) |
| bool UT_Vector2Array::isEmpty | ( | void | ) | const [inline] |
Definition at line 160 of file UT_Vector2Array.h.
| int UT_Vector2Array::isEqual | ( | const UT_Vector2Array & | a, | |
| int(*)(const UT_Vector2 *t1, const UT_Vector2 *t2) | compare | |||
| ) | const |
| UT_Vector2 UT_Vector2Array::last | ( | ) | const [inline] |
Definition at line 202 of file UT_Vector2Array.h.
| UT_Vector2& UT_Vector2Array::last | ( | ) | [inline] |
Definition at line 197 of file UT_Vector2Array.h.
| unsigned int UT_Vector2Array::multipleInsert | ( | unsigned int | index, | |
| unsigned int | count | |||
| ) |
| const UT_Vector2& UT_Vector2Array::operator() | ( | unsigned int | i | ) | const [inline] |
Definition at line 186 of file UT_Vector2Array.h.
| UT_Vector2& UT_Vector2Array::operator() | ( | unsigned int | i | ) | [inline] |
Definition at line 181 of file UT_Vector2Array.h.
| UT_Vector2Array& UT_Vector2Array::operator= | ( | const UT_Vector2Array & | a | ) |
| int UT_Vector2Array::operator== | ( | const UT_Vector2Array & | a | ) | const |
| const UT_Vector2& UT_Vector2Array::operator[] | ( | unsigned int | i | ) | const [inline] |
Definition at line 192 of file UT_Vector2Array.h.
| UT_Vector2& UT_Vector2Array::operator[] | ( | unsigned int | i | ) |
| int UT_Vector2Array::remove | ( | const UT_Vector2 & | t, | |
| int(*)(const UT_Vector2 *t1, const UT_Vector2 *t2) | compare | |||
| ) |
More remove() methods that search for the object to be removed with a user-defined comparison function. These methods assume the array is sorted. t1 and t2 must be pointers to UT_Vector2. The methods return the last (removed) object index.
| int UT_Vector2Array::remove | ( | unsigned int | aindex | ) | [inline] |
Remove one element from the array given the element itself or its position in the list, and fill the gap by shifting the elements down by one position. Both methods return the index if successful, and (int)-1 if the element is not found. The method that takes an index argument does not return a reference to the object for safety purposes: if UT_Vector2 is an object, then when the array is shrunk the memory previously used by UT_Vector2 will be overwritten by the next element.
Definition at line 95 of file UT_Vector2Array.h.
| int UT_Vector2Array::remove | ( | const UT_Vector2 & | t | ) |
Remove one element from the array given the element itself or its position in the list, and fill the gap by shifting the elements down by one position. Both methods return the index if successful, and (int)-1 if the element is not found. The method that takes an index argument does not return a reference to the object for safety purposes: if UT_Vector2 is an object, then when the array is shrunk the memory previously used by UT_Vector2 will be overwritten by the next element.
| void UT_Vector2Array::resize | ( | unsigned int | sz, | |
| unsigned short | copyFlag = 1 | |||
| ) |
| void UT_Vector2Array::resizeIfNeeded | ( | uint | sz, | |
| bool | copyFlag = true | |||
| ) | [inline] |
Definition at line 149 of file UT_Vector2Array.h.
| int UT_Vector2Array::safeIndex | ( | const UT_Vector2 & | t | ) | const [inline] |
Definition at line 137 of file UT_Vector2Array.h.
| int UT_Vector2Array::shift | ( | unsigned int | srcIdx, | |
| unsigned int | destIdx, | |||
| unsigned int | howMany | |||
| ) |
| void UT_Vector2Array::sort | ( | int(*)(const UT_Vector2 *t1, const UT_Vector2 *t2) | compare | ) |
1.5.9