LibCDS
Vector Struct Reference

The implementation for dynamically growable array. More...

Data Fields

VectorDatapData
 The container private information. More...
 
int32_t(* push_back )(struct _Vector *, Item)
 Push an item to the tail of the vector. More...
 
int32_t(* insert )(struct _Vector *, Item, int32_t)
 Insert an item to the designated index of the vector. More...
 
int32_t(* pop_back )(struct _Vector *)
 Pop an item from the tail of the vector. More...
 
int32_t(* delete )(struct _Vector *, int32_t)
 Delete an item from the designated index of the vector. More...
 
int32_t(* set )(struct _Vector *, Item, int32_t)
 Set an item at the designated index of the vector. More...
 
int32_t(* get )(struct _Vector *, Item *, int32_t)
 Get an item from the designated index of the vector. More...
 
int32_t(* resize )(struct _Vector *, int32_t)
 Change the container capacity. More...
 
int32_t(* size )(struct _Vector *)
 Return the number of stored items. More...
 
int32_t(* capacity )(struct _Vector *)
 Return the container capacity. More...
 
int32_t(* sort )(struct _Vector *, int32_t(*)(const void *, const void *))
 Sort the items via the designated item comparison method. More...
 
int32_t(* iterate )(struct _Vector *, bool, Item *)
 Iterate through the vector till the tail end. More...
 
int32_t(* reverse_iterate )(struct _Vector *, bool, Item *)
 Reversely iterate through the vector till the head end. More...
 
int32_t(* set_destroy )(struct _Vector *, void(*)(Item))
 Set the custom item resource clean method. More...
 

Detailed Description

The implementation for dynamically growable array.

Definition at line 14 of file vector.h.

Field Documentation

VectorData* Vector::pData

The container private information.

Definition at line 16 of file vector.h.

int32_t(* Vector::push_back)(struct _Vector *, Item)

Push an item to the tail of the vector.

See Also
VectorPushBack

Definition at line 20 of file vector.h.

int32_t(* Vector::insert)(struct _Vector *, Item, int32_t)

Insert an item to the designated index of the vector.

See Also
VectorInsert

Definition at line 24 of file vector.h.

int32_t(* Vector::pop_back)(struct _Vector *)

Pop an item from the tail of the vector.

See Also
VectorPopBack

Definition at line 28 of file vector.h.

int32_t(* Vector::delete)(struct _Vector *, int32_t)

Delete an item from the designated index of the vector.

See Also
VectorDelete

Definition at line 32 of file vector.h.

int32_t(* Vector::set)(struct _Vector *, Item, int32_t)

Set an item at the designated index of the vector.

See Also
VectorSet

Definition at line 36 of file vector.h.

int32_t(* Vector::get)(struct _Vector *, Item *, int32_t)

Get an item from the designated index of the vector.

See Also
VectorGet

Definition at line 40 of file vector.h.

int32_t(* Vector::resize)(struct _Vector *, int32_t)

Change the container capacity.

See Also
VectorResize

Definition at line 44 of file vector.h.

int32_t(* Vector::size)(struct _Vector *)

Return the number of stored items.

See Also
VectorSize

Definition at line 48 of file vector.h.

int32_t(* Vector::capacity)(struct _Vector *)

Return the container capacity.

See Also
VectorCapacity

Definition at line 52 of file vector.h.

int32_t(* Vector::sort)(struct _Vector *, int32_t(*)(const void *, const void *))

Sort the items via the designated item comparison method.

See Also
VectorSort

Definition at line 56 of file vector.h.

int32_t(* Vector::iterate)(struct _Vector *, bool, Item *)

Iterate through the vector till the tail end.

See Also
VectorIterate

Definition at line 60 of file vector.h.

int32_t(* Vector::reverse_iterate)(struct _Vector *, bool, Item *)

Reversely iterate through the vector till the head end.

See Also
VectorReverseIterate

Definition at line 64 of file vector.h.

int32_t(* Vector::set_destroy)(struct _Vector *, void(*)(Item))

Set the custom item resource clean method.

See Also
VectorSetDestroy

Definition at line 68 of file vector.h.