Find fields¶
saf_find_fields is a function defined in field.c.
Synopsis:
-
int
saf_find_fields(SAF_ParMode pmode, SAF_Db *db, SAF_Set *base, const char *name, SAF_Quantity *quantity, SAF_Algebraic *atype, SAF_Basis *basis, SAF_Unit *unit, SAF_Cat *coeff_assoc, int assoc_ratio, SAF_Cat *eval_decomp, SAF_Eval *eval_func, int *nfound, SAF_Field **found)¶
Formal Arguments:
pmode: The parallel mode.db: Database in which to limit the search.base: The base space to limit the search to. PassSAF__UNIVERSEorNULLif you do not want to limit the search to any particular base space.name: Limit search to fields with this name. PassSAF__ANY_NAMEif you do not want to limit the search.quantity: Limit search to fields of specified quantity. PassNULLto not limit search.atype: Limit the search to this algebraic type. PassSAF__ALGTYPE_ANYif you do not want to limit the search.basis: Limit the search to this basis. PassSAF__ANY_BASISif you do not want to limit the search.unit: Limit search to fields with these units. PassSAF__ANY_UNITto not limit search.coeff_assoc: Limit search. PassSAF__ANY_CATto not limit the search.assoc_ratio: Limit search. PassSAF__ANY_RATIOto not limit the search.eval_decomp: Limit search. PassSAF__ANY_CATto not limit the search.eval_func: Limit search. PassSAF__ANY_EFUNCto not limit the search.nfound: For this and the succeeding argument, (see *Returned Handles*).found: For this and the preceding argument, (see *Returned Handles*).
Description: This function allows a client to search for fields in the database. The search may be limited by one or more criteria such as the name of the field, the quantity the field represents, the base space the field is defined on, etc., etc.
Preconditions:
pmodemust be valid. (low-cost)basemust either be a valid set handle or the universe set if supplied. (low-cost)quantitymust either be a valid quantity handle orSAF__ANY_QUANTITY. (low-cost)atypemust be a valid algebraic type handle orSAF__ANY_ALGEBRAIC. (low-cost)basismust be a valid basis handle orSAF__ANY_BASIS. (low-cost)unitmust either be a valid unit handle orSAF__ANY_UNIT. (low-cost)eval_funcmust be a valid evaluation function handle orSAF__ANY_EVALUATION. (low-cost)coeff_assocmust either be a valid cat handle orSAF__ANY_CAT. (low-cost)eval_decompmust either be a valid cat handle orSAF__ANY_CAT. (low-cost)nfoundandfoundmust be compatible for return value allocation. (low-cost)
Return Value: The constant SAF__SUCCESS is returned when this function is successful. Otherwise this function either returns
an error number or throws an exception, depending on the value of the library’s error handling property.
Issues: Should SAF traverse up the SIL to find all fields that are actually defined for the given set?
See Also:
- Fields: Introduction for current chapter