#include <MultiDimArrayAccess.h>
Collaboration diagram for MultiDimArrayAccess:
Public Methods | |
MultiDimArrayAccess (TYPE *p=((TYPE *) 0), const size_t *sz=((size_t *) 0), const int *st=((int *) 0), bool reverse=false) | |
Constructor for setting all data, with default values. More... | |
MultiDimArrayAccess (TYPE *p, const int *si, const int *sf, bool reverse=false) | |
Constructor for setting all data, with default values. More... | |
MultiDimArrayAccess (TYPE *p, const MultiDimArrayIndexRange< DIM > &r) | |
Constructor for specifying pointer and index range object. More... | |
MultiDimArrayAccess (const MultiDimArrayAccess &r) | |
Copy constructor. More... | |
operator bool () const | |
Conversion into boolean. More... | |
operator TYPE * () const | |
Conversion into pointer. More... | |
void | setPointer (TYPE *p) |
Set the data pointer. More... | |
const MultiDimArrayIndexRange< DIM > & | adjustDim (int d, int first, int final) |
Adjust the dimensions. More... | |
void | reverseDim () |
Reverse the ordering of the dimensions. More... | |
MultiDimArrayAccess (TYPE *p=((TYPE *) 0), const size_t *sz=((size_t *) 0), const int *st=((int *) 0), bool reverse=false) | |
Constructor for setting all data, with default values. More... | |
MultiDimArrayAccess (TYPE *p, const int *si, const int *sf, bool reverse=false) | |
Constructor for setting all data, with default values. More... | |
MultiDimArrayAccess (TYPE *p, const MultiDimArrayIndexRange< DIM > &r) | |
Constructor for specifying pointer and index range object. More... | |
MultiDimArrayAccess (const MultiDimArrayAccess &r) | |
Copy constructor. More... | |
operator bool () const | |
Conversion into boolean. More... | |
operator TYPE * () const | |
Conversion into pointer. More... | |
void | setPointer (TYPE *p) |
Set the data pointer. More... | |
const MultiDimArrayIndexRange< DIM > & | adjustDim (int d, int first, int final) |
Adjust the dimensions. More... | |
void | reverseDim () |
Reverse the ordering of the dimensions. More... | |
Functions for accessing items | |
const MultiDimArrayIndexRange< DIM > & | range () |
int | beg (size_t i) const |
int | end (size_t i) const |
int | size (size_t i) const |
TYPE & | operator() (int i0) const |
Grant general access to item in a 1D array. More... | |
TYPE & | operator() (int i0, int i1) const |
Grant general access to item in a 2D array. More... | |
TYPE & | operator() (int i0, int i1, int i2) const |
Grant general access to item in a 3D array. More... | |
TYPE & | operator() (int i0, int i1, int i2, int i3) const |
Grant general access to item in a 4D array. More... | |
Functions for accessing items | |
const MultiDimArrayIndexRange< DIM > & | range () |
int | beg (size_t i) const |
int | end (size_t i) const |
int | size (size_t i) const |
TYPE & | operator() (int i0) const |
Grant general access to item in a 1D array. More... | |
TYPE & | operator() (int i0, int i1) const |
Grant general access to item in a 2D array. More... | |
TYPE & | operator() (int i0, int i1, int i2) const |
Grant general access to item in a 3D array. More... | |
TYPE & | operator() (int i0, int i1, int i2, int i3) const |
Grant general access to item in a 4D array. More... | |
Private Attributes | |
TYPE * | d_ptr |
Pointer to array. More... | |
MultiDimArrayIndexRange< DIM > | d_range |
Index range object. More... | |
TYPE * | d_ptr |
Pointer to array. More... | |
MultiDimArrayIndexRange< DIM > | d_range |
Index range object. More... |
This class never allocates or deallocates data. It takes pointers to preallocated data and prodes an interface to that data. Member functions are used to give that interface.
This class provides functions for explicit index checking, but it does NO implicit error checking on either the dimensionality of the array or it size. Such should be done through subclassing.
The member functions should all be inlined for better performance.
Definition at line 284 of file MultiDimArrayAccess.h.
|
Constructor for setting all data, with default values.
Any pointers that are NULL are not used. The resulting default settings are:
Definition at line 306 of file MultiDimArrayAccess.h. References d_ptr. |
|
Constructor for setting all data, with default values.
Any pointers that are NULL are not used. The resulting default settings are:
int* arguments, for the initial and final indices. It does not support default arguments until after the indices argument. NOTE: the place of the initial indices is different than it is for the constructor taking sizes instead of final indices.
If
Definition at line 334 of file MultiDimArrayAccess.h. References d_ptr. |
|
Constructor for specifying pointer and index range object.
There is no default argument in this constructor.
Definition at line 348 of file MultiDimArrayAccess.h. References d_ptr. |
|
Copy constructor.
There is no default argument in this constructor.
Definition at line 360 of file MultiDimArrayAccess.h. References d_ptr. |
|
Constructor for setting all data, with default values.
Any pointers that are NULL are not used. The resulting default settings are:
Definition at line 306 of file MultiDimArrayAccess.h. References d_ptr. |
|
Constructor for setting all data, with default values.
Any pointers that are NULL are not used. The resulting default settings are:
int* arguments, for the initial and final indices. It does not support default arguments until after the indices argument. NOTE: the place of the initial indices is different than it is for the constructor taking sizes instead of final indices.
If
Definition at line 334 of file MultiDimArrayAccess.h. References d_ptr. |
|
Constructor for specifying pointer and index range object.
There is no default argument in this constructor.
Definition at line 348 of file MultiDimArrayAccess.h. References d_ptr. |
|
Copy constructor.
There is no default argument in this constructor.
Definition at line 360 of file MultiDimArrayAccess.h. References d_ptr. |
|
Adjust the dimensions.
Definition at line 401 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::adjustDim(). |
|
Adjust the dimensions.
Definition at line 401 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::adjustDim(). |
|
Definition at line 424 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::beg(). |
|
Definition at line 424 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::beg(). |
|
Definition at line 425 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::end(). |
|
Definition at line 425 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::end(). |
|
Conversion into boolean.
Definition at line 371 of file MultiDimArrayAccess.h. References d_ptr. |
|
Conversion into boolean.
Definition at line 371 of file MultiDimArrayAccess.h. References d_ptr. |
|
Conversion into pointer.
Definition at line 380 of file MultiDimArrayAccess.h. References d_ptr. |
|
Conversion into pointer.
Definition at line 380 of file MultiDimArrayAccess.h. References d_ptr. |
|
Grant general access to item in a 4D array.
Definition at line 454 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 3D array.
Definition at line 445 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 2D array.
Definition at line 437 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 1D array.
Definition at line 430 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 4D array.
Definition at line 454 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 3D array.
Definition at line 445 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 2D array.
Definition at line 437 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 1D array.
Definition at line 430 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Definition at line 423 of file MultiDimArrayAccess.h. |
|
Definition at line 423 of file MultiDimArrayAccess.h. |
|
Reverse the ordering of the dimensions.
Definition at line 415 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::reverseDim(). |
|
Reverse the ordering of the dimensions.
Definition at line 415 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::reverseDim(). |
|
Set the data pointer.
Definition at line 390 of file MultiDimArrayAccess.h. References d_ptr. |
|
Set the data pointer.
Definition at line 390 of file MultiDimArrayAccess.h. References d_ptr. |
|
Definition at line 426 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::size(). |
|
Definition at line 426 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::size(). |
|
Pointer to array.
Definition at line 287 of file MultiDimArrayAccess.h. |
|
Pointer to array.
Definition at line 287 of file MultiDimArrayAccess.h. Referenced by MultiDimArrayAccess(), operator bool(), operator TYPE *(), operator()(), and setPointer(). |
|
Index range object.
Definition at line 289 of file MultiDimArrayAccess.h. |
|
Index range object.
Definition at line 289 of file MultiDimArrayAccess.h. |