LAL  7.5.0.1-08ee4f4
LALValue.c File Reference

Prototypes

LALValue * XLALValueAlloc (size_t size)
 
LALValue * XLALValueRealloc (LALValue *value, size_t size)
 
LALValue * XLALValueDuplicate (const LALValue *value)
 
LALValue * XLALValueCopy (LALValue *copy, const LALValue *orig)
 
LALValue * XLALValueSet (LALValue *value, const void *data, size_t size, LALTYPECODE type)
 
void XLALDestroyValue (LALValue *value)
 
LALValue * XLALCreateValue (const void *data, size_t size, LALTYPECODE type)
 
LALValue * XLALCreateBLOBValue (const void *blob, size_t size)
 
LALValue * XLALCreateStringValue (const char *string)
 
LALTYPECODE XLALValueGetType (const LALValue *value)
 
size_t XLALValueGetSize (const LALValue *value)
 
const void * XLALValueGetDataPtr (const LALValue *value)
 
void * XLALValueGetData (void *data, size_t size, LALTYPECODE type, const LALValue *value)
 
int XLALValueEqual (const LALValue *value1, const LALValue *value2)
 
void * XLALValueGetBLOB (const LALValue *value)
 
const char * XLALValueGetString (const LALValue *value)
 
REAL8 XLALValueGetAsREAL8 (const LALValue *value)
 
char * XLALValueAsStringAppend (char *s, const LALValue *value)
 
void XLALValuePrint (const LALValue *value, int fd)
 

Go to the source code of this file.

Macros

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

Macro Definition Documentation

◆ DEFINE_CREATE_FUNC

#define DEFINE_CREATE_FUNC (   TYPE,
  TCODE 
)
Value:
LALValue *XLALCreate ## TYPE ## Value(TYPE value) \
{ \
LALValue *v = XLALCreateValue(&value, sizeof(value), TCODE); \
if (v == NULL) \
XLAL_ERROR_NULL(XLAL_EFUNC); \
return v; \
}
#define TYPE
#define TCODE
LALValue * XLALCreateValue(const void *data, size_t size, LALTYPECODE type)
Definition: LALValue.c:128
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
Definition: XLALError.h:462

Definition at line 156 of file LALValue.c.

◆ DEFINE_GET_FUNC

#define DEFINE_GET_FUNC (   TYPE,
  TCODE,
  FAILVAL 
)
Value:
TYPE XLALValueGet ## TYPE (const LALValue *value) \
{ \
XLAL_CHECK_VAL(FAILVAL, value->type == TCODE, XLAL_ETYPE); \
return *(const TYPE *)(value->data); \
}
#define FAILVAL
@ XLAL_ETYPE
Wrong or unknown type.
Definition: XLALError.h:422

Definition at line 234 of file LALValue.c.

Function Documentation

◆ XLALValueAlloc()

LALValue* XLALValueAlloc ( size_t  size)

Definition at line 30 of file LALValue.c.

◆ XLALValueRealloc()

LALValue* XLALValueRealloc ( LALValue *  value,
size_t  size 
)

Definition at line 40 of file LALValue.c.

◆ XLALValueDuplicate()

LALValue* XLALValueDuplicate ( const LALValue *  value)

Definition at line 51 of file LALValue.c.

◆ XLALValueCopy()

LALValue* XLALValueCopy ( LALValue *  copy,
const LALValue *  orig 
)

Definition at line 60 of file LALValue.c.

◆ XLALValueSet()

LALValue* XLALValueSet ( LALValue *  value,
const void *  data,
size_t  size,
LALTYPECODE  type 
)

Definition at line 68 of file LALValue.c.

◆ XLALDestroyValue()

void XLALDestroyValue ( LALValue *  value)

Definition at line 122 of file LALValue.c.

◆ XLALCreateValue()

LALValue* XLALCreateValue ( const void *  data,
size_t  size,
LALTYPECODE  type 
)

Definition at line 128 of file LALValue.c.

◆ XLALCreateBLOBValue()

LALValue* XLALCreateBLOBValue ( const void *  blob,
size_t  size 
)

Definition at line 139 of file LALValue.c.

◆ XLALCreateStringValue()

LALValue* XLALCreateStringValue ( const char *  string)

Definition at line 147 of file LALValue.c.

◆ XLALValueGetType()

LALTYPECODE XLALValueGetType ( const LALValue *  value)

Definition at line 180 of file LALValue.c.

◆ XLALValueGetSize()

size_t XLALValueGetSize ( const LALValue *  value)

Definition at line 185 of file LALValue.c.

◆ XLALValueGetDataPtr()

const void* XLALValueGetDataPtr ( const LALValue *  value)

Definition at line 191 of file LALValue.c.

◆ XLALValueGetData()

void* XLALValueGetData ( void *  data,
size_t  size,
LALTYPECODE  type,
const LALValue *  value 
)

Definition at line 196 of file LALValue.c.

◆ XLALValueEqual()

int XLALValueEqual ( const LALValue *  value1,
const LALValue *  value2 
)

Definition at line 203 of file LALValue.c.

◆ XLALValueGetBLOB()

void* XLALValueGetBLOB ( const LALValue *  value)

Definition at line 210 of file LALValue.c.

◆ XLALValueGetString()

const char* XLALValueGetString ( const LALValue *  value)

Definition at line 223 of file LALValue.c.

◆ XLALValueGetAsREAL8()

REAL8 XLALValueGetAsREAL8 ( const LALValue *  value)

Definition at line 256 of file LALValue.c.

◆ XLALValueAsStringAppend()

char* XLALValueAsStringAppend ( char *  s,
const LALValue *  value 
)

Definition at line 313 of file LALValue.c.

◆ XLALValuePrint()

void XLALValuePrint ( const LALValue *  value,
int  fd 
)

Definition at line 392 of file LALValue.c.