diff options
Diffstat (limited to 'src/lib/eolian_cxx/grammar/class_definition.hpp')
-rw-r--r-- | src/lib/eolian_cxx/grammar/class_definition.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp index e326c9d0e3..1e21336d9f 100644 --- a/src/lib/eolian_cxx/grammar/class_definition.hpp +++ b/src/lib/eolian_cxx/grammar/class_definition.hpp | |||
@@ -211,12 +211,17 @@ struct class_definition_generator | |||
211 | 211 | ||
212 | // EXPERIMENTAL | 212 | // EXPERIMENTAL |
213 | if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, attributes::unused, context)) return false; | 213 | if(!as_generator("#ifdef EFL_CXXPERIMENTAL\n").generate(sink, attributes::unused, context)) return false; |
214 | // For easy wref, operator-> in wref needs to also return a pointer type | ||
214 | if(!as_generator( scope_tab << "const " << string << "* operator->() const { return this; }\n" | 215 | if(!as_generator( scope_tab << "const " << string << "* operator->() const { return this; }\n" |
215 | ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false; | 216 | ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false; |
216 | if(!as_generator( scope_tab << string << "* operator->() { return this; }\n" | 217 | if(!as_generator( scope_tab << string << "* operator->() { return this; }\n" |
217 | ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false; | 218 | ).generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name), context)) return false; |
219 | // For easy interfacing with C: no need to use _eo_ptr() | ||
220 | if(!as_generator( scope_tab << "operator Eo*() const { return _eo_ptr(); }\n" | ||
221 | ).generate(sink, attributes::unused, context)) return false; | ||
218 | if(!as_generator("#endif \n").generate(sink, attributes::unused, context)) return false; | 222 | if(!as_generator("#endif \n").generate(sink, attributes::unused, context)) return false; |
219 | 223 | ||
224 | // eo_concrete | ||
220 | if(!as_generator( scope_tab << "::efl::eo::concrete const& _get_concrete() const { return *this; }\n" | 225 | if(!as_generator( scope_tab << "::efl::eo::concrete const& _get_concrete() const { return *this; }\n" |
221 | << scope_tab << "::efl::eo::concrete& _get_concrete() { return *this; }\n" | 226 | << scope_tab << "::efl::eo::concrete& _get_concrete() { return *this; }\n" |
222 | ).generate(sink, attributes::unused, context)) return false; | 227 | ).generate(sink, attributes::unused, context)) return false; |