aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/eolian_mono/eolian/mono/function_registration.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/function_registration.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_registration.hh30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index 0b8da4a05a..78f2d718c7 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -20,10 +20,10 @@
namespace eolian_mono {
-template <typename I>
+// template <typename I>
struct function_registration_generator
{
- I index_generator;
+ // I index_generator;
attributes::klass_def const* klass;
template <typename OutputIterator, typename Context>
@@ -34,7 +34,7 @@ struct function_registration_generator
return true;
else
{
- auto index = index_generator();
+ // auto index = index_generator();
if(!as_generator(
scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
@@ -43,12 +43,13 @@ struct function_registration_generator
return false;
if(!as_generator
+ (scope_tab << scope_tab << "descs.Add(new Efl_Op_Description() {"
#ifdef _WIN32
- (scope_tab << scope_tab << "descs[" << index << "].api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\");\n"
+ << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")"
#else
- (scope_tab << scope_tab << "descs[" << index << "].api_func = Efl.Eo.Globals.dlsym(Efl.Eo.Globals.RTLD_DEFAULT, \"" << string << "\");\n"
+ << "api_func = Efl.Eo.Globals.dlsym(Efl.Eo.Globals.RTLD_DEFAULT, \"" << string << "\")"
#endif
- << scope_tab << scope_tab << "descs[" << index << "].func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate);\n"
+ ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n"
)
.generate(sink, std::make_tuple(f.c_name, f.c_name), context))
return false;
@@ -59,10 +60,9 @@ struct function_registration_generator
struct function_registration_parameterized
{
- template <typename I>
- function_registration_generator<I> operator()(I i, attributes::klass_def const& klass) const
+ function_registration_generator operator()(attributes::klass_def const& klass) const
{
- return {i, &klass};
+ return {&klass};
}
} const function_registration;
@@ -70,15 +70,15 @@ struct function_registration_parameterized
namespace efl { namespace eolian { namespace grammar {
-template <typename I>
-struct is_eager_generator< ::eolian_mono::function_registration_generator<I>> : std::true_type {};
-template <typename I>
-struct is_generator< ::eolian_mono::function_registration_generator<I>> : std::true_type {};
+template <>
+struct is_eager_generator< ::eolian_mono::function_registration_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::function_registration_generator> : std::true_type {};
namespace type_traits {
-template <typename I>
-struct attributes_needed< ::eolian_mono::function_registration_generator<I>> : std::integral_constant<int, 1> {};
+template <>
+struct attributes_needed< ::eolian_mono::function_registration_generator> : std::integral_constant<int, 1> {};
}
} } }