|
| GlobalArray (const T data[], size_t size) |
| Constructs a new wrapper object for the given C++ array. More...
|
|
| GlobalArray (const GlobalArray< T, rvp > &cloneMe) |
| Constructs a new wrapper object that wraps the same C++ array as the given wrapper object. More...
|
|
size_t | size () const |
| Return the number of elements in this array. More...
|
|
const T & | getItem (size_t index) const |
| Returns the array element at the given index. More...
|
|
std::ostream & | writeText (std::ostream &out) const |
| Writes a string representation of this array, including all of its elements, to the given output stream. More...
|
|
template<typename T, pybind11::return_value_policy rvp = pybind11::return_value_policy::copy>
class regina::python::GlobalArray< T, rvp >
A template class that references a constant one-dimensional C++ array.
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 index that is passed.
The rvp template argument specifies the return value policy for element lookup.
For each different set of template parameters, the corresponding GlobalArray class must be wrapped in Python before the first object of this class is wrapped. This wrapping is performed by calling wrapClass().
Note that elements of this array can only be inspected, not modified.
- Precondition
- The output operator << is defined for type T.