11#include <util/containers/ArrayIterator.h>
12#include <util/containers/ConstArrayIterator.h>
32 template <
typename Data>
142 template <
typename Data>
151 template <
typename Data>
158 template <
typename Data>
160 {
return capacity_; }
165 template <
typename Data>
169 assert(capacity_ > 0);
171 iterator.
setEnd(data_ + capacity_);
177 template <
typename Data>
181 assert(capacity_ > 0);
183 iterator.
setEnd(data_ + capacity_);
189 template <
typename Data>
194 assert(i < capacity_);
201 template <
typename Data>
206 assert(i < capacity_);
213 template <
typename Data>
220 template <
typename Data>
Forward iterator for an Array or a C array.
void setEnd(Data *ptr)
Set the value of the end pointer.
void setCurrent(Data *ptr)
Set the current pointer value.
Array container class template.
void begin(ConstArrayIterator< Data > &iterator) const
Set a const iterator to begin this Array.
Data * cArray()
Return a pointer to the underlying C array.
Data * data_
Pointer to an array of Data elements.
int capacity() const
Return allocated size.
Data const * cArray() const
Return pointer to const to the underlying C array.
void begin(ArrayIterator< Data > &iterator)
Set an iterator to begin this Array.
Data & operator[](int i)
Get an element by non-const reference.
virtual ~Array()
Destructor.
int capacity_
Allocated size of the data_ array.
Array()
Default constructor.
Forward const iterator for an Array or a C array.
void setEnd(Data *ptr)
Set the value of the end pointer.
void setCurrent(Data *ptr)
Set the current pointer value.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.