1 /*******************************************************************************
2 *
3 * HEADER: type.h
4 *
5 ********************************************************************************
6 *
7 * DESCRIPTION: C::B::C type names
8 *
9 ********************************************************************************
10 *
11 * Copyright (c) 2002-2020 Marcus Holland-Moritz. All rights reserved.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the same terms as Perl itself.
14 *
15 *******************************************************************************/
16 
17 #ifndef _CBC_TYPE_H
18 #define _CBC_TYPE_H
19 
20 /*===== GLOBAL INCLUDES ======================================================*/
21 
22 
23 /*===== LOCAL INCLUDES =======================================================*/
24 
25 #include "ctlib/cttype.h"
26 #include "cbc/cbc.h"
27 #include "cbc/member.h"
28 
29 /*===== DEFINES ==============================================================*/
30 
31 #define ALLOW_UNIONS       0x00000001
32 #define ALLOW_STRUCTS      0x00000002
33 #define ALLOW_ENUMS        0x00000004
34 #define ALLOW_POINTERS     0x00000008
35 #define ALLOW_ARRAYS       0x00000010
36 #define ALLOW_BASIC_TYPES  0x00000020
37 
38 #define CBC_GMI_NO_CALC    0x1
39 
40 
41 /*===== TYPEDEFS =============================================================*/
42 
43 
44 /*===== FUNCTION PROTOTYPES ==================================================*/
45 
46 #define get_member_info CBC_get_member_info
47 int get_member_info(pTHX_ CBC *THIS, const char *name, MemberInfo *pMI, unsigned gmi_flags);
48 
49 #define get_type_spec CBC_get_type_spec
50 int get_type_spec(CBC *THIS, const char *name, const char **pEOS, TypeSpec *pTS);
51 
52 #define get_type_name_string CBC_get_type_name_string
53 SV *get_type_name_string(pTHX_ const MemberInfo *pMI);
54 
55 #define is_typedef_defined CBC_is_typedef_defined
56 int is_typedef_defined(Typedef *pTypedef);
57 
58 #define check_allowed_types_string CBC_check_allowed_types_string
59 const char *check_allowed_types_string(const MemberInfo *pMI, U32 allowed_types);
60 
61 #define check_allowed_types CBC_check_allowed_types
62 void check_allowed_types(pTHX_ const MemberInfo *pMI, const char *method, U32 allowed_types);
63 
64 #endif
65