forked from enlightenment/efl
eolian_cxx: pass everything by ref
This commit is contained in:
parent
580aea04cd
commit
dc1ea844a7
|
@ -38,8 +38,8 @@ convert_eolian_parameters(Eina_List const* parameters,
|
||||||
(static_cast<const Eolian_Function_Parameter*>(curr));
|
(static_cast<const Eolian_Function_Parameter*>(curr));
|
||||||
list.push_back
|
list.push_back
|
||||||
({
|
({
|
||||||
parameter_type(id, func_type),
|
parameter_type(*id, func_type),
|
||||||
parameter_name(id)
|
parameter_name(*id)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -233,58 +233,58 @@ property_is_setter(Eolian_Function const& func)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string
|
inline std::string
|
||||||
parameter_name(Eolian_Function_Parameter const *& parameter)
|
parameter_name(Eolian_Function_Parameter const& parameter)
|
||||||
{
|
{
|
||||||
return safe_strshare(::eolian_parameter_name_get(parameter)) + "_";
|
return safe_strshare(::eolian_parameter_name_get(¶meter)) + "_";
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
parameter_is_out(Eolian_Function_Parameter const *& parameter)
|
parameter_is_out(Eolian_Function_Parameter const& parameter)
|
||||||
{
|
{
|
||||||
Eolian_Parameter_Dir direction;
|
Eolian_Parameter_Dir direction;
|
||||||
::eolian_parameter_information_get(parameter, &direction, NULL, NULL, NULL);
|
::eolian_parameter_information_get(¶meter, &direction, NULL, NULL, NULL);
|
||||||
return direction == EOLIAN_OUT_PARAM || direction == EOLIAN_INOUT_PARAM;
|
return direction == EOLIAN_OUT_PARAM || direction == EOLIAN_INOUT_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
parameter_is_const(Eolian_Function_Parameter const *& parameter,
|
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||||
Eolian_Function_Type func_type)
|
Eolian_Function_Type func_type)
|
||||||
{
|
{
|
||||||
return ::eolian_parameter_const_attribute_get
|
return ::eolian_parameter_const_attribute_get
|
||||||
(parameter, property_is_getter(func_type));
|
(¶meter, property_is_getter(func_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
parameter_is_const(Eolian_Function_Parameter const *& parameter,
|
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||||
getter_t func_type)
|
getter_t func_type)
|
||||||
{
|
{
|
||||||
return ::eolian_parameter_const_attribute_get
|
return ::eolian_parameter_const_attribute_get
|
||||||
(parameter, property_is_getter(func_type.value));
|
(¶meter, property_is_getter(func_type.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
parameter_is_const(Eolian_Function_Parameter const *& parameter,
|
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||||
setter_t func_type)
|
setter_t func_type)
|
||||||
{
|
{
|
||||||
return ::eolian_parameter_const_attribute_get
|
return ::eolian_parameter_const_attribute_get
|
||||||
(parameter, property_is_getter(func_type.value));
|
(¶meter, property_is_getter(func_type.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
parameter_is_const(Eolian_Function_Parameter const *& parameter,
|
parameter_is_const(Eolian_Function_Parameter const& parameter,
|
||||||
Eolian_Function const& func)
|
Eolian_Function const& func)
|
||||||
{
|
{
|
||||||
assert(function_type(func) != EOLIAN_PROPERTY);
|
assert(function_type(func) != EOLIAN_PROPERTY);
|
||||||
return ::eolian_parameter_const_attribute_get
|
return ::eolian_parameter_const_attribute_get
|
||||||
(parameter, property_is_getter(func));
|
(¶meter, property_is_getter(func));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline efl::eolian::eolian_type_instance
|
inline efl::eolian::eolian_type_instance
|
||||||
parameter_type(Eolian_Function_Parameter const *& parameter,
|
parameter_type(Eolian_Function_Parameter const& parameter,
|
||||||
Eolian_Function_Type func_type = method_t::value)
|
Eolian_Function_Type func_type = method_t::value)
|
||||||
{
|
{
|
||||||
efl::eolian::eolian_type_instance type
|
efl::eolian::eolian_type_instance type
|
||||||
(type_lookup(::eolian_parameter_type_get(parameter)));
|
(type_lookup(::eolian_parameter_type_get(¶meter)));
|
||||||
assert(!type.empty());
|
assert(!type.empty());
|
||||||
// XXX implement complex types.
|
// XXX implement complex types.
|
||||||
if (parameter_is_out(parameter))
|
if (parameter_is_out(parameter))
|
||||||
|
@ -295,13 +295,13 @@ parameter_type(Eolian_Function_Parameter const *& parameter,
|
||||||
}
|
}
|
||||||
|
|
||||||
inline efl::eolian::eolian_type_instance
|
inline efl::eolian::eolian_type_instance
|
||||||
parameter_type(Eolian_Function_Parameter const *& parameter, getter_t func_type)
|
parameter_type(Eolian_Function_Parameter const& parameter, getter_t func_type)
|
||||||
{
|
{
|
||||||
return parameter_type(parameter, func_type.value);
|
return parameter_type(parameter, func_type.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline efl::eolian::eolian_type_instance
|
inline efl::eolian::eolian_type_instance
|
||||||
parameter_type(Eolian_Function_Parameter const *& parameter, setter_t func_type)
|
parameter_type(Eolian_Function_Parameter const& parameter, setter_t func_type)
|
||||||
{
|
{
|
||||||
return parameter_type(parameter, func_type.value);
|
return parameter_type(parameter, func_type.value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue