rtxDynPtrArray.h File Reference
- Implementation of a dynamic pointer array.
#include "rtxsrc/rtxContext.h"
Go to the source code of this file.
Functions | |
EXTERNRT int | rtxDynPtrArrayInit (OSCTXT *pctxt, OSRTDynPtrArray *pArray, OSUINT16 initialSize) |
This function initializes a new dynamic pointer array structure. | |
EXTERNRT int | rtxDynPtrArrayAppend (OSCTXT *pctxt, OSRTDynPtrArray *pArray, void *ptr) |
This function adds a pointer to the end of the array and expands the array if necessary. |
Detailed Description
- Implementation of a dynamic pointer array.
Definition in file rtxDynPtrArray.h.
Function Documentation
EXTERNRT int rtxDynPtrArrayAppend | ( | OSCTXT * | pctxt, | |
OSRTDynPtrArray * | pArray, | |||
void * | ptr | |||
) |
This function adds a pointer to the end of the array and expands the array if necessary.
- Parameters:
-
pctxt Pointer to a context structure. pArray Pointer to dynamic pointer array structure. ptr Pointer to be added to the array.
- Returns:
- Status of operation: zero if success or a negative error code if failure.
EXTERNRT int rtxDynPtrArrayInit | ( | OSCTXT * | pctxt, | |
OSRTDynPtrArray * | pArray, | |||
OSUINT16 | initialSize | |||
) |
This function initializes a new dynamic pointer array structure.
Memory is allocated for the initial capacity of pointers.
- Parameters:
-
pctxt Pointer to a context structure. pArray Pointer to dynamic pointer array structure. initialSize Initial capacilty of the array. The size will doubled on each expansion. If zero is provided, a default size will be used.
- Returns:
- Status of operation: zero if success or a negative error code if failure.