librdf_iterator_add_map

Name

librdf_iterator_add_map --  Add a librdf_iterator mapping function

Synopsis

int librdf_iterator_add_map (librdf_iterator* iterator, void* (*fn) (void *context, void *element), void * context);

Arguments

iterator

the iterator

fn

the function to operate

context

the context to pass to the map function

Description

Adds an iterator mapping function which operates over the iterator to select which elements are returned; it will be applied as soon as this method is called.

Several mapping functions can be added and they are applied in the order given

The mapping function should return non 0 to allow the element to be returned.

Return value

Non 0 on failure