summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx/eolian_wrappers.hh
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-07-16 21:29:47 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2014-07-18 18:57:13 -0300
commit78e396ac19b203b0dbfb1a2b8d298177fffde9e4 (patch)
tree8281622f4881cf40a65167e3fa3e99d22f4563b3 /src/bin/eolian_cxx/eolian_wrappers.hh
parent88f12935278c9d3547da96b74e525402e2efd3f0 (diff)
eolian-cxx: Initial version of complex types / callbacks / events implementation.
Diffstat (limited to 'src/bin/eolian_cxx/eolian_wrappers.hh')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index e9a9ab99d6..79544286c6 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -180,8 +180,7 @@ function_type(Eolian_Function const& func)
180inline efl::eolian::eolian_type_instance 180inline efl::eolian::eolian_type_instance
181function_return_type(Eolian_Function const& func, Eolian_Function_Type func_type = method_t::value) 181function_return_type(Eolian_Function const& func, Eolian_Function_Type func_type = method_t::value)
182{ 182{
183 return type_lookup 183 return type_lookup(::eolian_function_return_type_get(&func, func_type));
184 (::eolian_function_return_type_get(&func, func_type));
185} 184}
186 185
187inline efl::eolian::eolian_type_instance 186inline efl::eolian::eolian_type_instance
@@ -286,11 +285,17 @@ parameter_type(Eolian_Function_Parameter const& parameter,
286 efl::eolian::eolian_type_instance type 285 efl::eolian::eolian_type_instance type
287 (type_lookup(::eolian_parameter_type_get(&parameter))); 286 (type_lookup(::eolian_parameter_type_get(&parameter)));
288 assert(!type.empty()); 287 assert(!type.empty());
289 // XXX implement complex types.
290 if (parameter_is_out(parameter)) 288 if (parameter_is_out(parameter))
291 type = { type_to_native(type) + "*" }; 289 {
290 type = { efl::eolian::type_to_native(type) };
291 type.front().native += "*";
292 }
292 if (parameter_is_const(parameter, func_type)) 293 if (parameter_is_const(parameter, func_type))
293 type.insert(0, "const "); 294 {
295 type[0].native.insert(0, "const ");
296 if (!type[0].binding.empty())
297 type[0].binding.insert(0, "const ");
298 }
294 return type; 299 return type;
295} 300}
296 301
@@ -311,7 +316,9 @@ event_create(Eolian_Class const& klass, const Eolian_Event *event_)
311{ 316{
312 efl::eolian::eo_event event; 317 efl::eolian::eo_event event;
313 const char *name, *comment; 318 const char *name, *comment;
314 if(::eolian_class_event_information_get(event_, &name, NULL, &comment)) 319 const Eolian_Type *type;
320 static_cast<void>(type); // XXX
321 if(::eolian_class_event_information_get(event_, &name, &type, &comment))
315 { 322 {
316 std::string name_ = safe_str(name); 323 std::string name_ = safe_str(name);
317 std::transform(name_.begin(), name_.end(), name_.begin(), 324 std::transform(name_.begin(), name_.end(), name_.begin(),