LAL  7.5.0.1-08ee4f4
LALList.c File Reference

Prototypes

LALListItem * XLALListItemAlloc (size_t size)
 
LALListItem * XLALListItemRealloc (LALListItem *item, size_t size)
 
LALListItem * XLALListItemSet (LALListItem *item, const void *data, size_t size, LALTYPECODE type)
 
LALListItem * XLALListItemSetValue (LALListItem *item, const LALValue *value)
 
LALListItem * XLALListItemDuplicate (const LALListItem *item)
 
const LALValue * XLALListItemGetValue (const LALListItem *item)
 
LALTYPECODE XLALListItemGetValueType (const LALListItem *item)
 
void * XLALListItemGetValueData (void *data, size_t size, LALTYPECODE type, const LALListItem *item)
 
void * XLALListItemGetBLOBValue (const LALListItem *item)
 
const char * XLALListItemGetStringValue (const LALListItem *item)
 
REAL8 XLALListItemGetValueAsREAL8 (const LALListItem *item)
 
void XLALDestroyList (LALList *list)
 
LALList * XLALCreateList (void)
 
LALList * XLALListDuplicate (const LALList *list)
 
int XLALListReverse (LALList *list)
 
static LALListItem * XLALListSortMerge (LALListItem *a, LALListItem *b, int(*cmp)(const LALValue *, const LALValue *, void *), void *thunk)
 
int XLALListSort (LALList *list, int(*cmp)(const LALValue *, const LALValue *, void *), void *thunk)
 
size_t XLALListSize (const LALList *list)
 
void XLALListForeach (LALList *list, void(*func)(LALValue *, void *), void *thunk)
 
LALListItem * XLALListPop (LALList *list)
 
LALListItem * XLALListLast (LALList *list)
 
LALListItem * XLALListFind (LALList *list, int(*func)(const LALValue *, void *), void *thunk)
 
static int XLALListFindValueFunc (const LALValue *value, void *thunk)
 
LALListItem * XLALListFindValue (LALList *list, const LALValue *value)
 
int XLALListReplace (LALList *list, int(*func)(const LALValue *, void *), void *thunk, const LALValue *replace)
 
int XLALListReplaceAll (LALList *list, int(*func)(const LALValue *, void *), void *thunk, const LALValue *replace)
 
int XLALListReplaceValue (LALList *list, const LALValue *value, const LALValue *replace)
 
int XLALListReplaceValueAll (LALList *list, const LALValue *value, const LALValue *replace)
 
int XLALListRemove (LALList *list, int(*func)(const LALValue *, void *), void *thunk)
 
int XLALListRemoveAll (LALList *list, int(*func)(const LALValue *, void *), void *thunk)
 
int XLALListRemoveValue (LALList *list, const LALValue *value)
 
int XLALListRemoveValueAll (LALList *list, const LALValue *value)
 
void XLALListIterInit (LALListIter *iter, LALList *list)
 
LALListItem * XLALListIterNext (LALListIter *iter)
 
int XLALListAdd (LALList *list, const void *data, size_t size, LALTYPECODE type)
 
int XLALListAddValue (LALList *list, const LALValue *value)
 
int XLALListAddBLOBValue (LALList *list, const void *blob, size_t size)
 
int XLALListAddStringValue (LALList *list, const char *string)
 
static void XLALListAsStringAppendValueFunc (LALValue *value, void *thunk)
 
char * XLALListAsStringAppend (char *s, LALList *list)
 
void XLALListPrint (LALList *list, int fd)
 

Go to the source code of this file.

Data Structures

struct  LALListItem
 
struct  LALList
 
struct  LALListAsStringAppendValueFuncParams
 

Macros

#define DEFINE_GET_FUNC(TYPE, FAILVAL)
 
#define DEFINE_ADD_FUNC(TYPE, TCODE)
 

Macro Definition Documentation

◆ DEFINE_GET_FUNC

