PK_PART_ask_attribs_filter   


PK_ERROR_code_t      PK_PART_ask_attribs_filter
(
--- received arguments ---
PK_PART_t            part,           --- entity
PK_ATTDEF_t          attdef,         --- attribute definition
int                  n_fields,       --- number of fields
const int            fields[],       --- fields to check
const int            indices[],      --- indices in fields
const int     *const values,         --- values to match ( may be NULL )
PK_ATTRIB_filter_f_t filter,         --- filter function ( may be NULL )
PK_POINTER_t         context,        --- context for filter fn.

--- returned arguments ---
int           *const n_attribs,      --- number of attributes (>= 0)
PK_ATTRIB_t  **const attribs         --- attributes (optional)
)


This function all the attributes attached to any entities within the
given part which have the given attribute definition and the contents of whose
integer fields match those specified either by the array of values passed in,
or by the supplied filter function, or both.


The output array attribs is optional. If it is set to NULL, the function
will only compute the number of such attributes within the part.

 The arrays fields and indices are of equal length, and each pair
(fields[i], indices[i]) specifies an integer field entry in the attribute which
must be matched. Filtering occurs as follows:

a) If values is non-null, then it must be the same length as fields, and
any attribute for which  (fields[i], indices[i]) != values[i] is rejected.

b) If filter is non-null it will be called for each attribute, with values
and context as arguments, and each attribute for which it returns
PK_LOGICAL_false will be rejected. If values was passed in as NULL, it will
be created and filled with the integers specified be fileds and indices for
each attribute before filter is called.

 Note that if both values and filters are non-NULL, (a) happens before (b).