5325463e9e4abacd2f57ca0eb07cfbd3bf6a91e6
[cparser] / type.h
1 #ifndef TYPE_H
2 #define TYPE_H
3
4 #include <stdio.h>
5
6 typedef struct type_t                   type_t;
7 typedef struct atomic_type_t            atomic_type_t;
8 typedef struct pointer_type_t           pointer_type_t;
9 typedef struct method_parameter_type_t  method_parameter_type_t;
10 typedef struct method_type_t            method_type_t;
11 typedef struct compound_entry_t         compound_entry_t;
12 typedef struct compound_type_t          compound_type_t;
13
14 void init_type_module(void);
15 void exit_type_module(void);
16
17 /**
18  * prints a human readable form of @p type to a stream
19  */
20 void print_type(FILE* out, const type_t *type);
21
22 /**
23  * returns 1 if type contains integer numbers
24  */
25 int is_type_int(const type_t *type);
26
27 /**
28  * returns 1 if the type is valid. A type is valid if it contains no unresolved
29  * references anymore and is not of TYPE_INVALID.
30  */
31 int type_valid(const type_t *type);
32
33 #endif