#include <MultiDimArrayAccess.h>
Collaboration diagram for ConstMultiDimArrayAccess:
Public Methods | |
ConstMultiDimArrayAccess (const 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... | |
ConstMultiDimArrayAccess (const TYPE *p, const int *si, const int *sf, bool reverse=false) | |
Constructor for setting all data, with default values. More... | |
ConstMultiDimArrayAccess (const TYPE *p, const MultiDimArrayIndexRange< DIM > &r) | |
Constructor for specifying pointer and index range object. More... | |
ConstMultiDimArrayAccess (const ConstMultiDimArrayAccess &r) | |
Copy constructor. More... | |
operator bool () const | |
Conversion into boolean. More... | |
operator const TYPE * () const | |
Conversion into pointer. More... | |
ConstMultiDimArrayAccess (const MultiDimArrayAccess< TYPE, DIM > &r) | |
Constructor referencing non-const array. More... | |
void | setPointer (const TYPE *p) |
const MultiDimArrayIndexRange< DIM > & | adjustDim (int d, int first, int final) |
Adjust the dimensions. More... | |
void | reverseDim () |
Reverse the ordering of the dimensions. More... | |
ConstMultiDimArrayAccess (const 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... | |
ConstMultiDimArrayAccess (const TYPE *p, const int *si, const int *sf, bool reverse=false) | |
Constructor for setting all data, with default values. More... | |
ConstMultiDimArrayAccess (const TYPE *p, const MultiDimArrayIndexRange< DIM > &r) | |
Constructor for specifying pointer and index range object. More... | |
ConstMultiDimArrayAccess (const ConstMultiDimArrayAccess &r) | |
Copy constructor. More... | |
operator bool () const | |
Conversion into boolean. More... | |
operator const TYPE * () const | |
Conversion into pointer. More... | |
ConstMultiDimArrayAccess (const MultiDimArrayAccess< TYPE, DIM > &r) | |
Constructor referencing non-const array. More... | |
void | setPointer (const TYPE *p) |
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 |
const TYPE & | operator() (int i0) const |
Grant general access to item in a 1D array. More... | |
const TYPE & | operator() (int i0, int i1) const |
Grant general access to item in a 2D array. More... | |
const TYPE & | operator() (int i0, int i1, int i2) const |
Grant general access to item in a 3D array. More... | |
const 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 |
const TYPE & | operator() (int i0) const |
Grant general access to item in a 1D array. More... | |
const TYPE & | operator() (int i0, int i1) const |
Grant general access to item in a 2D array. More... | |
const TYPE & | operator() (int i0, int i1, int i2) const |
Grant general access to item in a 3D array. More... | |
const TYPE & | operator() (int i0, int i1, int i2, int i3) const |
Grant general access to item in a 4D array. More... | |
Private Attributes | |
const TYPE * | d_ptr |
Pointer to array. More... | |
MultiDimArrayIndexRange< DIM > | d_range |
Index range object. More... | |
const 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 489 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 511 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 539 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 553 of file MultiDimArrayAccess.h. References d_ptr. |
|
Copy constructor.
There is no default argument in this constructor.
Definition at line 565 of file MultiDimArrayAccess.h. References d_ptr. |
|
Constructor referencing non-const array.
Attempt to type-cast the argument to TYPE. If the type-cast fails, then the data pointer is set to NULL.
Definition at line 595 of file MultiDimArrayAccess.h. References beg(), d_ptr, MultiDimArrayIndexRange::setSizeAndStart(), and size(). |
|
Constructor for setting all data, with default values.
Any pointers that are NULL are not used. The resulting default settings are:
Definition at line 511 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 539 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 553 of file MultiDimArrayAccess.h. References d_ptr. |
|
Copy constructor.
There is no default argument in this constructor.
Definition at line 565 of file MultiDimArrayAccess.h. References d_ptr. |
|
Constructor referencing non-const array.
Attempt to type-cast the argument to TYPE. If the type-cast fails, then the data pointer is set to NULL.
Definition at line 595 of file MultiDimArrayAccess.h. References beg(), d_ptr, MultiDimArrayIndexRange::setSizeAndStart(), and size(). |
|
Adjust the dimensions.
Definition at line 625 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::adjustDim(). |
|
Adjust the dimensions.
Definition at line 625 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::adjustDim(). |
|
Definition at line 648 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::beg(). |
|
Definition at line 648 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::beg(). Referenced by ConstMultiDimArrayAccess(). |
|
Definition at line 649 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::end(). |
|
Definition at line 649 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::end(). |
|
Conversion into boolean.
Definition at line 576 of file MultiDimArrayAccess.h. References d_ptr. |
|
Conversion into boolean.
Definition at line 576 of file MultiDimArrayAccess.h. References d_ptr. |
|
Conversion into pointer.
Definition at line 585 of file MultiDimArrayAccess.h. References d_ptr. |
|
Conversion into pointer.
Definition at line 585 of file MultiDimArrayAccess.h. References d_ptr. |
|
Grant general access to item in a 4D array.
Definition at line 678 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 3D array.
Definition at line 669 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 2D array.
Definition at line 661 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 1D array.
Definition at line 654 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 4D array.
Definition at line 678 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 3D array.
Definition at line 669 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 2D array.
Definition at line 661 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Grant general access to item in a 1D array.
Definition at line 654 of file MultiDimArrayAccess.h. References d_ptr, and MultiDimArrayIndexRange::offset(). |
|
Definition at line 647 of file MultiDimArrayAccess.h. |
|
Definition at line 647 of file MultiDimArrayAccess.h. |
|
Reverse the ordering of the dimensions.
Definition at line 639 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::reverseDim(). |
|
Reverse the ordering of the dimensions.
Definition at line 639 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::reverseDim(). |
|
Set the data pointer.
Definition at line 614 of file MultiDimArrayAccess.h. References d_ptr. |
|
Set the data pointer.
Definition at line 614 of file MultiDimArrayAccess.h. References d_ptr. |
|
Definition at line 650 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::size(). |
|
Definition at line 650 of file MultiDimArrayAccess.h. References MultiDimArrayIndexRange::size(). Referenced by ConstMultiDimArrayAccess(). |
|
Pointer to array.
Definition at line 492 of file MultiDimArrayAccess.h. |
|
Pointer to array.
Definition at line 492 of file MultiDimArrayAccess.h. Referenced by ConstMultiDimArrayAccess(), operator bool(), operator const TYPE *(), operator()(), and setPointer(). |
|
Index range object.
Definition at line 494 of file MultiDimArrayAccess.h. |
|
Index range object.
Definition at line 494 of file MultiDimArrayAccess.h. |