26 #ifndef OPENF4_DYNAMIC_ARRAY_H
27 #define OPENF4_DYNAMIC_ARRAY_H
44 template <
typename dataType>
64 DynamicArray(
int width,
int maxHeight,
int initialCapacity);
131 dataType *
getNext(dataType * data);
150 template <
typename dataType>
151 std::ostream & operator<<(std::ostream & stream, DynamicArray<dataType>
const & dynamicArray);
156 #include "../src/dynamic-array.inl"
159 #endif // OPENF4_DYNAMIC_ARRAY_H
Wrapper for config.h in order to avoid multiple definitions.
Represent a dynamic array whose the width is fixed, the memory is allocated by blocs.
int getMaxHeight()
Get the maximum height of the dynamic array.
void printDynamicArray(std::ostream &stream=std::cout) const
Print the dynamic array.
int getWidth()
Get the width of the dynamic array.
~DynamicArray()
Destructor.
void reset()
Reset the dynamic array, do not free the memory.
dataType & operator[](int index)
Overload the operator [].
int getCurrentHeight()
Get the current height of the dynamic array.
DynamicArray(int width, int maxHeight)
Constructor.
dataType * getNext(dataType *data)
Get an iterator to next data after data.
dataType * getBegin()
Get an iterator to the beginning of the array.