Data Structures | |
struct | _UaServer_Vector |
Vector structure. More... | |
Functions | |
OpcUa_Void | UaServer_Vector_Initialize (UaServer_Vector *pV, OpcUa_UInt size, OpcUa_UInt grow) |
Initializes the vector structure. | |
OpcUa_Void | UaServer_Vector_Clear (UaServer_Vector *pV) |
Clears the vector structure. | |
OpcUa_UInt | UaServer_Vector_Add (UaServer_Vector *pV, OpcUa_Void *pData) |
Adds an element to the vector. | |
OpcUa_Void | UaServer_Vector_Set (UaServer_Vector *pV, OpcUa_UInt index, OpcUa_Void *pData) |
Sets an element at the given index. | |
OpcUa_Void * | UaServer_Vector_Get (UaServer_Vector *pV, OpcUa_UInt index) |
Returns the value at the given index. | |
OpcUa_UInt | UaServer_Vector_GetSize (UaServer_Vector *pV) |
Returns the current size of the vector. | |
OpcUa_Void | UaServer_Vector_Resize (UaServer_Vector *pV, OpcUa_UInt size) |
Resize the vector. |
OpcUa_UInt UaServer_Vector_Add | ( | UaServer_Vector * | pV, | |
OpcUa_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. |
OpcUa_Void* UaServer_Vector_Get | ( | UaServer_Vector * | pV, | |
OpcUa_UInt | 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. |
OpcUa_Void UaServer_Vector_Initialize | ( | UaServer_Vector * | pV, | |
OpcUa_UInt | size, | |||
OpcUa_UInt | 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. |
OpcUa_Void UaServer_Vector_Resize | ( | UaServer_Vector * | pV, | |
OpcUa_UInt | 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. |
OpcUa_Void UaServer_Vector_Set | ( | UaServer_Vector * | pV, | |
OpcUa_UInt | index, | |||
OpcUa_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. |