UA ANSI C Server Professional
1.4.0.285
|
Data Structures | |
struct | _UaServer_Vector |
Vector structure. More... | |
Functions | |
void | UaServer_Vector_Initialize (UaServer_Vector *pV, unsigned int size, unsigned int grow) |
Initializes the vector structure. More... | |
void | UaServer_Vector_Clear (UaServer_Vector *pV) |
Clears the vector structure. More... | |
unsigned int | UaServer_Vector_Add (UaServer_Vector *pV, void *pData) |
Adds an element to the vector. More... | |
void | UaServer_Vector_RemoveAt (UaServer_Vector *pV, unsigned int index) |
Removes an element from the vector at the given index. More... | |
void | UaServer_Vector_Set (UaServer_Vector *pV, unsigned int index, void *pData) |
Sets an element at the given index. More... | |
void * | UaServer_Vector_Get (UaServer_Vector *pV, unsigned int index) |
Returns the value at the given index. More... | |
unsigned int | UaServer_Vector_GetSize (UaServer_Vector *pV) |
Returns the current size of the vector. More... | |
void | UaServer_Vector_Resize (UaServer_Vector *pV, unsigned int size) |
Resize the vector. More... | |
unsigned int UaServer_Vector_Add | ( | UaServer_Vector * | pV, |
void * | pData | ||
) |
Adds an element to the vector.
This method can let the vector grow.
pV | Pointer to the vector object to work on. |
pData | [in] The data for the Vector generation. |
void UaServer_Vector_Clear | ( | UaServer_Vector * | pV | ) |
Clears the vector structure.
pV | Pointer to the vector object to work on. |
void * UaServer_Vector_Get | ( | UaServer_Vector * | pV, |
unsigned int | index | ||
) |
Returns the value at the given index.
pV | Pointer to the vector object to work on. |
index | index where the value is stored. |
unsigned int UaServer_Vector_GetSize | ( | UaServer_Vector * | pV | ) |
Returns the current size of the vector.
pV | Pointer to the vector object to work on. |
void UaServer_Vector_Initialize | ( | UaServer_Vector * | pV, |
unsigned int | size, | ||
unsigned int | grow | ||
) |
Initializes the vector structure.
The vector is an array like container that can grow dynamically. It stores pointers to objects.
pV | Pointer to the vector object to work on. |
size | Initial size of the vector in number of elements, not bytes. |
grow | The number of elements the vector should grow when it needs to be reallocated. |
void UaServer_Vector_RemoveAt | ( | UaServer_Vector * | pV, |
unsigned int | index | ||
) |
Removes an element from the vector at the given index.
pV | Pointer to the vector object to work on. |
index | index where the value is stored. |
void UaServer_Vector_Resize | ( | UaServer_Vector * | pV, |
unsigned int | size | ||
) |
Resize the vector.
pV | Pointer to the vector object to work on. |
size | Initial size of the vector in number of elements, not bytes. |
void UaServer_Vector_Set | ( | UaServer_Vector * | pV, |
unsigned int | index, | ||
void * | pData | ||
) |
Sets an element at the given index.
This method doesn't change the size of the vector. It's up to you to write to a valid index.
pV | Pointer to the vector object to work on. |
index | index where the value is stored. |
pData | [in] The data for the Vector generation. |