Defines, Structures, Typedefs, Functions. More...
Files | |
file | clCntApi.h |
Header file of Clovis Container Related APIs. |
Typedefs | |
typedef ClPtrT | ClCntArgHandleT |
Handle of the argument which will be passed to callback functions. | |
typedef ClPtrT | ClCntDataHandleT |
Handle of the data. | |
typedef void(* | ClCntDeleteCallbackT )(CL_IN ClCntKeyHandleT userKey, CL_IN ClCntDataHandleT userData) |
Gets called While destroying the node of the container. | |
typedef ClPtrT | ClCntHandleT |
Handle of the container. | |
typedef ClUint32T(* | ClCntHashCallbackT )(CL_IN ClCntKeyHandleT userKey) |
Gets called While doing hash table related operations. | |
typedef ClInt32T(* | ClCntKeyCompareCallbackT )(CL_IN ClCntKeyHandleT key1, CL_IN ClCntKeyHandleT key2) |
Compares the two keys. | |
typedef ClPtrT | ClCntKeyHandleT |
Handle of the key handle. | |
typedef ClPtrT | ClCntNodeHandleT |
Handle of the container Node. | |
typedef ClRcT(* | ClCntWalkCallbackT )(CL_IN ClCntKeyHandleT userKey, CL_IN ClCntDataHandleT userData, CL_IN ClCntArgHandleT userArg, CL_IN ClUint32T dataLength) |
Gets called While performing container walk operation. |
Enumerations | |
enum | ClCntKeyTypeT { CL_CNT_UNIQUE_KEY = 1, CL_CNT_NON_UNIQUE_KEY = 2, CL_CNT_INVALID_KEY_TYPE } |
This enum describes type of the container. More... |
Functions | |
ClRcT | clCntAllNodesDelete (CL_IN ClCntHandleT containerHandle) |
Deletes all the nodes from the Container. | |
ClRcT | clCntAllNodesForKeyDelete (CL_IN ClCntHandleT containerHandle, CL_IN ClCntKeyHandleT userKey) |
ClRcT | clCntDataForKeyGet (CL_IN ClCntHandleT containerHandle, CL_IN ClCntKeyHandleT userKey, CL_OUT ClCntDataHandleT *pUserData) |
Returns the user-data associated with a specified key. | |
ClRcT | clCntDelete (CL_IN ClCntHandleT containerHandle) |
Destroys the Container. | |
ClRcT | clCntFirstNodeGet (CL_IN ClCntHandleT containerHandle, CL_OUT ClCntNodeHandleT *pNodeHandle) |
Returns the first node from the Container. | |
ClRcT | clCntHashtblCreate (CL_IN ClUint32T numberOfBuckets, CL_IN ClCntKeyCompareCallbackT fpKeyCompare, CL_IN ClCntHashCallbackT fpHashFunction, CL_IN ClCntDeleteCallbackT fpUserDeleteCallback, CL_IN ClCntDeleteCallbackT fpUserDestroyCallback, CL_IN ClCntKeyTypeT containerKeyType, CL_IN ClCntHandleT *pContainerHandle) |
Creates the hash table. | |
ClRcT | clCntKeySizeGet (CL_IN ClCntHandleT containerHandle, CL_IN ClCntKeyHandleT userKey, CL_OUT ClUint32T *pSize) |
Returns the number of nodes associated with a user-key. | |
ClRcT | clCntLastNodeGet (CL_IN ClCntHandleT containerHandle, CL_OUT ClCntNodeHandleT *pNodeHandle) |
Returns the last node from the Container. | |
ClRcT | clCntLlistCreate (CL_IN ClCntKeyCompareCallbackT fpKeyCompare, CL_IN ClCntDeleteCallbackT fpUserDeleteCallback, CL_IN ClCntDeleteCallbackT fpUserDestroyCallback, CL_IN ClCntKeyTypeT containerKeyType, CL_OUT ClCntHandleT *pContainerHandle) |
Creates the container doubly linked list. | |
ClRcT | clCntNextNodeGet (CL_IN ClCntHandleT containerHandle, CL_IN ClCntNodeHandleT currentNodeHandle, CL_OUT ClCntNodeHandleT *pNextNodeHandle) |
Returns the next node from the Container. | |
ClRcT | clCntNodeAdd (CL_IN ClCntHandleT containerHandle, CL_IN ClCntKeyHandleT userKey, CL_IN ClCntDataHandleT userData, CL_IN ClRuleExprT *rbeExpression) |
Adds a new node to Container. | |
ClRcT | clCntNodeAddAndNodeGet (CL_IN ClCntHandleT containerHandle, CL_IN ClCntKeyHandleT userKey, CL_IN ClCntDataHandleT userData, CL_IN ClRuleExprT *pExp, CL_IN ClCntNodeHandleT *pNodeHandle) |
Adds a new node to Container and returns the node handle. | |
ClRcT | clCntNodeDelete (CL_IN ClCntHandleT containerHandle, CL_IN ClCntNodeHandleT nodeHandle) |
Deletes a specific node from the Container. | |
ClRcT | clCntNodeFind (CL_IN ClCntHandleT containerHandle, CL_IN ClCntKeyHandleT userKey, CL_IN ClCntNodeHandleT *pNodeHandle) |
Finds a specific node in the Container. | |
ClRcT | clCntNodeUserDataGet (CL_IN ClCntHandleT containerHandle, CL_IN ClCntNodeHandleT nodeHandle, CL_OUT ClCntDataHandleT *pUserDataHandle) |
Returns the user-data from the node. | |
ClRcT | clCntNodeUserKeyGet (CL_IN ClCntHandleT containerHandle, CL_IN ClCntNodeHandleT nodeHandle, CL_OUT ClCntKeyHandleT *pUserKey) |
Returns the user-key from the node. | |
ClRcT | clCntPreviousNodeGet (CL_IN ClCntHandleT containerHandle, CL_IN ClCntNodeHandleT currentNodeHandle, CL_OUT ClCntNodeHandleT *pPreviousNodeHandle) |
Returns the previous node from the Container. | |
ClRcT | clCntRbtreeCreate (CL_IN ClCntKeyCompareCallbackT fpKeyCompare, CL_IN ClCntDeleteCallbackT fpUserDeleteCallback, CL_IN ClCntDeleteCallbackT fpUserDestroyCallback, CL_IN ClCntKeyTypeT containerKeyType, CL_OUT ClCntHandleT *pContainerHandle) |
Creates the container red black tree. | |
ClRcT | clCntSizeGet (CL_IN ClCntHandleT containerHandle, CL_OUT ClUint32T *pSize) |
Returns the size of the Container. | |
ClRcT | clCntThreadSafeHashtblCreate (CL_IN ClUint32T numberOfBuckets, CL_IN ClCntKeyCompareCallbackT fpKeyCompare, CL_IN ClCntHashCallbackT fpHashFunction, CL_IN ClCntDeleteCallbackT fpUserDeleteCallback, CL_IN ClCntDeleteCallbackT fpUserDestroyCallback, CL_IN ClCntKeyTypeT containerKeyType, CL_OUT ClCntHandleT *pContainerHandle) |
Creates a thread safe hash table. | |
ClRcT | clCntThreadSafeLlistCreate (CL_IN ClCntKeyCompareCallbackT fpKeyCompare, CL_IN ClCntDeleteCallbackT fpUserDeleteCallback, CL_IN ClCntDeleteCallbackT fpUserDestroyCallback, CL_IN ClCntKeyTypeT containerKeyType, CL_OUT ClCntHandleT *pContainerHandle) |
Creates the container doubly linked list with lock variable. | |
ClRcT | clCntThreadSafeRbtreeCreate (CL_IN ClCntKeyCompareCallbackT fpKeyCompare, CL_IN ClCntDeleteCallbackT fpUserDeleteCallback, CL_IN ClCntDeleteCallbackT fpUserDestroyCallback, CL_IN ClCntKeyTypeT containerKeyType, CL_OUT ClCntHandleT *pContainerHandle) |
Creates the thread safe container red black tree. | |
ClRcT | clCntWalk (CL_IN ClCntHandleT containerHandle, CL_IN ClCntWalkCallbackT fpUserWalkCallback, CL_IN ClCntArgHandleT userArg, CL_IN ClInt32T length) |
Walks through the Container. |
Defines, Structures, Typedefs, Functions.
typedef void(* ClCntDeleteCallbackT)(CL_IN ClCntKeyHandleT userKey, CL_IN ClCntDataHandleT userData) |
Gets called While destroying the node of the container.
userKey | (in) Key of the node is being destroyed. |
userData | (in) Data of the node is being destroyed. |
none |
typedef ClPtrT ClCntHandleT |
Handle of the container.
Container could be Linked list, Rbtree, Hashtable.
typedef ClUint32T(* ClCntHashCallbackT)(CL_IN ClCntKeyHandleT userKey) |
Gets called While doing hash table related operations.
userKey | (in) Key of the node is being accessed. |
hashVal | will be returned. |
typedef ClInt32T(* ClCntKeyCompareCallbackT)(CL_IN ClCntKeyHandleT key1, CL_IN ClCntKeyHandleT key2) |
Compares the two keys.
key1 | (in) Users passed Key value. |
key2 | (in) already stored Key value in the container. |
0 | both the keys are equal |
>0 | key1 is larger than key2 |
<0 | key2 is larger than key1 |
typedef ClRcT(* ClCntWalkCallbackT)(CL_IN ClCntKeyHandleT userKey, CL_IN ClCntDataHandleT userData, CL_IN ClCntArgHandleT userArg, CL_IN ClUint32T dataLength) |
Gets called While performing container walk operation.
userKey | (in) Key of the node is being accessed. |
userData | (in) Data of the node is being accessed. |
userArg | (in) Userarg whatever they pass to clCntWalk function will passed. |
length | (in) Length of the arg data. |
hashVal | will be returned. |
enum ClCntKeyTypeT |
ClRcT clCntAllNodesDelete | ( | CL_IN ClCntHandleT | containerHandle | ) |
Deletes all the nodes from the Container.
containerHandle | (in) Handle of Container returned by the create API. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle. |
CL_ERR_NOT_EXIST | If node does not exist. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntAllNodesForKeyDelete | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntKeyHandleT | userKey | ||
) |
containerHandle | (in) Handle of Container returned by the create API. |
userKey | (in) User specified key. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle. |
CL_ERR_NOT_EXIST | If node does not exist. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntDataForKeyGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntKeyHandleT | userKey, | ||
CL_OUT ClCntDataHandleT * | pUserData | ||
) |
Returns the user-data associated with a specified key.
containerHandle | (in) Handle of the Container returned by the create API. |
userKey | (in) User-key, for which associated data is to be retrieved. |
pUserData | (out) Pointer to the variable of type ClCntNodeHandleT in which the handle of the user-data associated with a specific key is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_ERR_NOT_EXIST | If user-key does not exist. |
CL_ERR_NOT_IMPLEMENTED | If this API is used with non-unique keys. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntDelete | ( | CL_IN ClCntHandleT | containerHandle | ) |
Destroys the Container.
containerHandle(in) | Handle of Container returned by the create API. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntFirstNodeGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_OUT ClCntNodeHandleT * | pNodeHandle | ||
) |
Returns the first node from the Container.
containerHandle | (in) Handle of Container returned by the create API. |
pNodeHandle | (out) Pointer to the variable of type ClCntNodeHandleT in which handle of the node is found. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntHashtblCreate | ( | CL_IN ClUint32T | numberOfBuckets, |
CL_IN ClCntKeyCompareCallbackT | fpKeyCompare, | ||
CL_IN ClCntHashCallbackT | fpHashFunction, | ||
CL_IN ClCntDeleteCallbackT | fpUserDeleteCallback, | ||
CL_IN ClCntDeleteCallbackT | fpUserDestroyCallback, | ||
CL_IN ClCntKeyTypeT | containerKeyType, | ||
CL_IN ClCntHandleT * | pContainerHandle | ||
) |
Creates the hash table.
numberOfBuckets | Number of buckets (table size) in the hash table. |
fpKeyCompare | (in) Pointer to the user's key compare function. It accepts two parameters of type ClCntKeyHandleT. This function returns the following values:
|
fpUserDeleteCallback | (in) Pointer to the user's destroy callback function. This function is called by the container library whenever either clCntNodeDelete or clCntNodeAllDelete API is called. The delete callback function must free any memory allocated by the application for the node being deleted. |
fpUserDestroyCallback | (in) Pointer to the user's destroy callback function. This function is called, whenever you invoke the destroy API. The user-key and user-data of each node, which is being deleted is passed as first and second argument to this callback. |
containerKeyType | (in) Enum indicating whether the Container is of a unique key type or a non-unique key type. |
pContainerHandle | (out) Pointer to the variable of type ClCntHandleT in which the function returns a valid Container handle on successful creation of Container. |
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_NULL_POINTER | On passing NULL values for either pContainerHandle or compare call back funtion. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_MUTEX_ERROR | On passing invalid values for creationg mutex. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntKeySizeGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntKeyHandleT | userKey, | ||
CL_OUT ClUint32T * | pSize | ||
) |
Returns the number of nodes associated with a user-key.
containerHandle | (in) Handle of the Container returned by the create API. |
userKey | (in) Handle of the user-key. |
pSize | (out) Pointer to the variable of type ClCntNodeHandleT in which the number of nodes associated with the specified user-key is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntLastNodeGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_OUT ClCntNodeHandleT * | pNodeHandle | ||
) |
Returns the last node from the Container.
containerHandle | (in) Handle of Container returned by the create API. |
currentNodeHandle | (out) Handle of the current node. |
pNextNodeHandle | (out) Pointer to the variable of type ClCntNodeHandleT in which the handle of the next node is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntLlistCreate | ( | CL_IN ClCntKeyCompareCallbackT | fpKeyCompare, |
CL_IN ClCntDeleteCallbackT | fpUserDeleteCallback, | ||
CL_IN ClCntDeleteCallbackT | fpUserDestroyCallback, | ||
CL_IN ClCntKeyTypeT | containerKeyType, | ||
CL_OUT ClCntHandleT * | pContainerHandle | ||
) |
Creates the container doubly linked list.
fpKeyCompare | (in) Pointer to the user's key compare function. It accepts two parameters of type ClCntKeyHandleT. This function returns the following values:
|
fpUserDeleteCallback | (in): Pointer to the user's destroy callback function. This function is called by the container library whenever either clCntNodeDelete or clCntNodeAllDelete API is called. The delete callback function must free any memory allocated by the application for the node being deleted. |
fpUserDestroyCallback | (in) Pointer to the user's destroy callback function. This function is called, whenever you invoke the destroy API. The user-key and user-data of each node, which is being deleted is passed as first and second argument to this callback. |
containerKeyType | (in) Enum indicating whether the Container is of a unique key type or a non-unique key type. |
pContainerHandle | (out) Pointer to the variable of type ClCntHandleT in which the function returns a valid Container handle on successful creation of Container. |
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_NULL_POINTER | On passing NULL values for either pContainerHandle or compare call back funtion. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntNextNodeGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntNodeHandleT | currentNodeHandle, | ||
CL_OUT ClCntNodeHandleT * | pNextNodeHandle | ||
) |
Returns the next node from the Container.
containerHandle | (in) Handle of Container returned by the create API. |
currentNodeHandle | (in) Handle of current node. |
pNextNodeHandle | (out) Pointer to the variable of type ClCntNodeHandleT in which the handle of the next node is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntNodeAdd | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntKeyHandleT | userKey, | ||
CL_IN ClCntDataHandleT | userData, | ||
CL_IN ClRuleExprT * | rbeExpression | ||
) |
Adds a new node to Container.
containerHandle | (in) Handle of Container returned by the create API. |
userKey | (in) Handle of the user-key. |
userData | (in) User specified data. Memory allocation for userData must be done by you. |
rbeExpression | (in) An RBE expression to associate with the new node. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_DUPLICATE | If user-key already exists and the Container created supports only unique keys. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntNodeAddAndNodeGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntKeyHandleT | userKey, | ||
CL_IN ClCntDataHandleT | userData, | ||
CL_IN ClRuleExprT * | pExp, | ||
CL_IN ClCntNodeHandleT * | pNodeHandle | ||
) |
Adds a new node to Container and returns the node handle.
containerHandle | (in) Handle of Container returned by the create API. |
userKey | (in) Handle of the user key. |
userData | (in) User specified data. Memory allocation for this parameter must be done by you. |
pExp | (in) An RBE Expression to associate with this new node. |
pNodeHandle | (out) Pointer to the variable of type ClCntNodeHandleT in which handle of the node is added. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_DUPLICATE | If user-key already exists and the Container created supports only unique keys. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntNodeDelete | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntNodeHandleT | nodeHandle | ||
) |
Deletes a specific node from the Container.
containerHandle | (in) Handle of Container returned by the create API. |
nodeHandle | (in) Handle of the node to be deleted. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle. |
CL_ERR_NOT_EXIST | If node does not exist. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntNodeFind | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntKeyHandleT | userKey, | ||
CL_IN ClCntNodeHandleT * | pNodeHandle | ||
) |
Finds a specific node in the Container.
containerHandle | (in) Handle of Container returned by the create API. |
userKey | (in) User specified key. |
pNodeHandle | (out) Pointer to the variable of type ClCntNodeHandleT in which handle of the node is found. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle. |
CL_ERR_NOT_EXIST | If user-key does not exist. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntNodeUserDataGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntNodeHandleT | nodeHandle, | ||
CL_OUT ClCntDataHandleT * | pUserDataHandle | ||
) |
Returns the user-data from the node.
containerHandle | (in) Handle of the Container returned by the create API. |
nodeHandle | (in) Handle of the node. |
pUserDataHandle | (out) Pointer to the variable of type ClCntNodeHandleT in which the handle of the user-data associated with a specific key is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntNodeUserKeyGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntNodeHandleT | nodeHandle, | ||
CL_OUT ClCntKeyHandleT * | pUserKey | ||
) |
Returns the user-key from the node.
containerHandle | (in) Handle of the Container returned by the create API. |
nodeHandle | (in) Handle of node from which user-key is to be retrieved. |
pUserKey | (out) Pointer to the variable of type ClCntNodeHandleT in which the handle of the user-key is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntPreviousNodeGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntNodeHandleT | currentNodeHandle, | ||
CL_OUT ClCntNodeHandleT * | pPreviousNodeHandle | ||
) |
Returns the previous node from the Container.
containerHandle | (in) Handle of the Container returned by the create API. |
currentNodeHandle | (in) Handle of the current node. |
pPreviousNodeHandle | (out) Pointer to the variable of type ClCntNodeHandleT in which the handle of the previous node is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntRbtreeCreate | ( | CL_IN ClCntKeyCompareCallbackT | fpKeyCompare, |
CL_IN ClCntDeleteCallbackT | fpUserDeleteCallback, | ||
CL_IN ClCntDeleteCallbackT | fpUserDestroyCallback, | ||
CL_IN ClCntKeyTypeT | containerKeyType, | ||
CL_OUT ClCntHandleT * | pContainerHandle | ||
) |
Creates the container red black tree.
fpKeyCompare | (in) Pointer to the user's key compare function. It accepts two parameters of type ClCntKeyHandleT. This function returns the following values:
|
fpUserDeleteCallback | (in): Pointer to the user's destroy callback function. This function is called by the container library whenever either clCntNodeDelete or clCntNodeAllDelete API is called. The delete callback function must free any memory allocated by the application for the node being deleted. |
fpUserDestroyCallback | (in) Pointer to the user's destroy callback function. This function is called, whenever you invoke the destroy API. The user-key and user-data of each node, which is being deleted is passed as first and second argument to this callback. |
containerKeyType | (in) Enum indicating whether the Container is of a unique key type or a non-unique key type. |
pContainerHandle | (out) Pointer to the variable of type ClCntHandleT in which the function returns a valid Container handle on successful creation of Container. |
CL_OK,: | The API executed successfully. |
CL_ERR_NO_MEMORY,: | On memory allocation failure. |
CL_ERR_NULL_POINTER,: | On passing NULL values for either pContainerHandle or compare call back funtion. |
CL_ERR_INVALID_PARAMETER,: | On passing invalid values to container type. |
CL_ERR_INVALID_PARAMETER,: | On passing invalid values to container type. |
CL_ERR_MUTEX_ERROR,: | On passing invalid values for creationg mutex. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntSizeGet | ( | CL_IN ClCntHandleT | containerHandle, |
CL_OUT ClUint32T * | pSize | ||
) |
Returns the size of the Container.
containerHandle | (in) Handle of the Container returned by the create API. |
pSize | (out) Pointer to the variable of type ClCntNodeHandleT in which size of the Container is returned. |
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid Container handle or if the Container is empty. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntThreadSafeHashtblCreate | ( | CL_IN ClUint32T | numberOfBuckets, |
CL_IN ClCntKeyCompareCallbackT | fpKeyCompare, | ||
CL_IN ClCntHashCallbackT | fpHashFunction, | ||
CL_IN ClCntDeleteCallbackT | fpUserDeleteCallback, | ||
CL_IN ClCntDeleteCallbackT | fpUserDestroyCallback, | ||
CL_IN ClCntKeyTypeT | containerKeyType, | ||
CL_OUT ClCntHandleT * | pContainerHandle | ||
) |
Creates a thread safe hash table.
numberOfBuckets | Number of buckets (table size) in the hash table. |
fpKeyCompare | (in) Pointer to the user's key compare function. It accepts two parameters of type ClCntKeyHandleT. This function returns the following values:
|
fpUserDeleteCallback | (in) Pointer to the user's destroy callback function. This function is called by the container library whenever either clCntNodeDelete or clCntNodeAllDelete API is called. The delete callback function must free any memory allocated by the application for the node being deleted. |
fpUserDestroyCallback | (in) Pointer to the user's destroy callback function. This function is called, whenever you invoke the destroy API. The user-key and user-data of each node, which is being deleted is passed as first and second argument to this callback. |
containerKeyType | (in) Enum indicating whether the Container is of a unique key type or a non-unique key type. |
pContainerHandle | (out) Pointer to the variable of type ClCntHandleT in which the function returns a valid Container handle on successful creation of Container. |
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_NULL_POINTER | On passing NULL values for either pContainerHandle or compare call back funtion. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_MUTEX_ERROR | On passing invalid values for creationg mutex. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntThreadSafeLlistCreate | ( | CL_IN ClCntKeyCompareCallbackT | fpKeyCompare, |
CL_IN ClCntDeleteCallbackT | fpUserDeleteCallback, | ||
CL_IN ClCntDeleteCallbackT | fpUserDestroyCallback, | ||
CL_IN ClCntKeyTypeT | containerKeyType, | ||
CL_OUT ClCntHandleT * | pContainerHandle | ||
) |
Creates the container doubly linked list with lock variable.
fpKeyCompare | (in) Pointer to the user's key compare function. It accepts two parameters of type ClCntKeyHandleT. This function returns the following values:
|
fpUserDeleteCallback | (in): Pointer to the user's destroy callback function. This function is called by the container library whenever either clCntNodeDelete or clCntNodeAllDelete API is called. The delete callback function must free any memory allocated by the application for the node being deleted. |
fpUserDestroyCallback | (in) Pointer to the user's destroy callback function. This function is called, whenever you invoke the destroy API. The user-key and user-data of each node, which is being deleted is passed as first and second argument to this callback. |
containerKeyType | (in) Enum indicating whether the Container is of a unique key type or a non-unique key type. |
pContainerHandle | (out) Pointer to the variable of type ClCntHandleT in which the function returns a valid Container handle on successful creation of Container. |
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_NULL_POINTER | On passing NULL values for either pContainerHandle or compare call back funtion. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_MUTEX_ERROR | On passing invalid values for creationg mutex. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntThreadSafeRbtreeCreate | ( | CL_IN ClCntKeyCompareCallbackT | fpKeyCompare, |
CL_IN ClCntDeleteCallbackT | fpUserDeleteCallback, | ||
CL_IN ClCntDeleteCallbackT | fpUserDestroyCallback, | ||
CL_IN ClCntKeyTypeT | containerKeyType, | ||
CL_OUT ClCntHandleT * | pContainerHandle | ||
) |
Creates the thread safe container red black tree.
fpKeyCompare | (in) Pointer to the user's key compare function. It accepts two parameters of type ClCntKeyHandleT. This function returns the following values:
|
fpUserDeleteCallback | (in): Pointer to the user's destroy callback function. This function is called by the container library whenever either clCntNodeDelete or clCntNodeAllDelete API is called. The delete callback function must free any memory allocated by the application for the node being deleted. |
fpUserDestroyCallback | (in) Pointer to the user's destroy callback function. This function is called, whenever you invoke the destroy API. The user-key and user-data of each node, which is being deleted is passed as first and second argument to this callback. |
containerKeyType | (in) Enum indicating whether the Container is of a unique key type or a non-unique key type. |
pContainerHandle | (out) Pointer to the variable of type ClCntHandleT in which the function returns a valid Container handle on successful creation of Container. |
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_NULL_POINTER | On passing NULL values for either pContainerHandle or compare call back funtion. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_INVALID_PARAMETER | On passing invalid values to container type. |
CL_ERR_MUTEX_ERROR | On passing invalid values for creationg mutex. |
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to retrieve the error code.ClRcT clCntWalk | ( | CL_IN ClCntHandleT | containerHandle, |
CL_IN ClCntWalkCallbackT | fpUserWalkCallback, | ||
CL_IN ClCntArgHandleT | userArg, | ||
CL_IN ClInt32T | length | ||
) |
Walks through the Container.
\param containerHandle (in) Handle of the Container returned by the create API. \param fpUserWalkCallback (in) Pointer to the user's walk callback function. It accepts the following arguments: \arg ClCntKeyHandleT Handle to user-key of the node \arg ClCntDataHandleT Handle to user-data of the node. The \e userKey and \e userData of each node are passed as first and second arguments to the callback function. User specified \e userArg is also passed. \param userArg (in) User specified argument, which is passed as third parameter to the user walk callback function. This parameter is also passed to the \e clRbeExprEvaluate API. \param length (in) Length of \e userArg. This parameter is also passed to clRbeExprEvaluate API. \retval CL_OK The API executed successfully. \retval CL_ERR_NULL_POINTER On passing a NULL pointer. \retval CL_ERR_INVALID_HANDLE On passing an invalid Container handle or if the Container is empty. \note Return value is a combination of the component id and error code. As Return values only the Error Codes are listed above. Use \c CL_GET_ERROR_CODE(RET_CODE) defined in clCommonErrors.h to retrieve the error code. \par Description: This API is used to perform a walk through the Container. For each node encountered during the walk, if the RBE associated with the node evaluates to: \n