summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:42:51 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-12 16:42:51 -0300
commitaef69a6a9144b982a02c70570e876db44bee016d (patch)
treea313b0f4c44a2f9ac7f2ebad568878cc622078b6 /src/bin/eolian_cxx
parent3c900530911b8fb283201d323039e81b9f4390cd (diff)
eolian-cxx: Refactored Eolian_Function functions
Renamed function_type to function_op_type and added function_type with new semantics of returning if function is either regular or class-function.
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index 1a90c86173..1eec82bb50 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -181,11 +181,19 @@ function_impl(Eolian_Function const& func, std::string const& prefix)
181} 181}
182 182
183inline Eolian_Function_Type 183inline Eolian_Function_Type
184function_type(Eolian_Function const& func) 184function_op_type(Eolian_Function const& func)
185{ 185{
186 return ::eolian_function_type_get(&func); 186 return ::eolian_function_type_get(&func);
187} 187}
188 188
189inline efl::eolian::eo_function::eo_function_type
190function_type(Eolian_Function const& func)
191{
192 return ::eolian_function_is_class(&func)
193 ? efl::eolian::eo_function::class_
194 : efl::eolian::eo_function::regular_
195 ;
196}
189inline efl::eolian::eolian_type_instance 197inline efl::eolian::eolian_type_instance
190function_return_type(Eolian_Function const& func, Eolian_Function_Type func_type = method_t::value) 198function_return_type(Eolian_Function const& func, Eolian_Function_Type func_type = method_t::value)
191{ 199{
@@ -210,12 +218,6 @@ function_return_type(Eolian_Function const& func, method_t func_type)
210 return function_return_type(func, func_type.value); 218 return function_return_type(func, func_type.value);
211} 219}
212 220
213inline efl::eolian::eolian_type_instance
214function_return_type(Eolian_Function const& func, ctor_t func_type)
215{
216 return function_return_type(func, func_type.value);
217}
218
219inline bool 221inline bool
220function_return_is_explicit_void(Eolian_Function const& func, getter_t func_type) 222function_return_is_explicit_void(Eolian_Function const& func, getter_t func_type)
221{ 223{
@@ -236,7 +238,7 @@ property_is_getter(Eolian_Function_Type func_type)
236inline bool 238inline bool
237property_is_getter(Eolian_Function const& func) 239property_is_getter(Eolian_Function const& func)
238{ 240{
239 return property_is_getter(function_type(func)); 241 return property_is_getter(function_op_type(func));
240} 242}
241 243
242inline bool 244inline bool
@@ -248,7 +250,7 @@ property_is_setter(Eolian_Function_Type func_type)
248inline bool 250inline bool
249property_is_setter(Eolian_Function const& func) 251property_is_setter(Eolian_Function const& func)
250{ 252{
251 return property_is_setter(function_type(func)); 253 return property_is_setter(function_op_type(func));
252} 254}
253 255
254inline std::string 256inline std::string
@@ -292,7 +294,7 @@ inline bool
292parameter_is_const(Eolian_Function_Parameter const& parameter, 294parameter_is_const(Eolian_Function_Parameter const& parameter,
293 Eolian_Function const& func) 295 Eolian_Function const& func)
294{ 296{
295 assert(function_type(func) != EOLIAN_PROPERTY); 297 assert(function_op_type(func) != EOLIAN_PROPERTY);
296 return ::eolian_parameter_const_attribute_get 298 return ::eolian_parameter_const_attribute_get
297 (&parameter, property_is_getter(func)); 299 (&parameter, property_is_getter(func));
298} 300}