C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
typedefs.h File Reference

Contains typedefs for all necessary data type and function pointers. More...

#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef char t_int8
 Typedefing Standard data types. More...
 
typedef unsigned char t_uint8
 
typedef short t_int16
 
typedef unsigned short t_uint16
 
typedef int t_int32
 
typedef unsigned int t_uint32
 
typedef float t_float
 
typedef double t_double
 
typedef enum data_types e_data_types
 Enum to create data structure of the following type. More...
 
typedef void * t_gen
 Base Data type used for all data structure and data elements. More...
 
typedef t_gen(* f_gen) (t_gen)
 Generic data pointer definitions that are common to most data structure operations. More...
 
typedef t_gen(* f_gen2) (t_gen, t_gen)
 fn ptr that takes two gen ptr and return gen ptr More...
 
typedef t_gen(* f_gen3) (t_gen, t_gen, t_gen)
 fn ptr that takes three gen ptr and return gen ptr More...
 
typedef void(* f_vgen) (t_gen)
 fn ptr that takes one gen ptr and return nothing More...
 
typedef void(* f_vgen2) (t_gen, t_gen)
 fn ptr that takes two gen ptr and return nothing More...
 
typedef t_gen(* f_genidx) (t_gen, int)
 fn ptr that takes one gen ptr, idx and return gen ptr More...
 
typedef bool(* f_empty) (t_gen)
 fn type of an empty function More...
 
typedef bool(* f_full) (t_gen)
 fn type of a full function More...
 
typedef int(* f_len) (t_gen)
 fn type of get len function More...
 
typedef f_vgen f_print
 fn type to print function More...
 
typedef f_vgen2 f_ins
 fn type of insert elem function More...
 
typedef f_gen2 f_del
 fn type of delete elem function More...
 
typedef f_gen2 f_find
 fn type of find a elem function More...
 
typedef f_vgen f_destroy
 fn type of destroy function More...
 
typedef f_genidx f_del_idx
 fn type of get elem at idx function More...
 
typedef f_genidx f_get_idx
 fn type of delete elem at idx function More...
 
typedef e_cmpr(* f_cmpr) (t_gen, t_gen)
 Basic operations required for generic data type support. More...
 
typedef void(* f_free) (t_gen, char *, int)
 
typedef f_vgen2 f_assign
 
typedef f_vgen2 f_swap
 
typedef e_cmpr(* f_cmp_idx) (t_gen, int, int)
 
typedef void(* f_swp_idx) (t_gen, int, int)
 
typedef void(* f_cpy_idx) (t_gen, int, t_gen)
 

Enumerations

enum  data_types {
  eINT8 , eUINT8 , eINT16 , eUINT16 ,
  eINT32 , eUINT32 , eFLOAT , eDOUBLE ,
  eSTRING , eGEN , eUSER
}
 Enum to create data structure of the following type. More...
 
enum  e_cmpr { eLESS =-1 , eEQUAL =0 , eGREAT =1 }
 Custom Compare function return type. More...
 

Detailed Description

Contains typedefs for all necessary data type and function pointers.

Definition in file typedefs.h.

Typedef Documentation

◆ e_data_types

typedef enum data_types e_data_types

Enum to create data structure of the following type.

◆ f_assign

typedef f_vgen2 f_assign

Definition at line 68 of file typedefs.h.

◆ f_cmp_idx

typedef e_cmpr(* f_cmp_idx) (t_gen, int, int)

Definition at line 71 of file typedefs.h.

◆ f_cmpr

typedef e_cmpr(* f_cmpr) (t_gen, t_gen)

Basic operations required for generic data type support.

Definition at line 66 of file typedefs.h.

◆ f_cpy_idx

typedef void(* f_cpy_idx) (t_gen, int, t_gen)

Definition at line 73 of file typedefs.h.

◆ f_del

typedef f_gen2 f_del

fn type of delete elem function

Definition at line 59 of file typedefs.h.

◆ f_del_idx

fn type of get elem at idx function

