#include <globalarray.h>
Public Types | |
typedef GlobalArray< T, ReturnValuePolicy > | Row |
A wrapper class for each row of this array. | |
Public Member Functions | |
template<size_t newCols> | GlobalArray2D (const T newData[][newCols], size_t newRows) |
Constructs a new wrapper object for the given 2-dimensional C++ array. | |
GlobalArray2D (const T newData[], size_t newRows, size_t newCols) | |
Constructs a new 2-dimensional wrapper object for the given 1-dimensional C++ array. | |
GlobalArray2D (const GlobalArray2D< T, ReturnValuePolicy > &cloneMe) | |
Constructs a new wrapper object that wraps the same C++ array as the given wrapper object. | |
~GlobalArray2D () | |
Class destructor. | |
size_t | rows () const |
Return the number of rows in this array. | |
size_t | cols () const |
Return the number of columns in this array. | |
const Row & | getItem (size_t index) const |
Returns the requested row of the array. | |
const Row & | operator[] (size_t index) const |
Returns the requested row of the array. | |
std::ostream & | writeText (std::ostream &out) const |
Writes a string representation of this array, including all of its elements, to the given output stream. | |
Static Public Member Functions | |
void | wrapClass (const char *className) |
Constructs a Boost.Python wrapper for this class. | |
Friends | |
class | GlobalArray3D< T, ReturnValuePolicy > |
An object of this class can be passed through to Python to allow the user access to the underlying C++ array. For the Python user, the usual list operator [] can be used to access the elements of the array. Range checking is performed on any indices that are passed.
The ReturnValuePolicy template argument specifies the return value policy for element lookup.
For each different set of template parameters, the corresponding GlobalArray2D class must be wrapped in Python before the first object of this class is constructed. This wrapping is performed by calling wrapClass().
Note that elements of this array can only be inspected, not modified.
|
A wrapper class for each row of this array.
|
|
Constructs a new wrapper object for the given 2-dimensional C++ array.
|
|
Constructs a new 2-dimensional wrapper object for the given 1-dimensional C++ array.
If the Python array is to have r rows and
|
|
Constructs a new wrapper object that wraps the same C++ array as the given wrapper object. Note that the same underlying C++ array is referenced, i.e., the C++ array itself is not cloned.
|
|
Class destructor. All of the internal row wrappers are destroyed. |
|
Return the number of columns in this array.
|
|
Returns the requested row of the array. If the row index is out of range, a Python error will be thrown.
|
|
Returns the requested row of the array. If the row index is out of range, a Python error will be thrown.
|
|
Return the number of rows in this array.
|
|
Constructs a Boost.Python wrapper for this class. This routine must be called for each set of template parameters before the first object of this class is constructed.
|
|
Writes a string representation of this array, including all of its elements, to the given output stream.
|