summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2015-05-21 09:38:34 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-05-21 09:38:34 +0300
commit1941dae69589cac6aaf1c57a87c0eec8e95b8ef7 (patch)
treeb4e4032b9a485d2d19e3996f411c25bce5924c40 /src/bin/eolian_cxx
parentb7c89d23252d34c1d9efecc27dc835aa8df3c50d (diff)
Fix Eolian Cxx generator
Compilation was failing due to the changes in the Eolian library. The generator has not been updated. This patch fixes the compilation but not the tests that I let to my lovely q66.
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/convert.cc11
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh54
2 files changed, 7 insertions, 58 deletions
diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc
index 4f92b97d41..0b75183e5a 100644
--- a/src/bin/eolian_cxx/convert.cc
+++ b/src/bin/eolian_cxx/convert.cc
@@ -99,7 +99,7 @@ _convert_eolian_parameters(Eina_Iterator *parameters,
99 (static_cast<const Eolian_Function_Parameter*>(curr)); 99 (static_cast<const Eolian_Function_Parameter*>(curr));
100 list.push_back 100 list.push_back
101 ({ 101 ({
102 parameter_type(*id, func_type), 102 parameter_type(*id),
103 parameter_name(*id) 103 parameter_name(*id)
104 }); 104 });
105 } 105 }
@@ -146,12 +146,12 @@ _convert_property_set_to_function(Eolian_Class const& klass,
146 function_name(prop_) + "_set", 146 function_name(prop_) + "_set",
147 function_impl(prop_) + "_set", 147 function_impl(prop_) + "_set",
148 function_return_type(prop_, eolian_cxx::setter), 148 function_return_type(prop_, eolian_cxx::setter),
149 _convert_eolian_parameters(::eolian_function_parameters_get(&prop_), 149 _convert_eolian_parameters(::eolian_property_values_get(&prop_, EOLIAN_PROP_SET),
150 eolian_cxx::setter), 150 eolian_cxx::setter),
151 convert_comments_function(klass, prop_, eolian_cxx::setter) 151 convert_comments_function(klass, prop_, eolian_cxx::setter)
152 }; 152 };
153 efl::eolian::parameters_container_type keys = 153 efl::eolian::parameters_container_type keys =
154 _convert_eolian_parameters(::eolian_property_keys_get(&prop_), 154 _convert_eolian_parameters(::eolian_property_keys_get(&prop_, EOLIAN_PROP_SET),
155 eolian_cxx::setter); 155 eolian_cxx::setter);
156 if (!keys.empty()) 156 if (!keys.empty())
157 { 157 {
@@ -175,7 +175,8 @@ _convert_property_get_to_function(Eolian_Class const& klass,
175 function_name(prop_) + "_get", 175 function_name(prop_) + "_get",
176 function_impl(prop_) + "_get", 176 function_impl(prop_) + "_get",
177 function_return_type(prop_, eolian_cxx::getter), 177 function_return_type(prop_, eolian_cxx::getter),
178 _convert_eolian_parameters(prop_, eolian_cxx::getter), 178 _convert_eolian_parameters(::eolian_property_values_get(&prop_, EOLIAN_PROP_GET),
179 eolian_cxx::getter),
179 convert_comments_function(klass, prop_, eolian_cxx::getter) 180 convert_comments_function(klass, prop_, eolian_cxx::getter)
180 }; 181 };
181 182
@@ -202,7 +203,7 @@ _convert_property_get_to_function(Eolian_Class const& klass,
202 }); 203 });
203 } 204 }
204 efl::eolian::parameters_container_type keys = 205 efl::eolian::parameters_container_type keys =
205 _convert_eolian_parameters(::eolian_property_keys_get(&prop_), 206 _convert_eolian_parameters(::eolian_property_keys_get(&prop_, EOLIAN_PROP_GET),
206 eolian_cxx::getter); 207 eolian_cxx::getter);
207 if (!keys.empty()) 208 if (!keys.empty())
208 { 209 {
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index 0dd9890d68..9e7ba07fbd 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -328,42 +328,8 @@ parameter_is_out(Eolian_Function_Parameter const& parameter)
328 return direction == EOLIAN_OUT_PARAM || direction == EOLIAN_INOUT_PARAM; 328 return direction == EOLIAN_OUT_PARAM || direction == EOLIAN_INOUT_PARAM;
329} 329}
330 330
331inline bool
332parameter_is_const(Eolian_Function_Parameter const& parameter,
333 Eolian_Function_Type func_type)
334{
335 return ::eolian_parameter_const_attribute_get
336 (&parameter, property_is_getter(func_type));
337}
338
339inline bool
340parameter_is_const(Eolian_Function_Parameter const& parameter,
341 getter_t func_type)
342{
343 return ::eolian_parameter_const_attribute_get
344 (&parameter, property_is_getter(func_type.value));
345}
346
347inline bool
348parameter_is_const(Eolian_Function_Parameter const& parameter,
349 setter_t func_type)
350{
351 return ::eolian_parameter_const_attribute_get
352 (&parameter, property_is_getter(func_type.value));
353}
354
355inline bool
356parameter_is_const(Eolian_Function_Parameter const& parameter,
357 Eolian_Function const& func)
358{
359 assert(function_op_type(func) != EOLIAN_PROPERTY);
360 return ::eolian_parameter_const_attribute_get
361 (&parameter, property_is_getter(func));
362}
363
364inline efl::eolian::eolian_type_instance 331inline efl::eolian::eolian_type_instance
365parameter_type(Eolian_Function_Parameter const& parameter, 332parameter_type(Eolian_Function_Parameter const& parameter)
366 Eolian_Function_Type func_type = method_t::value)
367{ 333{
368 efl::eolian::eolian_type_instance type 334 efl::eolian::eolian_type_instance type
369 (type_lookup(::eolian_parameter_type_get(&parameter))); 335 (type_lookup(::eolian_parameter_type_get(&parameter)));
@@ -375,29 +341,11 @@ parameter_type(Eolian_Function_Parameter const& parameter,
375 type.is_out = true; 341 type.is_out = true;
376 type.front().native += "*"; 342 type.front().native += "*";
377 } 343 }
378 if (parameter_is_const(parameter, func_type))
379 {
380 type.front().native.insert(0, "const ");
381 if (!type.front().binding.empty())
382 type.front().binding.insert(0, "const ");
383 }
384 type.is_optional = ::eolian_parameter_is_optional(&parameter) || 344 type.is_optional = ::eolian_parameter_is_optional(&parameter) ||
385 ::eolian_parameter_is_nullable(&parameter); 345 ::eolian_parameter_is_nullable(&parameter);
386 return type; 346 return type;
387} 347}
388 348
389inline efl::eolian::eolian_type_instance
390parameter_type(Eolian_Function_Parameter const& parameter, getter_t func_type)
391{
392 return parameter_type(parameter, func_type.value);
393}
394
395inline efl::eolian::eolian_type_instance
396parameter_type(Eolian_Function_Parameter const& parameter, setter_t func_type)
397{
398 return parameter_type(parameter, func_type.value);
399}
400
401inline efl::eolian::eo_event 349inline efl::eolian::eo_event
402event_create(Eolian_Class const& klass, const Eolian_Event *event_) 350event_create(Eolian_Class const& klass, const Eolian_Event *event_)
403{ 351{