Bridges-C++
3.4.4
Bridges(C++ API)
|
#include <Array1D.h>
A BRIDGES 1D array type.
This class can be used to create 1D arrays of any type.
The class stores an array of E where each entry can be styled.
The access to the values stored are done directly using bracket operators such as
Entries in the array can be styled by showing a label and changing the color of an entry. This is achieved by styling the underlying element to a particular entry of the array such as:
The array support range for loop so you can get to all elements in the array using :
E | the application data type |
Classes | |
class | const_iterator |
enabling iterator loops in const contexts More... | |
class | iterator |
enabling range for loops More... | |
Public Member Functions | |
virtual | ~Array1D () |
Array1D (int sz) | |
builds an array given size More... | |
E & | operator[] (int indx) |
access Array[indx] More... | |
E const & | operator[] (int indx) const |
access Array[indx] More... | |
Element< E > & | getElement (int indx) |
access the element that stores Array[indx] More... | |
Element< E > const & | getElement (int indx) const |
access the element that stores Array[indx] More... | |
void | setElement (int indx, const Element< E > &e) |
change the element that stores Array[indx] More... | |
iterator | begin () |
enables range for loops More... | |
iterator | end () |
enables range for loops More... | |
const_iterator | begin () const |
enables range for loops More... | |
const_iterator | end () const |
enables range for loops More... | |
Public Member Functions inherited from bridges::datastructure::Array< E > | |
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 |
Additional Inherited Members | |
Protected Member Functions inherited from bridges::datastructure::Array< E > | |
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... | |
|
inlinevirtual |
|
inline |
builds an array given size
sz | size of the array |
|
inline |
enables range for loops
|
inline |
enables range for loops
|
inline |
enables range for loops
|
inline |
enables range for loops
|
inline |
access the element that stores Array[indx]
indx | index of the Element<E> to access |
|
inline |
access the element that stores Array[indx]
indx | index of the Element<E> to access |
|
inline |
access Array[indx]
|
inline |
access Array[indx]
|
inline |
change the element that stores Array[indx]
indx | index of the Element<E> to change |
e | element to change it to |