Simple C Expat Wrapper (SCEW)  1.1.7
Modules | Files | Typedefs
Lists

This is a generic list implementation currenlty used by element's children and attributes, though, as a generic list, it can be used with any other type of data. More...

Modules

 Allocation
 Allocate and free new lists.
 
 Accessors
 Access lists' data and information.
 
 Modifiers
 Add and remove items from lists.
 
 Traverse
 Traverse list items.
 
 Search
 Search for list items.
 

Files

file  list.h
 SCEW general list implementation.
 
file  list.h
 SCEW general list implementation.
 

Typedefs

typedef struct scew_list scew_list
 This is the type delcaration for SCEW lists.
 
typedef void(* scew_list_hook )(scew_list *, void *)
 SCEW lists hooks (functions) are used by scew_list_foreach. More...
 
typedef scew_bool(* scew_cmp_hook )(void const *, void const *)
 SCEW lists comparison hooks are used by scew_list_find_custom. More...
 

Detailed Description

This is a generic list implementation currenlty used by element's children and attributes, though, as a generic list, it can be used with any other type of data.

Typedef Documentation

typedef void(* scew_list_hook)(scew_list *, void *)

SCEW lists hooks (functions) are used by scew_list_foreach.

The hook will be used to perform some custom action, defined by the hook, to every list item. These functions take two arguments, the list item where the action should be performed and an additional argument for any data that could be of use to the action.

Parameters
itemthe list item currently being traversed.
user_dataan optional user data pointer to be used by the hook (might be NULL).
typedef scew_bool(* scew_cmp_hook)(void const *, void const *)

SCEW lists comparison hooks are used by scew_list_find_custom.

The hook takes the two arguments to be compared (of the same type).

Returns
true if the given arguments are considered (by the provided comparison hook) equal, false otherwise.