Mission Base

Program Base Library Functions

void** pblSetToArray

( PblSet* set )

Returns an array containing all of the elements in this set.

Documentation

Returns an array containing all of the elements in this set.

Note: The pointer array returned is malloced from heap, the caller has to free it after it is no longer needed!

The size of the pointer array malloced and returned is defined by the pblSetSize() of the set.

This method has a time complexity of O(N), with N being the size of the set.

Parameters:
set - The set to use
Returns:
void * retptr != NULL: The array containing the elements of the set.
void * retptr == NULL: An error, see pbl_errno:
PBL_ERROR_OUT_OF_MEMORY - Out of memory.
PBL_ERROR_OUT_OF_BOUNDS - The set is empty.
PBL_ERROR_PARAM_COLLECTION - The set cannot be iterated.
PBL_ERROR_CONCURRENT_MODIFICATION - The set was modified concurrently.

Alphabetic index



This page was generated with the help of DOC++.