src/cdsa_types.h File Reference

Declares some typedefs for commonly used types. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef unsigned char byte
 A byte is an unsigned char.
typedef int(* cdsa_compare_func_t )(const void *const p1, const void *const p2)
 The type of functions that define the ordering of elements in a data structure by returning less than 0 if p1 is less than p2, 0 if they are equal, and greater than 0 if p1 is greater than p2.
typedef void(* cdsa_visit_func1_t )(const void *const elem)
 The type of functions for visiting elements of a container-like structure that stores single elements (as opposed to a map-like structure that contains pairs of elements).
typedef void(* cdsa_visit_map_func_t )(const void *const k, void *v)
 The type of functions for visiting (key, value) pairs of map-like structures.
typedef void(* cdsa_destroy_func1_t )(void *ptr)
 The type of destroy functions for container-like structures.
typedef void(* cdsa_destroy_map_func_t )(void *k, void *v)
 The type of destroy functions for map-like structures.

Enumerations

enum  cdsa_status_t {
  CDSA_SUCCESS, CDSA_NO_RESULT, CDSA_ERR, CDSA_INVALID_ARG_ERR,
  CDSA_NULL_ARG_ERR, CDSA_INVALID_STATE_ERR, CDSA_EMPTY_ERR, CDSA_ALLOC_ERR
}
 An enumeration of all return codes used by public functions of CDSA. More...


Detailed Description

Declares some typedefs for commonly used types.

Definition in file cdsa_types.h.


Typedef Documentation

The type of functions for visiting (key, value) pairs of map-like structures.

Keys should not be altered, but values may be changed unless otherwise noted.

Definition at line 71 of file cdsa_types.h.

The type of destroy functions for map-like structures.

It is passed a pointer to each (key, value) pair in the structure. The traversal order is unspecified unless otherwise noted.

Definition at line 87 of file cdsa_types.h.


Enumeration Type Documentation

An enumeration of all return codes used by public functions of CDSA.

Enumerator:
CDSA_SUCCESS  The success code.

CDSA_NO_RESULT  The code for not finding something when searching, etc.

(May be considered error or normal).

CDSA_ERR  Generic error code for when nothing more specific applies or is known.

CDSA_INVALID_ARG_ERR  Generic error code for a user-supplied arg being invalid in some way (other than being NULL).

CDSA_NULL_ARG_ERR  Error code for user-supplied arg being NULL when it shouldn't be.

CDSA_INVALID_STATE_ERR  Generic error code for user request on an object in a state that doesn't permit the operation.

CDSA_EMPTY_ERR  Generic error code denoting an invalid operation on an empty structure (e.g., pop off empty stack).

CDSA_ALLOC_ERR  Error code for when unable to allocate required memory.

Definition at line 27 of file cdsa_types.h.


Generated on Fri Jan 9 17:18:20 2009 for cdsa-0.1 by  doxygen 1.5.7.1