enum.h
Go to the documentation of this file.
1 
9 #ifndef _ENUM_H_
10 #define _ENUM_H_
11 
12 #include "vector.h"
13 
20 typedef struct EnumType {
22  int id;
24  char* str;
25 } EnumType;
26 
30 typedef struct Enum {
32  Vector(EnumType) enu;
33 } Enum;
34 
40 void freeEnumType(EnumType* enuty, int freeItself);
41 
47 void freeEnum(Enum* enu, int freeItself);
48 
49 #endif // _ENUM_H_
struct Enum Enum
Structure that defines the enumeration type.
Structure that contains an item of the enumeration.
Definition: enum.h:20
int id
The unique identifier of the value.
Definition: enum.h:22
char * str
The name of this item of the enumeration.
Definition: enum.h:24
Structure that defines the enumeration type.
Definition: enum.h:30
struct EnumType EnumType
Structure that contains an item of the enumeration.
Contains the definition of the vectors (dynamic & generic arrays)
#define Vector(t)
Define a dynamic and generic array.
Definition: vector.h:20
void freeEnum(Enum *enu, int freeItself)
Free the Enum.
Definition: enum.c:16
void freeEnumType(EnumType *enuty, int freeItself)
Free the EnumType.
Definition: enum.c:10