DCCL v4
Loading...
Searching...
No Matches
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
230namespace sol {
231
232 template <bool b>
236 class stack_reference;
237
238 struct proxy_base_tag;
239 template <typename Super>
241 template <typename Table, typename Key>
242 struct proxy;
243
244 template <typename T>
245 class usertype;
246 template <typename T>
248 template <bool, typename T>
250 template <bool b>
252 template <bool b>
254 template <bool b>
256 template <typename T>
258 typedef table_core<false> table;
264 template <typename base_t>
269 template <typename T, bool>
271 template <typename T, bool, typename H>
285#if defined(SOL_SAFE_FUNCTION) && SOL_SAFE_FUNCTION
289#else
293#endif
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>
308 template <typename base_t>
310 template <typename base_t>
312 template <typename base_t>
314 template <typename base_t>
316
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>
343 template <typename 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>
357
358 template <typename T>
360 template <typename T>
362} // namespace sol
363
364// end of sol/forward.hpp
365
366#endif // SOL_SINGLE_INCLUDE_FORWARD_HPP