summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/grammar
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-28 16:21:40 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 15:01:45 +0900
commit09cf28274166bdf8cccc945cbc3b4083af1f9c6c (patch)
tree4ef83774aefac8be324ed07da188f9dc87c768ca /src/lib/eolian_cxx/grammar
parent5d6a5343b7949daf2bdb5c24af8f7dac66519386 (diff)
cxx: Use per-function guards in efl object
This prevents generation of del(). I also removed constructor, finalize and destructor as I believe this requires special work with eo_inherit (where did this work go??).
Diffstat (limited to 'src/lib/eolian_cxx/grammar')
-rw-r--r--src/lib/eolian_cxx/grammar/class_definition.hpp3
-rw-r--r--src/lib/eolian_cxx/grammar/function_declaration.hpp11
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp
index e7bfaba54d..771121d8ee 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -134,7 +134,7 @@ struct class_definition_generator
134 << "(const_cast<" << string << " *>(this))); }\n" 134 << "(const_cast<" << string << " *>(this))); }\n"
135 ).generate(sink, cls.cxx_name, context)) 135 ).generate(sink, cls.cxx_name, context))
136 return false; 136 return false;
137 137
138 for (auto&& e : cls.events) 138 for (auto&& e : cls.events)
139 { 139 {
140 if (e.beta) 140 if (e.beta)
@@ -237,6 +237,7 @@ struct class_definition_generator
237 if(!as_generator( scope_tab << "using ::efl::eo::concrete::_eo_ptr;\n" 237 if(!as_generator( scope_tab << "using ::efl::eo::concrete::_eo_ptr;\n"
238 << scope_tab << "using ::efl::eo::concrete::_release;\n" 238 << scope_tab << "using ::efl::eo::concrete::_release;\n"
239 << scope_tab << "using ::efl::eo::concrete::_reset;\n" 239 << scope_tab << "using ::efl::eo::concrete::_reset;\n"
240 << scope_tab << "using ::efl::eo::concrete::_delete;\n"
240 << scope_tab << "using ::efl::eo::concrete::operator bool;\n" 241 << scope_tab << "using ::efl::eo::concrete::operator bool;\n"
241 ).generate(sink, attributes::unused, context)) return false; 242 ).generate(sink, attributes::unused, context)) return false;
242 243
diff --git a/src/lib/eolian_cxx/grammar/function_declaration.hpp b/src/lib/eolian_cxx/grammar/function_declaration.hpp
index 634642eabc..a2770abf18 100644
--- a/src/lib/eolian_cxx/grammar/function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/function_declaration.hpp
@@ -40,8 +40,12 @@ struct function_declaration_generator
40 } 40 }
41 41
42 if(f.is_beta && 42 if(f.is_beta &&
43 !as_generator("#ifdef " << *(string << "_") << string << "_" << string << "_BETA\n") 43 !as_generator("#ifdef " << *(string << "_") << string << "_BETA\n")
44 .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name, suffix), add_upper_case_context(ctx))) 44 .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
45 return false;
46 if(f.is_protected &&
47 !as_generator("#ifdef " << *(string << "_") << string << "_PROTECTED\n")
48 .generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
45 return false; 49 return false;
46 50
47 if(!as_generator 51 if(!as_generator
@@ -70,6 +74,9 @@ struct function_declaration_generator
70 .generate(sink, f.c_name, add_upper_case_context(ctx))) 74 .generate(sink, f.c_name, add_upper_case_context(ctx)))
71 return false; 75 return false;
72 76
77 if(f.is_protected &&
78 !as_generator("#endif\n").generate(sink, attributes::unused, ctx))
79 return false;
73 if(f.is_beta && 80 if(f.is_beta &&
74 !as_generator("#endif\n").generate(sink, attributes::unused, ctx)) 81 !as_generator("#endif\n").generate(sink, attributes::unused, ctx))
75 return false; 82 return false;