#include <mpackarray.h>
Inheritance diagram for PackArray:
Public Methods | |
PackArray (int siz) | |
PackArray (const PackArray &orig) | |
void | make (int siz) |
void | shallowCopy (const PackArray &orig) |
void | destroy () |
void | empty () |
const TYPE & | operator[] (int i) const |
TYPE & | operator[] (int i) |
PackArray< TYPE > & | operator= (const PackArray &other) |
void | resize (int newsize) |
virtual void | check () const |
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 27 of file mpackarray.h.
|
Creates an packed array with the given mSize.
Definition at line 38 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 48 of file mpackarray.h. |
|
Implementation for Object.
Definition at line 184 of file mpackarray.h. |
|
Empties the array.
Definition at line 78 of file mpackarray.h. Referenced by PackArray< NodeLink >::empty(), PackArray< NodeLink >::make(), PackArray< NodeLink >::operator=(), and PackArray< NodeLink >::resize(). |
|
Empties the array. Alias for destroy(). Definition at line 85 of file mpackarray.h. |
|
Creates or recreates the array with the given mSize.
Definition at line 56 of file mpackarray.h. Referenced by histogram(), PackArray< NodeLink >::PackArray(), PackArray< NodeLink >::shallowCopy(), and solveLinear(). |
|
Standard copy operator. Remember to define the operator= for the object class, as the default operator= does only a shallow copy. Definition at line 112 of file mpackarray.h. |
|
Returns reference to i:th item in the array. Non-const version. Definition at line 101 of file mpackarray.h. |
|
Returns reference to i:th item in the array. Const version. Definition at line 92 of file mpackarray.h. |
|
Changes mSize of the array.
Definition at line 139 of file mpackarray.h. |
|
Very quick copy operator.
Definition at line 71 of file mpackarray.h. |