ENV_SearchByMember

C Specification

#include <nitro/env.h>
ENVResource* ENV_SearchByMember(
ENVResourceIter* iter,
const char* memberName );

Arguments

iter The resource iterator.
memberName The member name to search for.

Return Values

Returns a pointer to the resource if it could be obtained. Returns a NULL if not.

Description

This function searches for and gets that resource that has the specified member name.

Be sure to prepare a resource iterator in advance and initialize it with ENV_InitIter(). By continuously searching with this iterator, you can successively obtain resources that match the conditions.

The member name does not include a period ("."). For example, when searching with the member name "member,"

"class.member"
"class.member.001"
"class.member.class"

all match, but

"class.member001"
"class.member2.member"

do not match.

Example:
Below is an example of obtaining the resource with the specific member "memberName".

ENVResourceIter iter;
ENVResource*    p;
 
ENV_InitIter( &iter );
while( (p = ENV_SearchByMember( &iter,
"memberName" )
 ) )
{
OS_Printf( "resource = %s\n", p->name );
}

See Also

ENV_Init, ENV_InitIter
ENV_SearchByClass, ENV_SearchByType, ENV_SearchByPartialName

ENV_GetLastResourceSetForIter

Revision History

08/18/2005 Initial version.