#include <simplevec.h>
Inherits SimpleVecClass< T >.
Public Member Functions | |
| SimpleDynVecClass (int size=0) | |
| virtual | ~SimpleDynVecClass (void) |
| int | Count (void) const |
| T & | operator[] (int index) |
| T const & | operator[] (int index) const |
| virtual bool | Resize (int newsize) |
| bool | Add (T const &object, int new_size_hint=0) |
| T * | Add_Multiple (int number_to_add) |
| bool | Delete (int index, bool allow_shrink=true) |
| bool | Delete (T const &object, bool allow_shrink=true) |
| bool | Delete_Range (int start, int count, bool allow_shrink=true) |
| void | Delete_All (bool allow_shrink=true) |
Public Member Functions inherited from SimpleVecClass< T > | |
| SimpleVecClass (int size=0) | |
| virtual | ~SimpleVecClass (void) |
| T & | operator[] (int index) |
| T const & | operator[] (int index) const |
| int | Length (void) const |
| virtual bool | Uninitialised_Grow (int newsize) |
| void | Zero_Memory (void) |
Protected Member Functions | |
| bool | Grow (int new_size_hint) |
| bool | Shrink (void) |
| int | Find_Index (T const &object) |
Protected Attributes | |
| int | ActiveCount |
Protected Attributes inherited from SimpleVecClass< T > | |
| T * | Vector |
| int | VectorMax |
SimpleDynVecClass This is also a template designed to work with simple data types. It is designed to work just like DynamicVectorClass except that it assumes that the data type used can be legally mem-copied. DON'T USE THIS TEMPLATE IF YOUR CLASS REQUIRES A DESTRUCTOR!!!
The automatic resizing behavior for this class is a little different than DynamicVectorClass. When the vector needs to be resized, it grows by 25% and if it ever shrinks to 75% usage, it resizes downwards. In addition, when adding objects, you can pass in a "next-size-hint" which is the minimum size the vector will need to be once you are done adding your set of objects. This will cause it to resize to at least that size if it needs to resize. Just leave the parameter at its default value for default behavior.
Definition at line 255 of file simplevec.h.
|
inline |
Definition at line 307 of file simplevec.h.
|
inlinevirtual |
Definition at line 326 of file simplevec.h.
|
inline |
Definition at line 371 of file simplevec.h.
|
inline |
Definition at line 404 of file simplevec.h.
|
inline |
Definition at line 263 of file simplevec.h.
|
inline |
Definition at line 438 of file simplevec.h.
|
inline |
Definition at line 479 of file simplevec.h.
|
inline |
Definition at line 547 of file simplevec.h.
|
inline |
Definition at line 506 of file simplevec.h.
|
inlineprotected |
Definition at line 632 of file simplevec.h.
|
inlineprotected |
Definition at line 574 of file simplevec.h.
|
inline |
Definition at line 264 of file simplevec.h.
|
inline |
Definition at line 265 of file simplevec.h.
|
inlinevirtual |
Reimplemented from SimpleVecClass< T >.
Definition at line 348 of file simplevec.h.
|
inlineprotected |
Definition at line 601 of file simplevec.h.
|
protected |
Definition at line 289 of file simplevec.h.