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__UNIVERSE
orNULL
if you do not want to limit the search to any particular base space.name
: Limit search to fields with this name. PassSAF__ANY_NAME
if you do not want to limit the search.quantity
: Limit search to fields of specified quantity. PassNULL
to not limit search.atype
: Limit the search to this algebraic type. PassSAF__ALGTYPE_ANY
if you do not want to limit the search.basis
: Limit the search to this basis. PassSAF__ANY_BASIS
if you do not want to limit the search.unit
: Limit search to fields with these units. PassSAF__ANY_UNIT
to not limit search.coeff_assoc
: Limit search. PassSAF__ANY_CAT
to not limit the search.assoc_ratio
: Limit search. PassSAF__ANY_RATIO
to not limit the search.eval_decomp
: Limit search. PassSAF__ANY_CAT
to not limit the search.eval_func
: Limit search. PassSAF__ANY_EFUNC
to 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:
pmode
must be valid. (low-cost)base
must either be a valid set handle or the universe set if supplied. (low-cost)quantity
must either be a valid quantity handle orSAF__ANY_QUANTITY
. (low-cost)atype
must be a valid algebraic type handle orSAF__ANY_ALGEBRAIC
. (low-cost)basis
must be a valid basis handle orSAF__ANY_BASIS
. (low-cost)unit
must either be a valid unit handle orSAF__ANY_UNIT
. (low-cost)eval_func
must be a valid evaluation function handle orSAF__ANY_EVALUATION
. (low-cost)coeff_assoc
must either be a valid cat handle orSAF__ANY_CAT
. (low-cost)eval_decomp
must either be a valid cat handle orSAF__ANY_CAT
. (low-cost)nfound
andfound
must 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