Bridges-C++
3.4.4
Bridges(C++ API)
|
#include <Array.h>
The foundation of BRIDGES array types. It is not meant to be used directly by students.
This class can be used to create 1D, 2D, and 3D arrays of any type.
E | the application data type |
Public Member Functions | |
virtual const string | getDStype () const override |
virtual const string | getDataStructureRepresentation () const override final |
Array (const Array &)=delete | |
Array & | operator= (const Array &)=delete |
Public Member Functions inherited from bridges::datastructure::DataStructure | |
virtual | ~DataStructure ()=default |
Protected Member Functions | |
Array () | |
virtual | ~Array () |
Array (int sz) | |
builds an array given the size More... | |
void | setSize (int nd, int *dim) |
Set the size of the array. More... | |
void | getDimensions (int *dim) |
Get the dimensions of the array. More... | |
int const * | getDimensions () const |
Element< E > & | getElement (int index) |
Element< E > const & | getElement (int index) const |
Get the object at index index - 1D array. More... | |
void | setElement (int ind, Element< E > el) |
Set the Element at index ind - 1D array. More... | |
Friends | |
class | Element< E > |
|
inlineprotected |
|
inlineprotectedvirtual |
|
inlineprotected |
builds an array given the size
sz | size of array |
|
delete |
|
inlinefinaloverridevirtual |
Ease of use function for the deletion of an entire datastructure. Overrides should call delete on itself and each linked data structure
Implements bridges::datastructure::DataStructure.
|
inlineprotected |
|
inlineprotected |
Get the dimensions of the array.
[out] | dim | an array to return the dimensions |
|
inlineoverridevirtual |
Get the data structure type
Implements bridges::datastructure::DataStructure.
|
inlineprotected |
Get the object at index index - 1D array
index | index into the array |
|
inlineprotected |
Get the object at index index - 1D array.
index | - index into the array |
|
delete |
|
inlineprotected |
|
inlineprotected |
Set the size of the array.
[in] | nd | number of dimension |
[in] | dim | the size of the dimensions |
|
friend |