Qore Programming Language 0.8.8

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Restrictions.h
Go to the documentation of this file.
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3 Restrictions.h
4
5 QORE programming language
6
7 Copyright 2003 - 2013 David Nichols
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24 #ifndef _QORE_RESTRICTIONS_H
25
26 #define _QORE_RESTRICTIONS_H
27
32 #define PO_NO_GLOBAL_VARS (1 << 0)
33 #define PO_NO_SUBROUTINE_DEFS (1 << 1)
34 #define PO_NO_THREAD_CONTROL (1 << 2)
35 #define PO_NO_THREAD_CLASSES (1 << 3)
36 #define PO_NO_TOP_LEVEL_STATEMENTS (1 << 4)
37 #define PO_NO_CLASS_DEFS (1 << 5)
38 #define PO_NO_NAMESPACE_DEFS (1 << 6)
39 #define PO_NO_CONSTANT_DEFS (1 << 7)
40 #define PO_NO_NEW (1 << 8)
41 #define PO_NO_SYSTEM_CLASSES (1 << 9)
42 #define PO_NO_USER_CLASSES (1 << 10)
43 #define PO_NO_CHILD_PO_RESTRICTIONS (1 << 11)
44 #define PO_NO_EXTERNAL_PROCESS (1 << 12)
45 #define PO_REQUIRE_OUR (1 << 13)
46 #define PO_NO_PROCESS_CONTROL (1 << 14)
47 #define PO_NO_NETWORK (1 << 15)
48 #define PO_NO_FILESYSTEM (1 << 16)
49 #define PO_LOCK_WARNINGS (1 << 17)
50 #define PO_NO_DATABASE (1 << 18)
51 #define PO_NO_GUI (1 << 19)
52 #define PO_NO_TERMINAL_IO (1 << 20)
53 #define PO_REQUIRE_TYPES (1 << 21)
54 #define PO_NO_EXTERNAL_INFO (1 << 22)
55 #define PO_NO_THREAD_INFO (1 << 23)
56 #define PO_NO_LOCALE_CONTROL (1 << 24)
57 #define PO_REQUIRE_PROTOTYPES (1 << 25)
58 #define PO_STRICT_ARGS (1 << 26)
59 #define PO_REQUIRE_BARE_REFS (1 << 27)
60 #define PO_ASSUME_LOCAL (1 << 28)
61 #define PO_NO_MODULES (1 << 29)
62 #define PO_NO_INHERIT_USER_FUNC_VARIANTS (1 << 30)
63 #define PO_NO_SYSTEM_FUNC_VARIANTS (1LL << 31)
64 #define PO_NO_INHERIT_GLOBAL_VARS (1LL << 32)
65 #define PO_IN_MODULE (1LL << 33)
66 #define PO_NO_EMBEDDED_LOGIC (1LL << 34)
67 #define PO_STRICT_BOOLEAN_EVAL (1LL << 35)
68
69 #define PO_DEFAULT 0
70
71 #define PO_SYSTEM_OPS (PO_IN_MODULE)
73
75 #define PO_ALLOW_BARE_REFS PO_REQUIRE_BARE_REFS
76
77 // combination options
79 #define PO_NO_THREADS (PO_NO_THREAD_CONTROL|PO_NO_THREAD_CLASSES|PO_NO_THREAD_INFO)
80
82 #define PO_NO_EXTERNAL_ACCESS (PO_NO_PROCESS_CONTROL|PO_NO_NETWORK|PO_NO_FILESYSTEM|PO_NO_DATABASE|PO_NO_EXTERNAL_INFO|PO_NO_EXTERNAL_PROCESS|PO_NO_MODULES)
83
85 #define PO_NO_IO (PO_NO_GUI|PO_NO_TERMINAL_IO|PO_NO_FILESYSTEM|PO_NO_NETWORK|PO_NO_DATABASE)
86
88 #define PO_LOCKDOWN (PO_NO_EXTERNAL_ACCESS|PO_NO_THREADS|PO_NO_IO)
89
91 #define PO_NEW_STYLE (PO_ALLOW_BARE_REFS|PO_ASSUME_LOCAL)
92
94 #define PO_POSITIVE_OPTIONS (PO_NO_CHILD_PO_RESTRICTIONS)
95
97 #define PO_FREE_OPTIONS (PO_ALLOW_BARE_REFS|PO_ASSUME_LOCAL|PO_STRICT_BOOLEAN_EVAL)
98
100 #define PO_INHERITANCE_OPTIONS (PO_NO_SYSTEM_CLASSES|PO_NO_USER_CLASSES|PO_INHERIT_USER_FUNC_VARIANTS|PO_NO_SYSTEM_FUNC_VARIANTS|PO_INHERIT_GLOBAL_VARS)
101
102 #define QDOM_DEFAULT 0
103 #define QDOM_PROCESS PO_NO_PROCESS_CONTROL
104 #define QDOM_NETWORK PO_NO_NETWORK
105 #define QDOM_EXTERNAL_PROCESS PO_NO_EXTERNAL_PROCESS
106 #define QDOM_FILESYSTEM PO_NO_FILESYSTEM
107 #define QDOM_THREAD_CLASS PO_NO_THREAD_CLASSES
108 #define QDOM_THREAD_CONTROL PO_NO_THREAD_CONTROL
109 #define QDOM_DATABASE PO_NO_DATABASE
110 #define QDOM_GUI PO_NO_GUI
111 #define QDOM_TERMINAL_IO PO_NO_TERMINAL_IO
112 #define QDOM_EXTERNAL_INFO PO_NO_EXTERNAL_INFO
113 #define QDOM_THREAD_INFO PO_NO_THREAD_INFO
114 #define QDOM_LOCALE_CONTROL PO_NO_LOCALE_CONTROL
115 #define QDOM_MODULES PO_NO_MODULES
116 #define QDOM_IN_MODULE PO_IN_MODULE
117 #define QDOM_EMBEDDED_LOGIC PO_NO_EMBEDDED_LOGIC
118
119 #endif //_QORE_DOMAIN_H