#include <mi32/doublear.h>
Inheritance diagram for DOUBLE_ARRAY< _CT >:

Public Member Functions | |
| ERRVALUE | Append (const _CT &item) |
| ERRVALUE | Assign (const _CT *items, int numitems) |
| void | Attach (MIDOUBLEARRAY &items, int numitems) |
| void | Clear () |
| void | ClearItems (int start=0, int end=-1) |
| ERRVALUE | Copy (const DOUBLE_ARRAY< _CT > &rhs) |
| void | DeleteItem (int index) |
| void | Detach (MIDOUBLEARRAY &items) |
| DOUBLE_ARRAY (const DOUBLE_ARRAY< _CT > &rhs) | |
| DOUBLE_ARRAY () | |
| void | Free () |
| void | GetItems (_CT *items, int numitems, int firstitem=0) const |
| int | GetMaxItems () const |
| int | GetNumItems () const |
| int | GetSizeInBytes () const |
| bool | IsEmpty () const |
| operator _CT * () | |
| operator const _CT * () const | |
| bool | operator!= (const DOUBLE_ARRAY< _CT > &rhs) const |
| DOUBLE_ARRAY< _CT > & | operator= (const DOUBLE_ARRAY< _CT > &rhs) |
| bool | operator== (const DOUBLE_ARRAY< _CT > &rhs) const |
| _CT & | operator[] (int index) |
| const _CT & | operator[] (int index) const |
| void | RemoveItem (INT32 item) |
| ERRVALUE | Reserve (int newmaxitems, bool clear=false, bool addinc=false) |
| void | ReserveExc (int newmaxitems, bool clear=false, bool addinc=false) |
| ERRVALUE | Resize (int numitems, bool keepold=true, bool clear=false) |
| void | ResizeExc (int numitems, bool keepold=true, bool clear=false) |
| void | Reverse () |
| ERRVALUE | SetItems (int firstitem, const _CT *items, int numitems) |
| void | Swap (DOUBLE_ARRAY< _CT > &rhs) |
| void | SwapBytes () |
| void | TransferOwnerFrom (DOUBLE_ARRAY< _CT > &rhs) |
| template<class _T2> void | TransferOwnerFromExt (DOUBLE_ARRAY< _T2 > &rhs) |
| ~DOUBLE_ARRAY () | |
This template is designed to contain an array of items which can be allocated using MmAlloc/MmRealloc. The primary purpose of this template is to replace allocated arrays where direct access to both array elements and the ability to access a pointer to the first element (as for a C array) is required.
For maximum efficiency, only minimal validation of access to array elements is performed. No initialization of array items is performed by the template.
This class is also designed to handle the 4 byte off alignment issue in regards to systems that have a 4 byte allocation granularity.
Best if used as DOUBLE_ARRAY<double>, DOUBLE_ARRAY<DPOINT2D>, DOUBLE_ARRAY<DPOINT3D>, DOUBLE_ARRAY<DRECT2D>, and DOUBLE_ARRAY<DRECT3D>
Definition at line 150 of file doublear.h.
|
|||||||||
|
Default constructor.
Definition at line 155 of file doublear.h. |
|
||||||||||
|
Copy constructor.
Definition at line 163 of file doublear.h. |
|
|||||||||
|
Definition at line 173 of file doublear.h. |
|
||||||||||
|
Append item to end of array, extending if necessary.
Definition at line 259 of file doublear.h. |
|
||||||||||||||||
|
Assign from C array, reserving space if needed. Resizes the array to the specified number of items.
Definition at line 273 of file doublear.h. |
|
||||||||||||||||
|
Attach a buffer to the DOUBLE_ARRAY. After passing a buffer to Attach(), the DOUBLE_ARRAY "<b>owns</b>" the buffer and will free it in its destructor.
Definition at line 294 of file doublear.h. |
|
|||||||||
|
Clear the array, does not free resources.
Definition at line 305 of file doublear.h. |
|
||||||||||||||||
|
Clear items in the array.
Definition at line 309 of file doublear.h. |
|
||||||||||
|
Copy the contents of another DOUBLE_ARRAY. Same as assignment, but returns an error code instead of throwing an exception. Definition at line 320 of file doublear.h. |
|
||||||||||
|
Delete item in the array. Use with care as this is not efficient for large arrays. Definition at line 331 of file doublear.h. |
|
||||||||||
|
Detach the buffer from the DOUBLE_ARRAY. This turns ownership of the buffer over to the caller, who is then responsibile for seeing that it gets disposed of. After calling Detach(), the DOUBLE_ARRAY will behave as if it had just been constructed. In other words, it will be a NULL pointer pointing to 0 items. This means that if you want to know how many items are in the array returned, you'd better find out before} you call Detach()! Definition at line 352 of file doublear.h. |
|
|||||||||
|
Free the array.
Definition at line 364 of file doublear.h. |
|
||||||||||||||||||||
|
Get items from array.
Definition at line 373 of file doublear.h. |
|
|||||||||
|
Get maximum number of items in array.
Definition at line 383 of file doublear.h. |
|
|||||||||
|
Get number of items in array.
Definition at line 389 of file doublear.h. |
|
|||||||||
|
Get size of array required to hold current number of items in bytes.
Definition at line 393 of file doublear.h. |
|
|||||||||
|
Determine if array is empty.
Definition at line 397 of file doublear.h. |
|
|||||||||
|
Cast to array of template type.
Definition at line 211 of file doublear.h. |
|
|||||||||
|
Cast to const array of template type.
Definition at line 205 of file doublear.h. |
|
||||||||||
|
Inequality operator.
Definition at line 198 of file doublear.h. |
|
||||||||||
|
Assignment.
Definition at line 177 of file doublear.h. |
|
||||||||||
|
Equality operator.
Definition at line 189 of file doublear.h. |
|
||||||||||
|
GENERATING_DOXYGEN_OUTPUT.
Definition at line 228 of file doublear.h. |
|
||||||||||
|
Read (const) access to array element.
Definition at line 219 of file doublear.h. |
|
||||||||||
|
Remove item at specified index, maintaining order. Note that this is inefficient for large arrays. Definition at line 402 of file doublear.h. |
|
||||||||||||||||||||
|
Reserve space in array for up to specified number of items.
Definition at line 413 of file doublear.h. |
|
||||||||||||||||||||
|
Reserve space in array for up to specified number of items, throw exception on failure.
Definition at line 428 of file doublear.h. |
|
||||||||||||||||||||
|
Resize array to specified number of items. If the new size is larger than the previous size and the array is not cleared the new array entries will have indeterminant values.
Definition at line 444 of file doublear.h. |
|
||||||||||||||||||||
|
Resize array to specified number of items, throw exception on failure. If the new size is larger than the previous size and the array is not cleared the new array entries will have indeterminant values.
Definition at line 459 of file doublear.h. |
|
|||||||||
|
Reverse order of items in array.
Definition at line 471 of file doublear.h. |
|
||||||||||||||||||||
|
Set array items from C array, expanding if needed. Will not reduce the number of items in the array.
Definition at line 483 of file doublear.h. |
|
||||||||||
|
Swap two DOUBLE_ARRAYs.
Definition at line 496 of file doublear.h. |
|
|||||||||
|
Swap bytes in a DOUBLE_ARRAY, assume that there is an overload to swap a _CT.
Definition at line 510 of file doublear.h. |
|
||||||||||
|
Transfer data ownership from 'rhs' to 'this'.
Definition at line 514 of file doublear.h. |
|
||||||||||||||
|
Transfer data ownership from 'rhs' to 'this'.
Definition at line 525 of file doublear.h. |
1.3.8-20040913