Definition at line 62 of file typedefs.h.

◆ f_destroy

typedef f_vgen f_destroy

fn type of destroy function

Definition at line 61 of file typedefs.h.

◆ f_empty

typedef bool(* f_empty) (t_gen)

fn type of an empty function

Definition at line 53 of file typedefs.h.

◆ f_find

typedef f_gen2 f_find

fn type of find a elem function

Definition at line 60 of file typedefs.h.

◆ f_free

typedef void(* f_free) (t_gen, char *, int)

Definition at line 67 of file typedefs.h.

◆ f_full

typedef bool(* f_full) (t_gen)

fn type of a full function

Definition at line 54 of file typedefs.h.

◆ f_gen

typedef t_gen(* f_gen) (t_gen)

Generic data pointer definitions that are common to most data structure operations.

fn ptr that takes one gen ptr and return gen ptr

Definition at line 46 of file typedefs.h.

◆ f_gen2

typedef t_gen(* f_gen2) (t_gen, t_gen)

fn ptr that takes two gen ptr and return gen ptr

Definition at line 47 of file typedefs.h.

◆ f_gen3

typedef t_gen(* f_gen3) (t_gen, t_gen, t_gen)

fn ptr that takes three gen ptr and return gen ptr

Definition at line 48 of file typedefs.h.

◆ f_genidx

typedef t_gen(* f_genidx) (t_gen, int)

fn ptr that takes one gen ptr, idx and return gen ptr

Definition at line 51 of file typedefs.h.

◆ f_get_idx

fn type of delete elem at idx function

Definition at line 63 of file typedefs.h.

◆ f_ins

typedef f_vgen2 f_ins

fn type of insert elem function

Definition at line 58 of file typedefs.h.

◆ f_len

typedef int(* f_len) (t_gen)

fn type of get len function

Definition at line 55 of file typedefs.h.

◆ f_print

typedef f_vgen f_print

fn type to print function

Definition at line 56 of file typedefs.h.

◆ f_swap

typedef f_vgen2 f_swap

Definition at line 69 of file typedefs.h.

◆ f_swp_idx

typedef void(* f_swp_idx) (t_gen, int, int)

Definition at line 72 of file typedefs.h.

◆ f_vgen

typedef void(* f_vgen) (t_gen)

fn ptr that takes one gen ptr and return nothing

Definition at line 49 of file typedefs.h.

◆ f_vgen2

typedef void(* f_vgen2) (t_gen, t_gen)

fn ptr that takes two gen ptr and return nothing

Definition at line 50 of file typedefs.h.

◆ t_double

typedef double t_double

Definition at line 16 of file typedefs.h.

◆ t_float

typedef float t_float

Definition at line 15 of file typedefs.h.

◆ t_gen

typedef void* t_gen

Base Data type used for all data structure and data elements.

Generic data pointer

Definition at line 41 of file typedefs.h.

◆ t_int16

typedef short t_int16

Definition at line 11 of file typedefs.h.

◆ t_int32

typedef int t_int32

Definition at line 13 of file typedefs.h.

◆ t_int8

typedef char t_int8

Typedefing Standard data types.

Definition at line 9 of file typedefs.h.

◆ t_uint16

typedef unsigned short t_uint16

Definition at line 12 of file typedefs.h.

◆ t_uint32

typedef unsigned int t_uint32

Definition at line 14 of file typedefs.h.

◆ t_uint8

typedef unsigned char t_uint8

Definition at line 10 of file typedefs.h.

Enumeration Type Documentation

◆ data_types

enum data_types

Enum to create data structure of the following type.

Enumerator
eINT8 
eUINT8 
eINT16 
eUINT16 
eINT32 
eUINT32 
eFLOAT 
eDOUBLE 
eSTRING 
eGEN 
eUSER 

Definition at line 19 of file typedefs.h.

◆ e_cmpr

enum e_cmpr

Custom Compare function return type.

Enumerator
eLESS 
eEQUAL 
eGREAT 

Definition at line 34 of file typedefs.h.