Initializing help system before first use

buildnames

Purpose
Generate entities names for a given set of types.
Synopsis
int buildnames(XPRMcontext ctx, int nbt, int *types, int (**flts)(XPRMcontext ctx, void *ctf, int type, void *ref), int (**snms)(XPRMcontext ctx, void *ctf, int type, void *ref, const char *name), void **ctfs);
Arguments
ctx 
Mosel's execution context
nbt 
Number of types to look for
types 
Types to consider (must be referenced types like XPRM_TYP_LINCTR or any module type)
flts 
Filter functions to select for which entities a name has to be generated (one for each type)
snms 
Functions to record the generated names (one for each type)
ctfs 
Function contexts (one for each type)
Return value
0 if successful, 1 in case of error
Further information
1. This routine enumerates the symbols of the model dictionary to locate the entities of the selected types (both direct references and arrays). For each of the found entities, it generates a name based on the dictionary identifier that it passes back to the caller through one of the snms functions. This name might come from a temporary buffer and the function must save a copy of it if it needs to be accessed after the callback.
2. Symbols are processed in two steps: the names provided by the use of setname are first enumerated and then the symbols from the model dictionary. As a consequence a given entity might be reported two times if it has been assigned a name via setname and it is also a public symbol.
3. The parameters types, flts, snms and ctfs are arrays of size nbt: they characterise what types to look for and how to process them. The function flts(t) is called each time an entity of type types(t) has been found. It is provided with some specific context, ctfs(t), the type number of the entity, types(t), and its reference. buildnames will generate a name for this entity only if this function returns a non-zero value. This identifier will then be passed to snms(t). The process is aborted if this function returns a non-zero value.
Related topics

© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.