data_structures
Data Structures | Typedefs | Functions | Variables
types.h File Reference
#include <stdlib.h>
#include "utils.h"
+ Include dependency graph for types.h:

Go to the source code of this file.

Data Structures

struct  s_type
 A full representation of a data type, used to achieve polymorphism in the implementation of data structures. More...
 

Typedefs

typedef struct s_type t_type
 

Functions

int * int2ptr (int a)
 Converts int to int* More...
 
char * char2ptr (char a)
 Converts char to char* More...
 
float * float2ptr (float a)
 Converts float to float* More...
 
int ptr2int (const void *ptr)
 Converts int* to int More...
 
char ptr2char (const void *ptr)
 Converts char* to char More...
 
float ptr2float (const void *ptr)
 Converts float* to float More...
 

Variables

const t_typeg_type_char
 A representation of the char data type. More...
 
const t_typeg_type_float
 A representation of the float data type. More...
 
const t_typeg_type_int
 A representation of the int data type. More...
 
const t_typeg_type_str
 A representation of the char* data type. More...
 
const t_typeg_type_array
 A representation of the t_array data type. More...
 

Function Documentation

◆ char2ptr()

char* char2ptr ( char  a)

Converts char to char*

Definition at line 24 of file data2ptr.c.

◆ float2ptr()

float* float2ptr ( float  a)

Converts float to float*

Definition at line 32 of file data2ptr.c.

◆ int2ptr()

int* int2ptr ( int  a)

Converts int to int*

Definition at line 16 of file data2ptr.c.

◆ ptr2char()

char ptr2char ( const void *  ptr)

Converts char* to char

Definition at line 26 of file ptr2data.c.

◆ ptr2float()

float ptr2float ( const void *  ptr)

Converts float* to float

Definition at line 21 of file ptr2data.c.

◆ ptr2int()

int ptr2int ( const void *  ptr)

Converts int* to int

Definition at line 16 of file ptr2data.c.

Variable Documentation

◆ g_type_array

const t_type* g_type_array

A representation of the t_array data type.

Definition at line 33 of file type_array.c.

◆ g_type_char

const t_type* g_type_char

A representation of the char data type.

Definition at line 54 of file type_char.c.

◆ g_type_float

const t_type* g_type_float

A representation of the float data type.

Definition at line 56 of file type_float.c.

◆ g_type_int

const t_type* g_type_int

A representation of the int data type.

Definition at line 56 of file type_int.c.

◆ g_type_str

const t_type* g_type_str

A representation of the char* data type.

Definition at line 51 of file type_str.c.