DCCL v4
sol_forward.hpp
1 // The MIT License (MIT)
2 
3 // Copyright (c) 2013-2018 Rapptz, ThePhD and contributors
4 
5 // Permission is hereby granted, free of charge, to any person obtaining a copy of
6 // this software and associated documentation files (the "Software"), to deal in
7 // the Software without restriction, including without limitation the rights to
8 // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 // the Software, and to permit persons to whom the Software is furnished to do so,
10 // subject to the following conditions:
11 
12 // The above copyright notice and this permission notice shall be included in all
13 // copies or substantial portions of the Software.
14 
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 
22 // This file was generated with a script.
23 // Generated 2018-11-28 08:50:22.827662 UTC
24 // This header was generated with sol v2.20.6 (revision 9b782ff)
25 // https://github.com/ThePhD/sol2
26 
27 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP
28 #define SOL_SINGLE_INCLUDE_FORWARD_HPP
29 
30 // beginning of sol/forward.hpp
31 
32 // beginning of sol/feature_test.hpp
33 
34 #if (defined(__cplusplus) && __cplusplus == 201703L) || (defined(_MSC_VER) && _MSC_VER > 1900 && ((defined(_HAS_CXX17) && _HAS_CXX17 == 1) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201402L))))
35 #ifndef SOL_CXX17_FEATURES
36 #define SOL_CXX17_FEATURES 1
37 #endif // C++17 features macro
38 #endif // C++17 features check
39 
40 #if defined(SOL_CXX17_FEATURES) && SOL_CXX17_FEATURES
41 #if defined(__cpp_noexcept_function_type) || ((defined(_MSC_VER) && _MSC_VER > 1911) && (defined(_MSVC_LANG) && ((_MSVC_LANG >= 201403L))))
42 #ifndef SOL_NOEXCEPT_FUNCTION_TYPE
43 #define SOL_NOEXCEPT_FUNCTION_TYPE 1
44 #endif // noexcept is part of a function's type
45 #endif // compiler-specific checks
46 #if defined(__clang__) && defined(__APPLE__)
47 #if defined(__has_include)
48 #if __has_include(<variant>)
49 #define SOL_STD_VARIANT 1
50 #endif // has include nonsense
51 #endif // __has_include
52 #else
53 #define SOL_STD_VARIANT 1
54 #endif // Clang screws up variant
55 #endif // C++17 only
56 
57 // beginning of sol/config.hpp
58 
59 #ifdef _MSC_VER
60  #if defined(_DEBUG) && !defined(NDEBUG)
61 
62  #ifndef SOL_IN_DEBUG_DETECTED
63  #define SOL_IN_DEBUG_DETECTED 1
64  #endif
65 
66  #endif // VC++ Debug macros
67 
68  #ifndef _CPPUNWIND
69  #ifndef SOL_NO_EXCEPTIONS
70  #define SOL_NO_EXCEPTIONS 1
71  #endif
72  #endif // Automatic Exceptions
73 
74  #ifndef _CPPRTTI
75  #ifndef SOL_NO_RTTI
76  #define SOL_NO_RTTI 1
77  #endif
78  #endif // Automatic RTTI
79 #elif defined(__GNUC__) || defined(__clang__)
80 
81  #if !defined(NDEBUG) && !defined(__OPTIMIZE__)
82 
83  #ifndef SOL_IN_DEBUG_DETECTED
84  #define SOL_IN_DEBUG_DETECTED 1
85  #endif
86 
87  #endif // Not Debug && g++ optimizer flag
88 
89  #ifndef __EXCEPTIONS
90  #ifndef SOL_NO_EXCEPTIONS
91  #define SOL_NO_EXCEPTIONS 1
92  #endif
93  #endif // No Exceptions
94 
95  #ifndef __GXX_RTTI
96  #ifndef SOL_NO_RTII
97  #define SOL_NO_RTTI 1
98  #endif
99  #endif // No RTTI
100 
101 #endif // vc++ || clang++/g++
102 
103 #if defined(SOL_CHECK_ARGUMENTS) && SOL_CHECK_ARGUMENTS
104 
105  // Checks low-level getter function
106  // (and thusly, affects nearly entire framework)
107  #if !defined(SOL_SAFE_GETTER)
108  #define SOL_SAFE_GETTER 1
109  #endif
110 
111  // Checks access on usertype functions
112  // local my_obj = my_type.new()
113  // my_obj.my_member_function()
114  // -- bad syntax and crash
115  #if !defined(SOL_SAFE_USERTYPE)
116  #define SOL_SAFE_USERTYPE 1
117  #endif
118 
119  // Checks sol::reference derived boundaries
120  // sol::function ref(L, 1);
121  // sol::userdata sref(L, 2);
122  #if !defined(SOL_SAFE_REFERENCES)
123  #define SOL_SAFE_REFERENCES 1
124  #endif
125 
126  // Changes all typedefs of sol::function to point to the
127  // protected_function version, instead of unsafe_function
128  #if !defined(SOL_SAFE_FUNCTION)
129  #define SOL_SAFE_FUNCTION 1
130  #endif
131 
132  // Checks function parameters and
133  // returns upon call into/from Lua
134  // local a = 1
135  // local b = "woof"
136  // my_c_function(a, b)
137  #if !defined(SOL_SAFE_FUNCTION_CALLS)
138  #define SOL_SAFE_FUNCTION_CALLS 1
139  #endif
140 
141  // Checks conversions
142  // int v = lua["bark"];
143  // int v2 = my_sol_function();
144  #if !defined(SOL_SAFE_PROXIES)
145  #define SOL_SAFE_PROXIES 1
146  #endif
147 
148  // Check overflowing number conversions
149  // for things like 64 bit integers that don't fit in a typical lua_Number
150  // for Lua 5.1 and 5.2
151  #if !defined(SOL_SAFE_NUMERICS)
152  #define SOL_SAFE_NUMERICS 1
153  #endif
154 
155  // Turn off Number Precision Checks
156  // if this is defined, we do not do range
157  // checks on integers / unsigned integers that might
158  // be bigger than what Lua can represent
159  #if !defined(SOL_NO_CHECK_NUMBER_PRECISION)
160  // off by default
161  #define SOL_NO_CHECK_NUMBER_PRECISION 0
162  #endif
163 
164 #endif // Turn on Safety for all if top-level macro is defined
165 
166 #if defined(SOL_IN_DEBUG_DETECTED) && SOL_IN_DEBUG_DETECTED
167 
168  #if !defined(SOL_SAFE_REFERENCES)
169  // Ensure that references are forcefully type-checked upon construction
170  #define SOL_SAFE_REFERENCES 1
171  #endif
172 
173  // Safe usertypes checks for errors such as
174  // obj = my_type.new()
175  // obj.f() -- note the '.' instead of ':'
176  // usertypes should be safe no matter what
177  #if !defined(SOL_SAFE_USERTYPE)
178  #define SOL_SAFE_USERTYPE 1
179  #endif
180 
181  #if !defined(SOL_SAFE_FUNCTION_CALLS)
182  // Function calls from Lua should be automatically safe in debug mode
183  #define SOL_SAFE_FUNCTION_CALLS 1
184  #endif
185 
186  // Print any exceptions / errors that occur
187  // in debug mode to the default error stream / console
188  #if !defined(SOL_PRINT_ERRORS)
189  #define SOL_PRINT_ERRORS 1
190  #endif
191 
192 #endif // DEBUG: Turn on all debug safety features for VC++ / g++ / clang++ and similar
193 
194 #if !defined(SOL_PRINT_ERRORS)
195 #define SOL_PRINT_ERRORS 0
196 #endif
197 
198 #if !defined(SOL_DEFAULT_PASS_ON_ERROR)
199 #define SOL_DEFAULT_PASS_ON_ERROR 0
200 #endif
201 
202 #if !defined(SOL_ENABLE_INTEROP)
203 #define SOL_ENABLE_INTEROP 0
204 #endif
205 
206 #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) || defined(__OBJC__) || defined(nil)
207 #if !defined(SOL_NO_NIL)
208 #define SOL_NO_NIL 1
209 #endif
210 #endif // avoiding nil defines / keywords
211 
212 #if defined(SOL_USE_BOOST) && SOL_USE_BOOST
213 #ifndef SOL_UNORDERED_MAP_COMPATIBLE_HASH
214 #define SOL_UNORDERED_MAP_COMPATIBLE_HASH 1
215 #endif // SOL_UNORDERED_MAP_COMPATIBLE_HASH
216 #endif
217 
218 #ifndef SOL_STACK_STRING_OPTIMIZATION_SIZE
219 #define SOL_STACK_STRING_OPTIMIZATION_SIZE 1024
220 #endif // Optimized conversion routines using a KB or so off the stack
221 
222 // end of sol/config.hpp
223 
224 // beginning of sol/config_setup.hpp
225 
226 // end of sol/config_setup.hpp
227 
228 // end of sol/feature_test.hpp
229 
230 namespace sol {
231 
232  template <bool b>
233  class basic_reference;
234  using reference = basic_reference<false>;
235  using main_reference = basic_reference<true>;
236  class stack_reference;
237 
238  struct proxy_base_tag;
239  template <typename Super>
240  struct proxy_base;
241  template <typename Table, typename Key>
242  struct proxy;
243 
244  template <typename T>
245  class usertype;
246  template <typename T>
247  class simple_usertype;
248  template <bool, typename T>
249  class basic_table_core;
250  template <bool b>
251  using table_core = basic_table_core<b, reference>;
252  template <bool b>
253  using main_table_core = basic_table_core<b, main_reference>;
254  template <bool b>
255  using stack_table_core = basic_table_core<b, stack_reference>;
256  template <typename T>
257  using basic_table = basic_table_core<false, T>;
258  typedef table_core<false> table;
259  typedef table_core<true> global_table;
260  typedef main_table_core<false> main_table;
261  typedef main_table_core<true> main_global_table;
262  typedef stack_table_core<false> stack_table;
263  typedef stack_table_core<true> stack_global_table;
264  template <typename base_t>
265  struct basic_environment;
266  using environment = basic_environment<reference>;
267  using main_environment = basic_environment<main_reference>;
268  using stack_environment = basic_environment<stack_reference>;
269  template <typename T, bool>
270  class basic_function;
271  template <typename T, bool, typename H>
272  class basic_protected_function;
273  using unsafe_function = basic_function<reference, false>;
274  using safe_function = basic_protected_function<reference, false, reference>;
275  using main_unsafe_function = basic_function<main_reference, false>;
276  using main_safe_function = basic_protected_function<main_reference, false, reference>;
277  using stack_unsafe_function = basic_function<stack_reference, false>;
278  using stack_safe_function = basic_protected_function<stack_reference, false, reference>;
279  using stack_aligned_unsafe_function = basic_function<stack_reference, true>;
280  using stack_aligned_safe_function = basic_protected_function<stack_reference, true, reference>;
281  using protected_function = safe_function;
282  using main_protected_function = main_safe_function;
283  using stack_protected_function = stack_safe_function;
284  using stack_aligned_protected_function = stack_aligned_safe_function;
285 #if defined(SOL_SAFE_FUNCTION) && SOL_SAFE_FUNCTION
286  using function = protected_function;
287  using main_function = main_protected_function;
288  using stack_function = stack_protected_function;
289 #else
290  using function = unsafe_function;
291  using main_function = main_unsafe_function;
292  using stack_function = stack_unsafe_function;
293 #endif
294  using stack_aligned_function = stack_aligned_unsafe_function;
295  using stack_aligned_stack_handler_function = basic_protected_function<stack_reference, true, stack_reference>;
296 
297  struct unsafe_function_result;
298  struct protected_function_result;
299  using safe_function_result = protected_function_result;
300 #if defined(SOL_SAFE_FUNCTION) && SOL_SAFE_FUNCTION
301  using function_result = safe_function_result;
302 #else
303  using function_result = unsafe_function_result;
304 #endif
305 
306  template <typename base_t>
307  class basic_object;
308  template <typename base_t>
309  class basic_userdata;
310  template <typename base_t>
311  class basic_lightuserdata;
312  template <typename base_t>
313  class basic_coroutine;
314  template <typename base_t>
315  class basic_thread;
316 
317  using object = basic_object<reference>;
318  using userdata = basic_userdata<reference>;
319  using lightuserdata = basic_lightuserdata<reference>;
320  using thread = basic_thread<reference>;
321  using coroutine = basic_coroutine<reference>;
322  using main_object = basic_object<main_reference>;
323  using main_userdata = basic_userdata<main_reference>;
324  using main_lightuserdata = basic_lightuserdata<main_reference>;
325  using main_coroutine = basic_coroutine<main_reference>;
326  using stack_object = basic_object<stack_reference>;
327  using stack_userdata = basic_userdata<stack_reference>;
328  using stack_lightuserdata = basic_lightuserdata<stack_reference>;
329  using stack_thread = basic_thread<stack_reference>;
330  using stack_coroutine = basic_coroutine<stack_reference>;
331 
332  struct stack_proxy_base;
333  struct stack_proxy;
334  struct variadic_args;
335  struct variadic_results;
336  struct stack_count;
337  struct this_state;
338  struct this_main_state;
339  struct this_environment;
340 
341  template <typename T>
342  struct as_table_t;
343  template <typename T>
344  struct as_container_t;
345  template <typename T>
346  struct nested;
347  template <typename T>
348  struct light;
349  template <typename T>
350  struct user;
351  template <typename T>
352  struct as_args_t;
353  template <typename T>
354  struct protect_t;
355  template <typename F, typename... Filters>
356  struct filter_wrapper;
357 
358  template <typename T>
359  struct usertype_traits;
360  template <typename T>
361  struct unique_usertype_traits;
362 } // namespace sol
363 
364 // end of sol/forward.hpp
365 
366 #endif // SOL_SINGLE_INCLUDE_FORWARD_HPP