summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/function_definition.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-16 16:26:13 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-26 10:55:18 -0300
commit429d7510b06d3b475b8b924fbf642ef4313f0b26 (patch)
tree298563af635d38381a4258e4b8b85d3a056017e8 /src/bin/eolian_mono/eolian/mono/function_definition.hh
parent628e5ab95029c222e5f2eca3fa9a3702015fb8c1 (diff)
efl_mono: Reorganize utility functions.
Summary: Blacklist functions are all in the header/namespace blacklist. Helper functions returning strings (names) are in the name_helpers header. They act somewhat like "mini-generators". Helpers.hh was left with other kind of helper functions (checks, etc) that do not return strings. Depends on D5992 Reviewers: felipealmeida Reviewed By: felipealmeida Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5993
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/function_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 4431ddc..14c7079 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -11,6 +11,7 @@
11#include "grammar/alternative.hpp" 11#include "grammar/alternative.hpp"
12#include "grammar/attribute_reorder.hpp" 12#include "grammar/attribute_reorder.hpp"
13#include "type.hh" 13#include "type.hh"
14#include "name_helpers.hh"
14#include "helpers.hh" 15#include "helpers.hh"
15#include "function_helpers.hh" 16#include "function_helpers.hh"
16#include "marshall_type.hh" 17#include "marshall_type.hh"
@@ -19,6 +20,7 @@
19#include "documentation.hh" 20#include "documentation.hh"
20#include "using_decl.hh" 21#include "using_decl.hh"
21#include "generation_contexts.hh" 22#include "generation_contexts.hh"
23#include "blacklist.hh"
22 24
23namespace eolian_mono { 25namespace eolian_mono {
24 26
@@ -29,7 +31,7 @@ struct native_function_definition_generator
29 template <typename OutputIterator, typename Context> 31 template <typename OutputIterator, typename Context>
30 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 32 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
31 { 33 {
32 if(is_function_blacklisted(f.c_name) || f.is_static) // Only Concrete classes implement static methods. 34 if(blacklist::is_function_blacklisted(f.c_name) || f.is_static) // Only Concrete classes implement static methods.
33 return true; 35 return true;
34 else 36 else
35 { 37 {
@@ -134,7 +136,7 @@ struct function_definition_generator
134 { 136 {
135 if(do_super && f.is_static) // Static methods goes only on Concrete classes. 137 if(do_super && f.is_static) // Static methods goes only on Concrete classes.
136 return true; 138 return true;
137 if(is_function_blacklisted(f.c_name)) 139 if(blacklist::is_function_blacklisted(f.c_name))
138 return true; 140 return true;
139 141
140 if(!as_generator 142 if(!as_generator
@@ -165,7 +167,7 @@ struct function_definition_generator
165 << ") {\n " 167 << ") {\n "
166 << eolian_mono::function_definition_preamble() << string << "(" 168 << eolian_mono::function_definition_preamble() << string << "("
167 << (do_super ? "efl.eo.Globals.efl_super(" : "") 169 << (do_super ? "efl.eo.Globals.efl_super(" : "")
168 << (f.is_static ? helpers::klass_get_name(f.klass) + "()": "this.raw_handle") 170 << (f.is_static ? name_helpers::klass_get_name(f.klass) + "()": "this.raw_handle")
169 << (do_super ? ", this.raw_klass)" : "") 171 << (do_super ? ", this.raw_klass)" : "")
170 << *(", " << argument_invocation ) << ");\n" 172 << *(", " << argument_invocation ) << ");\n"
171 << eolian_mono::function_definition_epilogue() 173 << eolian_mono::function_definition_epilogue()