Tools.h++ Class Reference

Table Of Contents
RWTPtrOrderedVector<double> vec;
vec.insert(new double(22.0));
vec.insert(new double(5.3));
vec.insert(new double(-102.5));
vec.insert(new double(15.0));
vec.insert(new double(5.3));
cout << vec.entries() << " entries\n" << endl; // Prints "5"
for (int i=0; i<vec.length(); i++)
cout << *vec[i] << endl;
vec.clearAndDestroy();
return 0;
}
Program output:
5 entries
22
5.3
-102.5
15
5.3
Public Constructors
RWTPtrOrderedVector<T>(size_t capac=RWDEFAULT_CAPACITY);
Creates an empty ordered vector with capacity capac. Should the number of items
exceed this value, the vector will be resized automatically.
RWTPtrOrderedVector<T>(const RWTPtrOrderedVector<T>& c);
Constructs a new ordered vector as a shallow copy of c. After construction, pointers
will be shared between the two collections.
Public Operators
RWTPtrOrderedVector<T>&
operator=(const RWTPtrOrderedVector& c);
Sets self to a shallow copy of c. Afterwards, pointers will be shared between the
two collections.