11#include <util/containers/PArrayIterator.h>
12#include <util/containers/ConstPArrayIterator.h>
35 template <
typename Data>
115 template <
typename Data>
125 template <
typename Data>
132 template <
typename Data>
134 {
return capacity_; }
139 template <
typename Data>
146 template <
typename Data>
149 if (ptrs_ && size_ > 0) {
151 iterator.
setEnd(ptrs_ + size_);
160 template <
typename Data>
164 if (ptrs_ && size_ > 0) {
166 iterator.
setEnd(ptrs_ + size_);
175 template <
typename Data>
Forward iterator for a PArray.
void setEnd(Data **ptr)
Set the value of the end pointer.
void setCurrent(Data **ptr)
Set the current pointer value.
void setNull()
Nullify the iterator.
Forward iterator for a PArray.
void setNull()
Nullify the iterator.
void setEnd(Data **ptr)
Set the value of the end pointer.
void setCurrent(Data **ptr)
Set the current pointer value.
An array that only holds pointers to its elements.
virtual ~PArray()
Destructor.
int size() const
Return logical size.
int capacity_
Allocated size of ptrs_ array.
int capacity() const
Return allocated size.
PArray()
Constructor (protected to prevent instantiation).
int size_
Logical size (number of elements with initialized data).
Data & operator[](int i) const
Mimic C array subscripting.
void begin(PArrayIterator< Data > &iterator) const
Set a PArrayIterator to the beginning of this PArray.
Data ** ptrs_
PArray of of pointers to Data objects.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.