#include <mpackarray.h>
Inheritance diagram for PackArray::
Public Methods | |
PackArray () | |
PackArray (int siz) | |
PackArray (const PackArray &orig) | |
void | make (int siz) |
~PackArray () | |
void | shallowCopy (const PackArray &orig) |
void | destroy () |
void | empty () |
const TYPE& | operator[] (int i) const |
TYPE& | operator[] (int i) |
TYPE& | operator= (const PackArray &other) |
void | resize (int newsize) |
virtual void | check () const |
Public Attributes | |
TYPE* | data |
int | size |
Especially useful with the primitive types such as int or float. 0-based indexing.
NULL objects are not possible like in Array. Nor is this container as dynamic as Array is.
Definition at line 25 of file mpackarray.h.
|
Creates an packed array with the given size.
Definition at line 39 of file mpackarray.h. |
|
Copy constructor uses operator= to copy the contained items. Remember to define the operator= for the object class, as the default operator= does only a shallow copy. Definition at line 49 of file mpackarray.h. |
|
Implementation for Object.
Reimplemented from Object. Definition at line 181 of file mpackarray.h. |
|
Empties the array.
Definition at line 79 of file mpackarray.h. |
|
Empties the array. Alias for destroy(). Definition at line 86 of file mpackarray.h. |
|
Creates or recreates the array with the given size.
Definition at line 57 of file mpackarray.h. Referenced by PackArray(), and shallowCopy(). |
|
Standard copy operator. Remember to define the operator= for the object class, as the default operator= does only a shallow copy. Definition at line 113 of file mpackarray.h. |
|
Returns reference to i:th item in the array. Non-const version. Definition at line 102 of file mpackarray.h. |
|
Returns reference to i:th item in the array. Const version. Definition at line 93 of file mpackarray.h. |
|
Changes size of the array.
Definition at line 140 of file mpackarray.h. |
|
Very quick copy operator.
Definition at line 72 of file mpackarray.h. |
|
The items as a C-array.
Definition at line 28 of file mpackarray.h. |
|
Length of the array.
Definition at line 31 of file mpackarray.h. |