summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-09-25 16:09:40 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-25 16:09:40 -0300
commit13de9d089c4e2dc7fd243915c1d7f95b47f58968 (patch)
tree9f4032c9a378f8352139d3d59b353be58517b589
parenta7560dbc61953c3652780f232e38adbd2d711972 (diff)
eolian-cxx: Get rid of class_prefix and related code.
This patch fixes the use of eolian_function_full_c_name_get API also.
-rw-r--r--src/bin/eolian_cxx/convert.cc11
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh14
2 files changed, 6 insertions, 19 deletions
diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc
index 2cf87256db..4e68b87f1c 100644
--- a/src/bin/eolian_cxx/convert.cc
+++ b/src/bin/eolian_cxx/convert.cc
@@ -76,12 +76,11 @@ static efl::eolian::eo_function
76_convert_property_set_to_function(Eolian_Class const& klass, 76_convert_property_set_to_function(Eolian_Class const& klass,
77 Eolian_Function const& prop_) 77 Eolian_Function const& prop_)
78{ 78{
79 std::string prefix(class_prefix(klass));
80 efl::eolian::eo_function set_ = 79 efl::eolian::eo_function set_ =
81 { 80 {
82 efl::eolian::eo_function::regular_, 81 efl::eolian::eo_function::regular_,
83 function_name(prop_) + "_set", 82 function_name(prop_) + "_set",
84 function_impl(prop_, prefix) + "_set", 83 function_impl(prop_) + "_set",
85 function_return_type(prop_, eolian_cxx::setter), 84 function_return_type(prop_, eolian_cxx::setter),
86 _convert_eolian_parameters(::eolian_function_parameters_get(&prop_), 85 _convert_eolian_parameters(::eolian_function_parameters_get(&prop_),
87 eolian_cxx::setter), 86 eolian_cxx::setter),
@@ -104,12 +103,11 @@ static efl::eolian::eo_function
104_convert_property_get_to_function(Eolian_Class const& klass, 103_convert_property_get_to_function(Eolian_Class const& klass,
105 Eolian_Function const& prop_) 104 Eolian_Function const& prop_)
106{ 105{
107 std::string prefix(class_prefix(klass));
108 efl::eolian::eo_function get_ = 106 efl::eolian::eo_function get_ =
109 { 107 {
110 efl::eolian::eo_function::regular_, 108 efl::eolian::eo_function::regular_,
111 function_name(prop_) + "_get", 109 function_name(prop_) + "_get",
112 function_impl(prop_, prefix) + "_get", 110 function_impl(prop_) + "_get",
113 function_return_type(prop_, eolian_cxx::getter), 111 function_return_type(prop_, eolian_cxx::getter),
114 _convert_eolian_parameters(prop_, eolian_cxx::getter), 112 _convert_eolian_parameters(prop_, eolian_cxx::getter),
115 convert_comments_function(klass, prop_, eolian_cxx::getter) 113 convert_comments_function(klass, prop_, eolian_cxx::getter)
@@ -209,7 +207,6 @@ convert_eolian_class_new(Eolian_Class const& klass)
209void 207void
210convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass) 208convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass)
211{ 209{
212 std::string prefix(class_prefix(klass));
213 efl::eina::iterator<const Eolian_Implement> itr = implements_get(klass); 210 efl::eina::iterator<const Eolian_Implement> itr = implements_get(klass);
214 efl::eina::iterator<const Eolian_Implement> end; 211 efl::eina::iterator<const Eolian_Implement> end;
215 212
@@ -241,7 +238,7 @@ convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass)
241 else if (function_is_constructor(klass, func)) 238 else if (function_is_constructor(klass, func))
242 { 239 {
243 cls.constructors.push_back({ 240 cls.constructors.push_back({
244 function_impl(func, class_prefix(icls)), 241 function_impl(func),
245 _convert_eolian_parameters(func), 242 _convert_eolian_parameters(func),
246 convert_comments_function(icls, func) 243 convert_comments_function(icls, func)
247 }); 244 });
@@ -251,7 +248,7 @@ convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass)
251 cls.functions.push_back({ 248 cls.functions.push_back({
252 function_type(func), 249 function_type(func),
253 function_name(func), 250 function_name(func),
254 function_impl(func, class_prefix(icls)), 251 function_impl(func),
255 function_return_type(func), 252 function_return_type(func),
256 _convert_eolian_parameters(func), 253 _convert_eolian_parameters(func),
257 convert_comments_function(icls, func, eolian_cxx::method) 254 convert_comments_function(icls, func, eolian_cxx::method)
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index 80efcd23e9..3dcb5e3c6b 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -101,16 +101,6 @@ class_format_cxx(std::string const& fullname)
101 return s; 101 return s;
102} 102}
103 103
104inline std::string
105class_prefix(Eolian_Class const& klass)
106{
107 std::string prefix = safe_lower(::eolian_class_eo_prefix_get(&klass));
108 if (prefix.empty())
109 prefix = safe_lower(find_replace(class_full_name(klass), ".", "_"));
110 assert(!prefix.empty());
111 return prefix;
112}
113
114inline efl::eolian::eo_class::eo_class_type 104inline efl::eolian::eo_class::eo_class_type
115class_type(Eolian_Class const& klass) 105class_type(Eolian_Class const& klass)
116{ 106{
@@ -176,9 +166,9 @@ function_name(Eolian_Function const& func)
176} 166}
177 167
178inline std::string 168inline std::string
179function_impl(Eolian_Function const& func, std::string const& prefix) 169function_impl(Eolian_Function const& func)
180{ 170{
181 const char *s = ::eolian_function_full_c_name_get(&func, prefix.c_str()); 171 const char *s = ::eolian_function_full_c_name_get(&func);
182 std::string ret(s); 172 std::string ret(s);
183 ::eina_stringshare_del(s); 173 ::eina_stringshare_del(s);
184 return ret; 174 return ret;