Pointer Array Functions (TutPtrAry*)


The TutPtrAry* are used to work with pointer arrays.

TutPtrAryAppend — append an item to the pointer array

T_BOOL TutPtrAryAppend(ptr_array, pointer, index) 
T_PTR_ARY ptr_array; 
T_PTR pointer; 
T_INT4 *index; 

TutPtrAryChangeCbCreate — create a callback that is called when a pointer array changes

T_CB TutPtrAryChangeCbCreate(ptr_ary, change_func, arg) 
T_PTR_ARY ptr_ary; 
T_PTR_ARY_CHANGE_CB_FUNC change_func; 
T_CB_ARG arg; 

TutPtrAryChangeCbLookup — look up a pointer array change callback

T_CB TutPtrAryChangeCbLookup(ptr_ary, change_func, arg) 
T_PTR_ARY ptr_ary; 
T_PTR_ARY_CHANGE_CB_FUNC change_func; 
T_CB_ARG arg; 

TutPtrAryClear — clear the pointer array

T_BOOL TutPtrAryClear(ptr_ary, user_func, user_arg) 
T_PTR_ARY ptr_ary; 
T_PTR_ARY_USER_FUNC user_func; 
T_PTR user_arg; 

TutPtrAryCreate — create a pointer array

T_PTR_ARY TutPtrAryCreate(size) 
T_INT4 size; 

TutPtrAryDestroy — destroy the pointer array

T_BOOL TutPtrAryDestroy(ptr_ary, user_func, user_arg) 
T_PTR_ARY ptr_ary; 
T_PTR_ARY_USER_FUNC user_func; 
T_PTR user_arg; 

TutPtrAryGetItemAtIndex — retrieve the item stored at the given index in the array

T_BOOL TutPtrAryGetItemAtIndex(ptr_ary, index, element) 
T_PTR_ARY ptr_ary; 
T_INT4 index; 
T_PTR *element; 

TutPtrAryGetItemCount — determine the number of items in the pointer array

T_BOOL TutPtrAryGetItemCount(ptr_ary, count) 
T_PTR_ARY ptr_ary; 
T_INT4 *count; 

TutPtrAryGetItemIndex — determine the array index of the specified item

T_BOOL TutPtrAryGetItemIndex(ptr_ary, item, index) 
T_PTR_ARY ptr_ary; 
T_PTR item; 
T_INT4 *index; 

TutPtrAryInsertAfter — insert a new item in the array after the specified item

T_BOOL TutPtrAryInsertAfter(ptr_ary, index_item, new_item) 
T_PTR_ARY ptr_ary; 
T_PTR index_item; 
T_PTR new_item; 

TutPtrAryInsertBefore — insert a new item in the array before the specified item

T_BOOL TutPtrAryInsertBefore(ptr_ary, index_item, new_item) 
T_PTR_ARY ptr_ary; 
T_PTR index_item; 
T_PTR new_item; 

TutPtrAryInsertItemAtIndex — insert item in the array at the specified index

T_BOOL TutPtrAryInsertItemAtIndex(ptr_ary, new_item, index) 
T_PTR_ARY ptr_ary; 
T_PTR new_item; 
T_INT4 index 

TutPtrAryItemExists — verify that an item exists in the array

T_BOOL TutPtrAryItemExists(ptr_ary, item) 
T_PTR_ARY ptr_ary; 
T_PTR item; 

TutPtrAryRemove — remove an item from a pointer array

T_BOOL TutPtrAryRemove(ptr_ary, item) 
T_PTR_ARY ptr_ary; 
T_PTR item; 

TutPtrAryRemoveAll — remove all instances of an item from an array

T_BOOL TutPtrAryRemoveAll(ptr_ary, item, counter) 
T_PTR_ARY ptr_ary; 
T_PTR item; 
T_INT4 *counter; 

TutPtrAryReplaceItemAtIndex — replace item at the specified index with a new one

T_BOOL TutPtrAryReplaceItemAtIndex(ptr_ary, new_item, index, 
old_item) 
T_PTR_ARY ptr_ary; 
T_PTR new_item; 
T_INt4 index; 
T_PTR *old_item; 

TutPtrArySort — sort the pointer array

T_BOOL TutPtrArySort(ptr_ary, compare_func) 
T_PTR_ARY ptr_ary; 
T_PTR_ARY_CMP_FUNC compare_func; 

TutPtrArySwapItems — exchange the two specified elements in the array

T_BOOL TutPtrArySwapItems(ptr_ary, index1, index2) 
T_PTR_ARY ptr_ary; 
T_INT4 index1; 
T_INT4 index2; 

TIBCO SmartSockets™ API Quick Reference
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com