ENV_SearchByClass

C Specification

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

Arguments

iter The resource iterator.
className The class name to search for.

Return Values

Returns a pointer to the resource if it was obtainable.
If the pointer is unobtainable, it returns a NULL.

Description

This function searches for and gets a resource that has a designated class 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.

(Example)
Below is an example of obtaining the resource with the specific class "className".

ENVResourceIter iter;
ENVResource* p;

ENV_InitIter( &iter );
while( (p = ENV_SearchByClass( &iter, "className" ) ) )
{
    OS_Printf( "resource = %s\n", p->name );
}

See Also

ENV_Init, ENV_InitIter
ENV_SearchByMember, ENV_SearchByType, ENV_SearchByPartialName

ENV_GetLastResourceSetForIter

Revision History

2005/08/18 Initial version.


CONFIDENTIAL