| NORSYS SOFTWARE © 2010 | NETICA API | C VERSION 4.18

void GetNodeNthUserField_bn ( | const node_bn* node, int index, const char** name, const void** value, int* length, int kind )

Returns the user-defined named field (i.e., attribute-value) data associated with node, by index rather than field name. For more information on user fields, see SetNodeUserField_bn.

Pass any non-negative integer for index. If it is larger than the last field, *name will be set to the empty string (""), and length will be set to -1.

*name will be set to the name of the field which was passed to SetNodeUserField_bn when the data was set, *value will be set to the data, and *length set to the length that was also passed in.

If value or length are NULL, they won't be set.

Pass 0 for kind. It is only for future expansion.

This function is meant to iterate through the various fields. Don't assume that their ordering will remain the same after a call to SetNodeUserField_bn on node.

Netica always places two null bytes after the end of the data (without altering length of course), which is of no consequence if the data is arbitrary bytes, but may be helpful if it is an ascii or Unicode string, and you want to safely retrieve it solely by pointer, ignoring length.

If you need the result to persist, make a copy of the data returned, since its contents may become invalid after further calls to Netica API. Do not try to directly modify or free the string returned.

Version:

Versions 2.07 and later have this function.

See also:

SetNodeUserField_bn |  | Sets them
GetNodeUserField_bn |  | Retrieve field by name
GetNetNthUserField_bn |  | The equivalent function for nets