Tools.h++ Class Reference

Table Of Contents
Public operators
RWTPtrVector<T>&
operator=(const RWTPtrVector<T>& v);
Sets self to a shallow copy of v. Afterwards, the two vectors will have the same length
and pointersheld by the two vectors will point to the same items.
RWTPtrVector<T>&
operator=(T* p);
Sets all elements in self to point to the item *p.
T*&
operator()(size_t i);
T*
operator()(size_t i) const;
Returns the ith value in the vector. The first variant can be used as an l-value, the second
cannot. The index i must be between zero and the length of the vector, less one. No
bounds checking is performed.
T*&
operator[](size_t i);
T*
operator[](size_t i) const;
Returns the ith value in the vector. The first variant can be used as an lvalue, the second
cannot. The index i must be between zero and the length of the vector, less one; or an
exception of type TOOL_INDEX will be thrown.
Public Member Functions
T* const *
data() const;
Returns a pointer to the raw data of the vector. Should be used with care.
size_t
length() const;
Returns the length of the vector.
void
reshape(size_t N);
Changes the length of the vector to N. If this results in the vector being lengthened, then
the initial value of the additional elements is undefined.
void
resize(size_t N);