TipcPropertiesTraverse


Name

TipcPropertiesTraverse — traverse the specified property list

Synopsis

T_STR TipcPropertiesTraverse(props, traverse_func, traverse_arg) 
T_IPC_PROPERTIES props; 
T_IPC_PROPERTY_TRAV_FUNC traverse_func; 
T_PTR traverse_arg; 

Arguments

props — properties table

traverse_func — function to call once for each entry in properties table

traverse_arg — argument to pass to traverse_func

Return Values

TipcPropertiesTraverse returns the first non-null return value from traverse_func, or NULL if traverse_func always returns NULL.

Diagnostics

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:

Description

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.

Caution

Do not add or delete entries with traverse_func. The ordering of the hash entries is not guaranteed.

See Also

TipcPropertiesCreate, TipcPropertiesGet, TipcPropertiesSet

Examples

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