Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

wbxml_lists.c File Reference

Generic Lists Functions. More...

#include "wbxml.h"

Include dependency graph for wbxml_lists.c:

Include dependency graph

Go to the source code of this file.

Compounds

struct  WBXMLList_s
struct  WBXMLListElt_s

Defines

#define wbxml_elt_create(a)   wbxml_mem_cleam(wbxml_elt_create_real(a))

Typedefs

typedef WBXMLListElt_s WBXMLListElt

Functions

WBXMLListEltwbxml_elt_create_real (void *item)
 Create a List Element.

void wbxml_elt_destroy (WBXMLListElt *elt, WBXMLListEltCleaner *destructor)
 Destroy a List Element.

WBXMLListwbxml_list_create_real (void)
 Create a List.

void wbxml_list_destroy (WBXMLList *list, WBXMLListEltCleaner *destructor)
 Destroy a List.

unsigned int wbxml_list_len (WBXMLList *list)
 Get list length.

unsigned char wbxml_list_append (WBXMLList *list, void *item)
 Append an element at end of list.

unsigned char wbxml_list_insert (WBXMLList *list, void *item, unsigned int pos)
void * wbxml_list_get (WBXMLList *list, unsigned int index)
void * wbxml_list_extract_first (WBXMLList *list)
 Extract first element of a List.


Detailed Description

Generic Lists Functions.

Author:
Aymerick Jéhanne <libwbxml@jehanne.org>
Date:
02/12/06

Definition in file wbxml_lists.c.


Define Documentation

#define wbxml_elt_create      wbxml_mem_cleam(wbxml_elt_create_real(a))
 

Definition at line 53 of file wbxml_lists.c.

Referenced by wbxml_list_append(), and wbxml_list_insert().


Typedef Documentation

typedef struct WBXMLListElt_s WBXMLListElt
 

Element of this list


Function Documentation

WBXMLListElt * wbxml_elt_create_real void *    item [static]
 

Create a List Element.

Parameters:
item Item of Element to create
Returns:
The newly created Element, or NULL if not enought memory
Warning:
Do NOT use this function directly, use wbxml_list_create() macro instead

Definition at line 231 of file wbxml_lists.c.

void wbxml_elt_destroy WBXMLListElt   elt,
WBXMLListEltCleaner   destructor
[static]
 

Destroy a List Element.

Parameters:
elt The element to destroy
destructor The Destructor Function to clean Element Item (can be NULL)

Definition at line 250 of file wbxml_lists.c.

Referenced by wbxml_list_destroy(), and wbxml_list_extract_first().

void* wbxml_list_get WBXMLList   list,
unsigned int    index
 

Definition at line 181 of file wbxml_lists.c.

References WBXMLList_s::head, WBXMLListElt_s::item, WBXMLListElt_s::next, NULL, WB_ULONG, and wbxml_list_len().

unsigned char wbxml_list_insert WBXMLList   list,
void *    item,
unsigned int    pos
 

Definition at line 131 of file wbxml_lists.c.

References FALSE, WBXMLList_s::head, WBXMLList_s::len, WBXMLListElt_s::next, NULL, WBXMLList_s::tail, TRUE, WB_BOOL, WB_ULONG, and wbxml_elt_create.


Generated on Mon Nov 24 20:09:45 2003 for WBXML Library by doxygen1.3-rc1