| Top |
| librdf_list * | librdf_new_list () |
| void | librdf_free_list () |
| void | librdf_list_clear () |
| int | librdf_list_add () |
| int | librdf_list_unshift () |
| void * | librdf_list_shift () |
| void * | librdf_list_pop () |
| void * | librdf_list_remove () |
| int | librdf_list_contains () |
| int | librdf_list_size () |
| void | librdf_list_set_equals () |
| librdf_iterator * | librdf_list_get_iterator () |
| void | librdf_list_foreach () |
librdf_list *
librdf_new_list (librdf_world *world);
Constructor - create a new librdf_list.
void
librdf_free_list (librdf_list *list);
Destructor - destroy a librdf_list object.
int librdf_list_add (librdf_list *list,void *data);
Add a data item to the end of a librdf_list.
Equivalent to the list 'push' notion, thus if librdf_list_pop()
is called after this, it will return the value added here.
int librdf_list_unshift (librdf_list *list,void *data);
Add a data item to the start of a librdf_list.
if librdf_list_shift() is called after this, it will return the value
added here.
void *
librdf_list_shift (librdf_list *list);
Remove and return the data at the start of the list.
void *
librdf_list_pop (librdf_list *list);
Remove and return the data at the end of the list.
void * librdf_list_remove (librdf_list *list,void *data);
Remove a data item from an librdf_list.
The search is done using the 'equals' function which may be set
by librdf_list_set_equals() or by straight comparison of pointers
if not set.
int librdf_list_contains (librdf_list *list,void *data);
Check for presence of data item in list.
The search is done using the 'equals' function which may be set
by librdf_list_set_equals() or by straight comparison of pointers
if not set.
void librdf_list_set_equals (librdf_list *list,int (*equals) (void* data1, void *data2));
Set the equals function for the list.
The function given is used when comparing items in the list
during searches such as those done in librdf_list_remove() or
librdf_list_contains().
librdf_iterator *
librdf_list_get_iterator (librdf_list *list);
Get an iterator for the list.
void librdf_list_foreach (librdf_list *list,void (*fn) (void *, void *),void *user_data);
Apply a function for each data item in a librdf_list.
list |
librdf_list object |
|
fn |
pointer to function to apply that takes data pointer and user data parameters |
|
user_data |
user data for applied function |