#define DEFINE_GET_FUNC (   TYPE,
  FAILVAL 
)
Value:
TYPE XLALListItemGet ## TYPE ## Value(const LALListItem *item) \
{ \
const LALValue *value = XLALListItemGetValue(item); \
if (value == NULL) \
XLAL_ERROR_VAL(FAILVAL, XLAL_EFUNC); \
return XLALValueGet ## TYPE (value); \
}
#define TYPE
#define FAILVAL
const LALValue * XLALListItemGetValue(const LALListItem *item)
Definition: LALList.c:83
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
Definition: XLALError.h:462

Definition at line 121 of file LALList.c.

◆ DEFINE_ADD_FUNC

#define DEFINE_ADD_FUNC (   TYPE,
  TCODE 
)
Value:
int XLALListAdd ## TYPE ## Value (LALList *list, TYPE value) \
{ return XLALListAdd(list, &value, sizeof(value), TCODE); } \
#define TCODE
int XLALListAdd(LALList *list, const void *data, size_t size, LALTYPECODE type)
Definition: LALList.c:489

Definition at line 528 of file LALList.c.

Function Documentation

◆ XLALListItemAlloc()

LALListItem* XLALListItemAlloc ( size_t  size)

Definition at line 39 of file LALList.c.

◆ XLALListItemRealloc()

LALListItem* XLALListItemRealloc ( LALListItem *  item,
size_t  size 
)

Definition at line 49 of file LALList.c.

◆ XLALListItemSet()

LALListItem* XLALListItemSet ( LALListItem *  item,
const void *  data,
size_t  size,
LALTYPECODE  type 
)

Definition at line 60 of file LALList.c.

◆ XLALListItemSetValue()

LALListItem* XLALListItemSetValue ( LALListItem *  item,
const LALValue *  value 
)

Definition at line 67 of file LALList.c.

◆ XLALListItemDuplicate()

LALListItem* XLALListItemDuplicate ( const LALListItem *  item)

Definition at line 74 of file LALList.c.

◆ XLALListItemGetValue()

const LALValue* XLALListItemGetValue ( const LALListItem *  item)

Definition at line 83 of file LALList.c.

◆ XLALListItemGetValueType()

LALTYPECODE XLALListItemGetValueType ( const LALListItem *  item)

Definition at line 88 of file LALList.c.

◆ XLALListItemGetValueData()

void* XLALListItemGetValueData ( void *  data,
size_t  size,
LALTYPECODE  type,
const LALListItem *  item 
)

Definition at line 96 of file LALList.c.

◆ XLALListItemGetBLOBValue()

void* XLALListItemGetBLOBValue ( const LALListItem *  item)

Definition at line 104 of file LALList.c.

◆ XLALListItemGetStringValue()

const char* XLALListItemGetStringValue ( const LALListItem *  item)

Definition at line 113 of file LALList.c.

◆ XLALListItemGetValueAsREAL8()

REAL8 XLALListItemGetValueAsREAL8 ( const LALListItem *  item)

Definition at line 145 of file LALList.c.

◆ XLALDestroyList()

void XLALDestroyList ( LALList *  list)

Definition at line 155 of file LALList.c.

◆ XLALCreateList()

LALList* XLALCreateList ( void  )

Definition at line 169 of file LALList.c.

◆ XLALListDuplicate()

LALList* XLALListDuplicate ( const LALList *  list)

Definition at line 174 of file LALList.c.

◆ XLALListReverse()

int XLALListReverse ( LALList *  list)

Definition at line 198 of file LALList.c.

◆ XLALListSortMerge()

static LALListItem* XLALListSortMerge ( LALListItem *  a,
LALListItem *  b,
int(*)(const LALValue *, const LALValue *, void *)  cmp,
void *  thunk 
)
static

Definition at line 214 of file LALList.c.

◆ XLALListSort()

int XLALListSort ( LALList *  list,
int(*)(const LALValue *, const LALValue *, void *)  cmp,
void *  thunk 
)

Definition at line 233 of file LALList.c.

◆ XLALListSize()

size_t XLALListSize ( const LALList *  list)

Definition at line 268 of file LALList.c.

◆ XLALListForeach()

