summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarroffel <therzog@mail.de>2017-06-21 02:26:06 +0200
committerKarroffel <therzog@mail.de>2017-06-21 02:26:06 +0200
commita3bcda958ea503ede07be35b46a6d983173d4b1c (patch)
treeb131c89a8acc31261a059a0f22373224f98cd4a6
parentab0854c8f2ea86f0ec3d4af7fb13a7e0435cbd15 (diff)
downloadredot-cpp-a3bcda958ea503ede07be35b46a6d983173d4b1c.tar.gz
implement registering const methods
fixes #6
-rw-r--r--include/core/Godot.hpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/core/Godot.hpp b/include/core/Godot.hpp
index 8ad8b37..ba86a5c 100644
--- a/include/core/Godot.hpp
+++ b/include/core/Godot.hpp
@@ -166,6 +166,12 @@ char *___get_method_class_name(R (T::*p)(args... a))
return T::___get_type_name();
}
+template<class T, class R, class ...args>
+char *___get_method_class_name(R (T::*p)(args... a) const)
+{
+ return T::___get_type_name();
+}
+
// wohooo, let the fun begin.
@@ -538,9 +544,18 @@ __godot_wrapper_method ___get_wrapper_function(R (T::*f)(A0, A1, A2, A3, A4))
return (__godot_wrapper_method) &_WrappedMethod5<T, R, A0, A1, A2, A3, A4>::__wrapped_method;
}
+template<class T, class R, class ...A>
+void *___make_wrapper_function(R (T::*f)(A...) const)
+{
+ return ___make_wrapper_function((R (T::*)(A...)) f);
+}
-
+template<class T, class R, class ...A>
+__godot_wrapper_method ___get_wrapper_function(R (T::*f)(A...) const)
+{
+ return ___get_wrapper_function((R (T::*)(A...)) f);
+}