
6 changed files with 379 additions and 125 deletions
@ -1,18 +1,37 @@ |
|||
#ifndef ENUMS_H |
|||
#define ENUMS_H |
|||
|
|||
// typedeffed enum
|
|||
typedef enum _keys { |
|||
PIANO, |
|||
RHODES, |
|||
HAMMOND |
|||
} numbers; |
|||
|
|||
// untypedeffed enum
|
|||
enum _drums { |
|||
KICK, |
|||
SNARE, |
|||
TOM |
|||
// Covered combinations
|
|||
// ====================
|
|||
// _IE = incomplete enum without an alias
|
|||
// IE = incomplete enum
|
|||
// AIE = alias of an incomplete enum
|
|||
// _E = enum without an alias
|
|||
// E = enum
|
|||
// AE = alias of an enum
|
|||
|
|||
|
|||
// _IE = incomplete enum without anb alias
|
|||
enum _IE; |
|||
|
|||
// IE = incomplete enum
|
|||
// AIE = alias of an incomplete enum
|
|||
typedef enum IE AIE; |
|||
|
|||
// _E = enum without an alias
|
|||
enum _E { |
|||
_E1, |
|||
_E2, |
|||
_E3 |
|||
}; |
|||
|
|||
// E = enum
|
|||
// AE = alias of an enum
|
|||
typedef enum E { |
|||
E1, |
|||
E3, |
|||
E2, |
|||
} AE; |
|||
|
|||
|
|||
#endif //ENUMS_H
|
|||
|
@ -1,36 +1,108 @@ |
|||
#ifndef TYPEDEFS_H |
|||
#define TYPEDEFS_H |
|||
#include "structs.h" |
|||
#include "enums.h" |
|||
|
|||
// recursive typdefs resolving to primitive_struct data type
|
|||
// Type A,B,C are int
|
|||
typedef int A; |
|||
typedef A B; |
|||
typedef B C; |
|||
// Covered combinations
|
|||
// ====================
|
|||
//
|
|||
// typedef Void
|
|||
// ------------
|
|||
// TV = Typedef of Void
|
|||
//
|
|||
// typedef primitive
|
|||
// -------------------
|
|||
// TP = Typedef of primitive type
|
|||
//
|
|||
// typedef structs
|
|||
// ----------------
|
|||
// T_IS = typedef of an incomplete struct without a typedef (forward decl)
|
|||
// TIS = typedef of an incomplete struct
|
|||
// TAIS = typedef of an alias of an incomplete struct
|
|||
// T_PS = typedef of a primitive struct without a an alias
|
|||
// TPS = typedef of a primitive struct
|
|||
// TAPS = typedef of an Alias of primitive struct
|
|||
//
|
|||
// nested struct
|
|||
// T_NPS = typedef of a nested primitive struct without an alias
|
|||
// T_NNPS = typedef of a nested primitive struct without an alias
|
|||
//
|
|||
// (typedef) enum
|
|||
// ----------------
|
|||
// T_IE = typedef of an incomplete enum without an alias
|
|||
// TIE = typedef of an incomplete enum
|
|||
// TAIE = typedef of an alias of an incomplete enum
|
|||
// T_E = typedef of an enum without an alias
|
|||
// TE = typedef of an enum
|
|||
// TAE = typedef of an alias of an enum
|
|||
|
|||
// TT* = typedef of typedef of anything
|
|||
|
|||
// recursive typdefs resolving to struct
|
|||
// AS,BS,CS : aliased_struct
|
|||
typedef struct _aliased_struct { |
|||
int x; |
|||
} aliased_struct; |
|||
typedef aliased_struct AS; |
|||
typedef AS BS; |
|||
typedef BS CS; |
|||
|
|||
// typedef Void
|
|||
// ------------
|
|||
// TV = Typedef of Void
|
|||
typedef void TV; |
|||
|
|||
// recursive typdefs resolving to an enum
|
|||
// AE,BE,CE : aliased_enum
|
|||
typedef enum _aliased_enum { |
|||
ONE, |
|||
TWO |
|||
} aliased_enum; |
|||
typedef aliased_enum AE; |
|||
typedef AE BE; |
|||
typedef BE CE; |
|||
// typedef primitive
|
|||
// -------------------
|
|||
// TP = Typedef of primitive type
|
|||
typedef int TP; |
|||
|
|||
// typedef of incomplete type
|
|||
typedef struct _incomplete_struct incomplete; |
|||
// typedef structs
|
|||
// ----------------
|
|||
// T_IS = typedef of an incomplete struct without a typedef (forward decl)
|
|||
typedef struct _IS T_IS; |
|||
// TIS = typedef of an incomplete struct
|
|||
typedef struct IS TIS; |
|||
// TAIS = typedef of an alias of an incomplete struct
|
|||
typedef AIS TAIS; |
|||
// T_PS = typedef of a primitive struct without a an alias
|
|||
typedef struct _PS T_PS; |
|||
// TPS = typedef of a primitive struct
|
|||
typedef struct PS TPS; |
|||
// TAPS = typedef of an Alias of primitive struct
|
|||
typedef APS TAPS; |
|||
|
|||
// nested struct
|
|||
// T_NPS = typedef of a nested primitive struct without an alias
|
|||
typedef struct _NPS T_NPS; |
|||
// T_NNPS = typedef of a nested primitive struct without an alias
|
|||
typedef struct _NNPS T_NNPS; |
|||
|
|||
// (typedef) enum
|
|||
// ----------------
|
|||
// T_IE = typedef of an incomplete enum without an alias
|
|||
typedef enum _IE T_IE; |
|||
// TIE = typedef of an incomplete enum
|
|||
typedef enum IE TIE; |
|||
// TAIE = typedef of an alias of an incomplete enum
|
|||
typedef AIE TAIE; |
|||
// T_E = typedef of an enum without an alias
|
|||
typedef enum _E T_E; |
|||
// TE = typedef of an enum
|
|||
typedef enum E TE; |
|||
// TAE = typedef of an alias of an enum
|
|||
typedef AE TAE; |
|||
|
|||
|
|||
// TT* = typedef of all typedefs
|
|||
typedef TV TTV; |
|||
typedef TP TTP; |
|||
typedef T_IS TT_IS; |
|||
typedef TIS TTIS; |
|||
typedef TAIS TTAIS; |
|||
typedef T_PS TT_PS; |
|||
typedef TPS TTPS; |
|||
typedef TAPS TTAPS; |
|||
typedef T_NPS TT_NPS; |
|||
typedef T_NNPS TT_NNPS; |
|||
typedef T_IE TT_IE; |
|||
typedef TIE TTIE; |
|||
typedef TAIE TTAIE; |
|||
typedef T_E TT_E; |
|||
typedef TE TTE; |
|||
typedef TAE TTAE; |
|||
|
|||
#endif //TYPEDEFS_H
|
|||
|
|||
|
@ -0,0 +1,72 @@ |
|||
#ifndef VARS_H |
|||
#define VARS_H |
|||
|
|||
#include "typedefs.h" |
|||
#include "enums.h" |
|||
#include "structs.h" |
|||
|
|||
// Variables
|
|||
// =========
|
|||
// V = Void
|
|||
//void var_V;
|
|||
|
|||
// _P
|
|||
char b; |
|||
|
|||
// P
|
|||
int x; |
|||
|
|||
|
|||
// enums
|
|||
// =====
|
|||
// Incomplete types:
|
|||
// enum _IE var__IE;
|
|||
// enum IE var_IE;
|
|||
// AIE var_AIE;
|
|||
|
|||
enum _E var__E ; |
|||
enum E var_E; |
|||
AE var_AE; |
|||
|
|||
|
|||
// structs
|
|||
// =======
|
|||
// Incomplete types:
|
|||
// struct _IS var__IS;
|
|||
// struct IS var_IS;
|
|||
// AIS var_AIS;
|
|||
|
|||
struct _PS var__PS; |
|||
struct PS var_PS; |
|||
APS var_APS; |
|||
|
|||
struct _CS var__CS; |
|||
struct CS var_CS; |
|||
ACS var_ACS; |
|||
|
|||
struct _CCS var__CCS; |
|||
struct CCS var_CCS; |
|||
ACCS var_ACCS; |
|||
|
|||
struct _HS var__HS; |
|||
struct _NCS var__NCS; |
|||
|
|||
struct HS var_HS; |
|||
struct _NPS var__NSP; |
|||
AHS var_AHS; |
|||
|
|||
struct _HHS var__HHS; |
|||
struct _NHS var__NHS; |
|||
struct _NNPS var__NNPS; |
|||
|
|||
struct HHS var_HHS; |
|||
struct _NHS1 var__NHS1; |
|||
struct _NNCS var__NNCS; |
|||
enum _NENHS var__NENHS; |
|||
AHHS var_ASHS; |
|||
|
|||
struct _HS1 var__HS1; |
|||
enum _NEHS var_NEHS1; |
|||
|
|||
|
|||
#endif // VARS_H
|
Loading…
Reference in new issue