#include <nrarray.h>
Collaboration diagram for VM::NonResizeableArray< T, N >:

Public Member Functions | |
| NonResizeableArray () | |
| Construct empty array; use alloc() to allocate the content. | |
| NonResizeableArray (N n) | |
| Construct array of specified size. | |
| NonResizeableArray (const NonResizeableArray &a) | |
| Copy array (content). | |
| ~NonResizeableArray () | |
| Destroy (free) array. | |
| NonResizeableArray & | operator= (const NonResizeableArray &a) |
| Assign array by copying the content. | |
| T & | operator[] (N i) |
| Index array; no range check. | |
| const T & | operator[] (N i) const |
| Index array (const version); no range check. | |
| N | n () const |
| Get number of elements. | |
| T * | ptr () |
| Get the array base pointer. Be careful with that! | |
| const T * | ptr () const |
| Get the array base pointer (const version). Be careful with that! | |
| void | alloc (N n, bool do_clear=1) |
| Explicitly allocate elements. | |
| void | free () |
| Explicitly free array contents. | |
| void | clear () |
| Clear the array, i.e. re-initialize all elements. | |
| void | clear (N i) |
| Clear specified element. | |
| void | SetAll (const T &v) |
Private Member Functions | |
| void | _alloc () |
| void | _free () |
| void | _copy (const NonResizeableArray &a) |
Private Attributes | |
| T * | array |
| N | size |
This class is C++-safe but that should not be used too much as it is inefficient.
Definition at line 47 of file nrarray.h.
|
|||||||||
|
Construct empty array; use alloc() to allocate the content.
|
|
||||||||||
|
Construct array of specified size.
|
|
||||||||||
|
Copy array (content).
|
|
|||||||||
|
Destroy (free) array.
|
|
|||||||||
|
Definition at line 53 of file nrarray.h. Referenced by VM::NonResizeableArray< VTableEntry, uint32 >::alloc(), VM::NonResizeableArray< VTableEntry, uint32 >::NonResizeableArray(), and VM::NonResizeableArray< VTableEntry, uint32 >::operator=(). |
|
||||||||||
|
Definition at line 57 of file nrarray.h. Referenced by VM::NonResizeableArray< VTableEntry, uint32 >::NonResizeableArray(), and VM::NonResizeableArray< VTableEntry, uint32 >::operator=(). |
|
|||||||||
|
||||||||||||||||
|
Explicitly allocate elements. Allocate n elements; in case the current size is not 0, it will NOT resize the array but free the old content and allocate new memory. If do_clear is set, the array is guaranteed to be cleared afterwards (i.e. all elements newly initialized), otherwise this is only the case if the size was actually changed. |
|
||||||||||
|
Clear specified element.
|
|
|||||||||
|
Clear the array, i.e. re-initialize all elements.
Definition at line 112 of file nrarray.h. Referenced by VM::NonResizeableArray< VTableEntry, uint32 >::alloc(). |
|
|||||||||
|
Explicitly free array contents.
|
|
|||||||||
|
Get number of elements.
Definition at line 84 of file nrarray.h. Referenced by VM::VMLinker::_MergeNamespaceInfo_Recursive(). |
|
||||||||||
|
Assign array by copying the content.
|
|
||||||||||
|
Index array (const version); no range check.
|
|
||||||||||
|
Index array; no range check.
|
|
|||||||||
|
Get the array base pointer (const version). Be careful with that!
|
|
|||||||||
|
Get the array base pointer. Be careful with that!
|
|
||||||||||
|
|
|
|||||
|
Definition at line 50 of file nrarray.h. Referenced by VM::NonResizeableArray< VTableEntry, uint32 >::_copy(). |
|
|||||
|
Definition at line 51 of file nrarray.h. Referenced by VM::NonResizeableArray< VTableEntry, uint32 >::operator=(). |
1.3.5