1
+ // //////////////////////////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (c) 2025 RacoonStudios
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of this
5
+ // software and associated documentation files (the "Software"), to deal in the Software
6
+ // without restriction, including without limitation the rights to use, copy, modify, merge,
7
+ // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
8
+ // to whom the Software is furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in all copies or
11
+ // substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14
+ // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
15
+ // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
16
+ // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
+ // DEALINGS IN THE SOFTWARE.
19
+ // //////////////////////////////////////////////////////////////////////////////////////////////////
20
+
21
+
22
+ // [-------------------------------------------------------]
23
+ // [ Includes ]
24
+ // [-------------------------------------------------------]
25
+
26
+
27
+ // [-------------------------------------------------------]
28
+ // [ Forward declarations ]
29
+ // [-------------------------------------------------------]
30
+ #include " core/utility/invokable.h"
31
+
32
+
33
+ // [-------------------------------------------------------]
34
+ // [ Namespace ]
35
+ // [-------------------------------------------------------]
36
+ namespace core {
37
+
38
+
39
+ // [-------------------------------------------------------]
40
+ // [ Forward declarations ]
41
+ // [-------------------------------------------------------]
42
+
43
+
44
+ // [-------------------------------------------------------]
45
+ // [ Classes ]
46
+ // [-------------------------------------------------------]
47
+ template <typename TReturn, typename TObject, typename ... TArgs>
48
+ TReturn ClassMethod::call_direct (TObject* obj, TArgs... args) const {
49
+ typedef Invokable<TReturn, TObject*, TArgs...> InvokableType;
50
+ InvokableType* casted = (InvokableType*)mFunc ;
51
+ return casted->invoke (args...);
52
+ }
53
+
54
+
55
+ // [-------------------------------------------------------]
56
+ // [ Namespace ]
57
+ // [-------------------------------------------------------]
58
+ }
0 commit comments