gdsl  1.6
GDSL types

Typedefs

typedef void * gdsl_element_t
 GDSL element type.
typedef gdsl_element_t(* gdsl_alloc_func_t )(void *USER_DATA)
 GDSL Alloc element function type.
typedef void(* gdsl_free_func_t )(gdsl_element_t E)
 GDSL Free element function type.
typedef gdsl_element_t(* gdsl_copy_func_t )(const gdsl_element_t E)
 GDSL Copy element function type.
typedef int(* gdsl_map_func_t )(const gdsl_element_t E, gdsl_location_t LOCATION, void *USER_DATA)
 GDSL Map element function type.
typedef long int(* gdsl_compare_func_t )(const gdsl_element_t E, void *VALUE)
 GDSL Comparison element function type.
typedef void(* gdsl_write_func_t )(const gdsl_element_t E, FILE *OUTPUT_FILE, gdsl_location_t LOCATION, void *USER_DATA)
 GDSL Write element function type.
typedef unsigned long int ulong
typedef unsigned short int ushort

Enumerations

enum  gdsl_constant_t {
  GDSL_ERR_MEM_ALLOC = -1, GDSL_MAP_STOP = 0, GDSL_MAP_CONT = 1, GDSL_INSERTED,
  GDSL_FOUND
}
 GDSL Constants. More...
enum  gdsl_location_t {
  GDSL_LOCATION_UNDEF = 0, GDSL_LOCATION_HEAD = 1, GDSL_LOCATION_ROOT = 1, GDSL_LOCATION_TOP = 1,
  GDSL_LOCATION_TAIL = 2, GDSL_LOCATION_LEAF = 2, GDSL_LOCATION_BOTTOM = 2, GDSL_LOCATION_FIRST = 1,
  GDSL_LOCATION_LAST = 2, GDSL_LOCATION_FIRST_COL = 1, GDSL_LOCATION_LAST_COL = 2, GDSL_LOCATION_FIRST_ROW = 4,
  GDSL_LOCATION_LAST_ROW = 8
}
enum  bool { FALSE = 0, TRUE = 1 }

Typedef Documentation

typedef void* gdsl_element_t

GDSL element type.

All GDSL internal data structures contains a field of this type. This field is for GDSL users to store their data into GDSL data structures.

Definition at line 130 of file gdsl_types.h.

typedef gdsl_element_t(* gdsl_alloc_func_t)(void *USER_DATA)

GDSL Alloc element function type.

This function type is for allocating a new gdsl_element_t variable. The USER_DATA argument should be used to fill-in the new element.

Parameters:
USER_DATAuser data used to create the new element.
Returns:
the newly allocated element in case of success.
NULL in case of failure.
See also:
gdsl_free_func_t

Definition at line 144 of file gdsl_types.h.

typedef void(* gdsl_free_func_t)(gdsl_element_t E)

GDSL Free element function type.

This function type is for freeing a gdsl_element_t variable. The element must have been previously allocated by a function of gdsl_alloc_func_t type. A free function according to gdsl_free_func_t must free the ressources allocated by the corresponding call to the function of type gdsl_alloc_func_t. The GDSL functions doesn't check if E != NULL before calling this function.

Parameters:
EThe element to deallocate.
See also:
gdsl_alloc_func_t

Definition at line 162 of file gdsl_types.h.

GDSL Copy element function type.

This function type is for copying gdsl_element_t variables.

Parameters:
EThe gdsl_element_t variable to copy.
Returns:
the copied element in case of success.
NULL in case of failure.

Definition at line 175 of file gdsl_types.h.

typedef int(* gdsl_map_func_t)(const gdsl_element_t E, gdsl_location_t LOCATION, void *USER_DATA)

GDSL Map element function type.

This function type is for mapping a gdsl_element_t variable from a GDSL data structure. The optional USER_DATA could be used to do special thing if needed.

Parameters:
EThe actually mapped gdsl_element_t variable.
LOCATIONThe location of E in the data structure.
USER_DATAUser's datas.
Returns:
GDSL_MAP_STOP if the mapping must be stopped.
GDSL_MAP_CONT if the mapping must be continued.

Definition at line 192 of file gdsl_types.h.

typedef long int(* gdsl_compare_func_t)(const gdsl_element_t E, void *VALUE)

GDSL Comparison element function type.

This function type is used to compare a gdsl_element_t variable with a user value. The E argument is always the one in the GDSL data structure, VALUE is always the one the user wants to compare E with.

Parameters:
EThe gdsl_element_t variable contained into the data structure to compare from.
VALUEThe user data to compare E with.
Returns:
< 0 if E is assumed to be less than VALUE.
0 if E is assumed to be equal to VALUE.
> 0 if E is assumed to be greather than VALUE.

Definition at line 213 of file gdsl_types.h.

typedef void(* gdsl_write_func_t)(const gdsl_element_t E, FILE *OUTPUT_FILE, gdsl_location_t LOCATION, void *USER_DATA)

GDSL Write element function type.

This function type is for writing a gdsl_element_t E to OUTPUT_FILE. Additional USER_DATA could be passed to it.

Parameters:
EThe gdsl element to write.
OUTPUT_FILEThe file where to write E.
LOCATIONThe location of E in the data structure.
USER_DATAUser's datas.

Definition at line 229 of file gdsl_types.h.

typedef unsigned long int ulong

Definition at line 242 of file gdsl_types.h.

typedef unsigned short int ushort

Definition at line 246 of file gdsl_types.h.


Enumeration Type Documentation

GDSL Constants.

Enumerator:
GDSL_ERR_MEM_ALLOC 

Memory allocation error

GDSL_MAP_STOP 

For stopping a parsing function

GDSL_MAP_CONT 

For continuing a parsing function

GDSL_INSERTED 

To indicate an inserted value

GDSL_FOUND 

To indicate a founded value

Definition at line 48 of file gdsl_types.h.

Enumerator:
GDSL_LOCATION_UNDEF 

Element position undefined

GDSL_LOCATION_HEAD 

Element is at head position

GDSL_LOCATION_ROOT 

Element is on leaf position

GDSL_LOCATION_TOP 

Element is at top position

GDSL_LOCATION_TAIL 

Element is at tail position

GDSL_LOCATION_LEAF 

Element is on root position

GDSL_LOCATION_BOTTOM 

Element is at bottom position

GDSL_LOCATION_FIRST 

Element is the first

GDSL_LOCATION_LAST 

Element is the last

GDSL_LOCATION_FIRST_COL 

Element is on first column

GDSL_LOCATION_LAST_COL 

Element is on last column

GDSL_LOCATION_FIRST_ROW 

Element is on first row

GDSL_LOCATION_LAST_ROW 

Element is on last row

Definition at line 69 of file gdsl_types.h.

enum bool

GDSL boolean type. Defines _NO_LIBGDSL_TYPES_ at compilation time if you don't want them.

Enumerator:
FALSE 

FALSE boolean value

TRUE 

TRUE boolean value

Definition at line 267 of file gdsl_types.h.