Merge from subtype branch.
[cacao.git] / src / vm / assertion.hpp
1 /* src/vm/assertion.hpp - assertion options
2
3    Copyright (C) 2007, 2008
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 #ifndef _ASSERTION_HPP
27 #define _ASSERTION_HPP
28
29 #include "config.h"
30
31 #include <stdint.h>
32
33 #include "toolbox/list.hpp"
34
35
36 typedef struct assertion_name_t assertion_name_t;
37
38 struct assertion_name_t {
39         char      *name;
40         bool       enabled;
41         bool       package;
42 /*      listnode_t linkage; */
43 };
44
45 /* -ea/-esa/-da/-dsa options **************************************************/
46
47 #ifdef __cplusplus
48 extern List<assertion_name_t*>*   list_assertion_names;
49 #else
50 extern List*   list_assertion_names;
51 #endif
52
53 extern int32_t assertion_class_count;
54 extern int32_t assertion_package_count;
55 extern bool    assertion_user_enabled;
56 extern bool    assertion_system_enabled;
57
58 /* function prototypes ********************************************************/
59
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63
64 void assertion_ea_da(const char *name, bool enabled);
65
66 #ifdef __cplusplus
67 } // extern "C"
68 #endif
69
70 #endif // _ASSERTION_HPP
71
72
73 /*
74  * These are local overrides for various environment variables in Emacs.
75  * Please do not remove this and leave it at the end of the file, where
76  * Emacs will automagically detect them.
77  * ---------------------------------------------------------------------
78  * Local variables:
79  * mode: c++
80  * indent-tabs-mode: t
81  * c-basic-offset: 4
82  * tab-width: 4
83  * End:
84  * vim:noexpandtab:sw=4:ts=4:
85  */