Find attributes for an object¶
ss_attr_find
is a function defined in ssattr.c.
Synopsis:
-
ss_attr_t *
ss_attr_find
(ss_pers_t *owner, const char *name, size_t nskip, size_t maxret, size_t *nret, ss_attr_t *result)¶
Formal Arguments:
owner
: The object for which we’re searching for attributes.name
: An optional attribute name on which to restrict the search.nskip
: Skip the firstSKIP
matching attributes.maxret
: Return at mostmaxret
matching attributes. If the caller passesSS_NOSIZE
then all matching attributes are returned. If more thanmaxret
attributes could be returned the remainder are simply discarded. Ifresult
is non-null then this argument should reflect the size of that array.nret [OUT]
: The number of attributes stored in the returned array of links.result
: An optional buffer in which to store links to the matching attributes. If supplied, this will be the successful return value. The constantSS_PERS_TEST
can be supplied in order to prevent the library from allocating a return value (this is useful if the caller simply wants to count the matches).
Description: This function finds all attributes for the persistent object owner
and returns handles to those attributes.
The returned array of handles can be restricted by supplying an attribute name which must match all returned
attributes. The SKIP
and maxret
arguments can select a contiguous subset of the available attributes.
Return Value: On success, returns an array of links to matching attributes; returns a null pointer on failure. If no
matching attributes are found then a non-null malloc’d pointer is returned and nret
points to zero. That is,
the case were no attributes match the search criteria is not considered an error.
Parallel Notes: Independent
See Also:
- Object Attributes: Introduction for current chapter