list2.h File Reference

This file contains some macros concerning lists. More...

#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/misc.h>
#include <gwenhywfar/list.h>
#include <gwenhywfar/refptr.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define GWEN_CONSTLIST2_FUNCTION_DEFS(t, pr)   GWEN_CONSTLIST2_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG)
#define GWEN_CONSTLIST2_FUNCTION_LIB_DEFS(t, pr, decl)
#define GWEN_CONSTLIST2_FUNCTIONS(t, pr)
#define GWEN_LIST2_FUNCTION_DEFS(t, pr)   GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG)
#define GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, decl)
#define GWEN_LIST2_FUNCTIONS(t, pr)


Detailed Description

This file contains some macros concerning lists.

Definition in file list2.h.


Define Documentation

#define GWEN_CONSTLIST2_FUNCTION_DEFS ( t,
pr   )     GWEN_CONSTLIST2_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG)

Definition at line 265 of file list2.h.

#define GWEN_CONSTLIST2_FUNCTION_LIB_DEFS ( t,
pr,
decl   ) 

Value:

typedef struct t##_CONSTLIST2 t##_CONSTLIST2; \
  typedef struct t##_CONSTLIST2_ITERATOR t##_CONSTLIST2_ITERATOR; \
  typedef const t* (t##_CONSTLIST2_FOREACH)(const t *element, void *user_data); \
  \
  decl t##_CONSTLIST2 *pr##_ConstList2_new(); \
  decl void pr##_ConstList2_free(t##_CONSTLIST2 *l); \
  decl void pr##_ConstList2_PushBack(t##_CONSTLIST2 *l, const t *p); \
  decl void pr##_ConstList2_PushFront(t##_CONSTLIST2 *l, const t *p); \
  decl const t *pr##_ConstList2_GetFront(const t##_CONSTLIST2 *l); \
  decl const t *pr##_ConstList2_GetBack(const t##_CONSTLIST2 *l); \
  decl unsigned int pr##_ConstList2_GetSize(const t##_CONSTLIST2 *l); \
  decl int pr##_ConstList2_IsEmpty(const t##_CONSTLIST2 *l); \
  decl void pr##_ConstList2_PopBack(t##_CONSTLIST2 *l); \
  decl void pr##_ConstList2_PopFront(t##_CONSTLIST2 *l); \
  decl void pr##_ConstList2_Clear(t##_CONSTLIST2 *l); \
  decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2_First(const t##_CONSTLIST2 *l); \
  decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2_Last(const t##_CONSTLIST2 *l); \
  decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2Iterator_new(t##_CONSTLIST2 *l); \
  decl void pr##_ConstList2Iterator_free(t##_CONSTLIST2_ITERATOR *li); \
  decl const t *pr##_ConstList2Iterator_Previous(t##_CONSTLIST2_ITERATOR *li); \
  decl const t *pr##_ConstList2Iterator_Next(t##_CONSTLIST2_ITERATOR *li); \
  decl const t *pr##_ConstList2Iterator_Data(t##_CONSTLIST2_ITERATOR *li); \
  decl t##_CONSTLIST2_ITERATOR *pr##_ConstList2_FindIter(t##_CONSTLIST2 *l, const t *p); \
  decl const t *pr##_ConstList2_Contains(t##_CONSTLIST2 *l, const t *p); \
  decl void pr##_ConstList2_Remove(t##_CONSTLIST2 *l, const t *p); \
  decl const t *pr##_ConstList2_ForEach(t##_CONSTLIST2 *l, t##_CONSTLIST2_FOREACH, void *user_data);

Definition at line 234 of file list2.h.

#define GWEN_CONSTLIST2_FUNCTIONS ( t,
pr   ) 

Definition at line 269 of file list2.h.

#define GWEN_LIST2_FUNCTION_DEFS ( t,
pr   )     GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, GWEN_DUMMY_EMPTY_ARG)

This macro should be used in applications, not in libraries. In libraries please use the macro GWEN_LIST2_FUNCTION_LIB_DEFS.

Definition at line 92 of file list2.h.

#define GWEN_LIST2_FUNCTION_LIB_DEFS ( t,
pr,
decl   ) 

Definition at line 56 of file list2.h.

#define GWEN_LIST2_FUNCTIONS ( t,
pr   ) 

This macro actually implements the functions. Please use it in your source file (*.c) after the includes.

Definition at line 99 of file list2.h.


Generated on Thu Aug 20 13:54:41 2009 for gwenhywfar by  doxygen 1.5.9