TipcPropertiesTraverse traverse the specified property list
T_STR TipcPropertiesTraverse(props
,traverse_func
,traverse_arg
) T_IPC_PROPERTIESprops
; T_IPC_PROPERTY_TRAV_FUNCtraverse_func
; T_PTRtraverse_arg
;
props
properties table
traverse_func
function to call once for each entry in properties table
traverse_arg
argument to pass to traverse_func
TipcPropertiesTraverse returns the first non-null return value from traverse_func
, or NULL
if traverse_func
always returns NULL
.
If TipcPropertiesTraverse fails or traverses to the end of the properties table, it returns NULL
and sets the global SmartSockets error code to one of:
TipcPropertiesTraverse traverses all the entries in the properties table and calls traverse_func
for each entry. traverse_func
is called with three arguments: key
, value
and traverse_arg
. When traverse_func
returns a null value then TipcPropertiesTraverse returns with that value.
Do not add or delete entries with traverse_func
. The ordering of the hash entries is not guaranteed.
TipcPropertiesCreate, TipcPropertiesGet, TipcPropertiesSet
This example traverses a properties table:
T_IPC_PROPERTIES props; T_PTR traverse_func(key, value, arg) T_PTR key; T_PTR value; T_PTR arg; { TutOut("key = %s, value = %s\n", (T_STR)key, (T_STR)value); } TipcPropertiesTraverse(props, traverse_func, NULL);
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |