Defines | |
#define | xf_offs(a, b) ( (char *) (&((a)->b)) - (char *)(a) ) |
#define | XF_TYPE_EMPTY 0x00 |
default | |
#define | XF_TYPE_STR 0x01 |
String Type. | |
#define | XF_TYPE_FP 0x02 |
Floating Point Type. | |
#define | XF_TYPE_LONG 0x03 |
Long Integer Type. | |
#define | XF_TYPE_INT 0x04 |
Integer Type. | |
#define | XF_TYPE_BYTE 0x05 |
Byte Type. | |
#define | XF_TYPE_BOOLEAN 0x06 |
Boolean Type. | |
#define | XF_TYPE_OBJECT 0x07 |
Object Type. | |
#define | XF_TYPE_VEC 0x08 |
Vector Type i.e. variable number of elements. | |
#define | XF_TYPE_UNION 0x09 |
Union Type. | |
#define | XF_TYPE_REC 0x0A |
Structured Type. | |
#define | XF_TYPE_ARRAY 0x0B |
fixed length array | |
Typedefs | |
typedef xf_descr_list_s | xf_descr_list_t |
Class to describe object classes. | |
Functions | |
xf_descr_list_t * | xf_descr_list_new (int no, char *name) |
Constructor. | |
int | xf_descr_list_add (xf_descr_list_t *pd, int idx, int type, int size, int offs, int noffs, xf_descr_list_t *pl) |
Add member to the description list of a class (structure). |
#define xf_offs | ( | a, | |||
b | ) | ( (char *) (&((a)->b)) - (char *)(a) ) |
makro for computing offset from structure to member
typedef struct xf_descr_list_s xf_descr_list_t |
Class to describe object classes.
This structure contains the list of members of a class (structure)
int xf_descr_list_add | ( | xf_descr_list_t * | pd, | |
int | idx, | |||
int | type, | |||
int | size, | |||
int | offs, | |||
int | noffs, | |||
xf_descr_list_t * | pl | |||
) |
Add member to the description list of a class (structure).
pd | Description to add member | |
idx | Index position of member in object | |
type | Type specifier of member | |
size | Size of member | |
offs | Offset in byte from object start to member | |
noffs | Only for array, vector(list), union: offset to size or union member tag | |
pl | Only for complex type member: description list of member |
xf_descr_list_t* xf_descr_list_new | ( | int | no, | |
char * | name | |||
) |
Constructor.
create empty list for members of a structured type
no | number of members of object | |
name | name of description list |