udbListEntityFilter

Description

Filter the specified list of entities, using the kinds specified, and return a new, allocated, array. Use udbListEntityFree() to free this list.

The original list is automatically freed, so the most common usage of this call is to specify the same entity list for both the input and output entity lists. For example:

udbListEntityFilter(myEnts, kinds, &myEnts, 
&myEntsSize); 

Syntax

#include “udb/udb.h” 
void  udbListEntityFilter(UdbEntity *ents,  
                         UdbKindList kinds,  
                          UdbEntity **newents, int *items) 

Arguments

Argument
Description
UdbEntity *ents
Original list of entities; allocated
UdbKindList kinds
If not NULL, entity kinds to filter; allocated
UdbEntity **newents
Return allocated array of entities
int *items
If not NULL, return size of list.

Return Values

There are no function return values.

Example Usage

udbListEntity(&list, NULL);        
udbKindList (“function”, &kinds );  
/* filter entity list to only specified kinds */
udbListEntityFilter(list, kinds, &funclist, &size);  
...
udbListEntityFree(funclist);       

See Also

udbEntityKind

udbLibraryFilterEntity

udbListEntity

udbListEntityFree

udbKindList

udbKindListCopy

udbKindListFree

udbKindLocate

udbKindParse

udbListReferenceFilter


Scientific Toolworks, Inc.
http://www.scitools.com