void XLALListForeach ( LALList *  list,
void(*)(LALValue *, void *)  func,
void *  thunk 
)

Definition at line 281 of file LALList.c.

◆ XLALListPop()

LALListItem* XLALListPop ( LALList *  list)

Definition at line 293 of file LALList.c.

◆ XLALListLast()

LALListItem* XLALListLast ( LALList *  list)

Definition at line 303 of file LALList.c.

◆ XLALListFind()

LALListItem* XLALListFind ( LALList *  list,
int(*)(const LALValue *, void *)  func,
void *  thunk 
)

Definition at line 314 of file LALList.c.

◆ XLALListFindValueFunc()

static int XLALListFindValueFunc ( const LALValue *  value,
void *  thunk 
)
static

Definition at line 328 of file LALList.c.

◆ XLALListFindValue()

LALListItem* XLALListFindValue ( LALList *  list,
const LALValue *  value 
)

Definition at line 334 of file LALList.c.

◆ XLALListReplace()

int XLALListReplace ( LALList *  list,
int(*)(const LALValue *, void *)  func,
void *  thunk,
const LALValue *  replace 
)

Definition at line 340 of file LALList.c.

◆ XLALListReplaceAll()

int XLALListReplaceAll ( LALList *  list,
int(*)(const LALValue *, void *)  func,
void *  thunk,
const LALValue *  replace 
)

Definition at line 372 of file LALList.c.

◆ XLALListReplaceValue()

int XLALListReplaceValue ( LALList *  list,
const LALValue *  value,
const LALValue *  replace 
)

Definition at line 405 of file LALList.c.

◆ XLALListReplaceValueAll()

int XLALListReplaceValueAll ( LALList *  list,
const LALValue *  value,
const LALValue *  replace 
)

Definition at line 411 of file LALList.c.

◆ XLALListRemove()

int XLALListRemove ( LALList *  list,
int(*)(const LALValue *, void *)  func,
void *  thunk 
)

Definition at line 417 of file LALList.c.

◆ XLALListRemoveAll()

int XLALListRemoveAll ( LALList *  list,
int(*)(const LALValue *, void *)  func,
void *  thunk 
)

Definition at line 438 of file LALList.c.

◆ XLALListRemoveValue()

int XLALListRemoveValue ( LALList *  list,
const LALValue *  value 
)

Definition at line 463 of file LALList.c.

◆ XLALListRemoveValueAll()

int XLALListRemoveValueAll ( LALList *  list,
const LALValue *  value 
)

Definition at line 469 of file LALList.c.

◆ XLALListIterInit()

void XLALListIterInit ( LALListIter *  iter,
LALList *  list 
)

Definition at line 475 of file LALList.c.

◆ XLALListIterNext()

LALListItem* XLALListIterNext ( LALListIter *  iter)

Definition at line 480 of file LALList.c.

◆ XLALListAdd()

int XLALListAdd ( LALList *  list,
const void *  data,
size_t  size,
LALTYPECODE  type 
)

Definition at line 489 of file LALList.c.

◆ XLALListAddValue()

int XLALListAddValue ( LALList *  list,
const LALValue *  value 
)

Definition at line 509 of file LALList.c.

◆ XLALListAddBLOBValue()

int XLALListAddBLOBValue ( LALList *  list,
const void *  blob,
size_t  size 
)

Definition at line 517 of file LALList.c.

◆ XLALListAddStringValue()

int XLALListAddStringValue ( LALList *  list,
const char *  string 
)

Definition at line 522 of file LALList.c.

◆ XLALListAsStringAppendValueFunc()

static void XLALListAsStringAppendValueFunc ( LALValue *  value,
void *  thunk 
)
static

Definition at line 549 of file LALList.c.

◆ XLALListAsStringAppend()

char* XLALListAsStringAppend ( char *  s,
LALList *  list 
)

Definition at line 560 of file LALList.c.

◆ XLALListPrint()

void XLALListPrint ( LALList *  list,
int  fd 
)

Definition at line 569 of file LALList.c.