|
Public Member Functions |
|
int | count () const |
| | Returns the number of elements actually stored in the vector.
|
|
bool | isempty () const |
| | Returns true if the vector is empty.
|
|
int | capacity () const |
| | The number of elements that could be stored without resizing.
|
| void | setcapacity (int newslots) |
| | Adjusts the capacity of the vector.
|
|
void | compact () |
| | Compacts the vector to minimize its footprint.
|
Protected Member Functions |
|
| WvVectorBase (bool _auto_free) |
| | Creates an empty vector.
|
|
int | growcapacity (int minslots) |
| | Computes the number of slots needed to grow to at least minslots.
|
|
int | shrinkcapacity (int maxslots) |
| | Computes the number of slots needed to shrink down to maxslots.
|
|
void | moveelems (void *dst, void *src, int nelems) |
| | A shorthand for memmove() with size adjustment.
|
|
void | remove (int slot) |
| | Removes the element at the specified slot.
|
|
void | insert (int slot, void *elem) |
| | Inserts an element at the specified slot.
|
|
void | append (void *elem) |
| | Appends an element onto the tail of the vector.
|
Protected Attributes |
| void ** | xseq |
| int | xcount |
| int | xslots |
| bool | auto_free |
Static Protected Attributes |
| static const int | MINALLOC = 4 |