forked from enlightenment/efl
eolian-cxx: Refactored eolian_cxx to cope with new Eolian API.
This commit is contained in:
parent
fa01f747a8
commit
6500c99669
|
@ -23,7 +23,7 @@ namespace eolian_cxx {
|
||||||
extern efl::eina::log_domain domain;
|
extern efl::eina::log_domain domain;
|
||||||
|
|
||||||
static efl::eolian::parameters_container_type
|
static efl::eolian::parameters_container_type
|
||||||
convert_eolian_parameters(Eina_Iterator *parameters,
|
_convert_eolian_parameters(Eina_Iterator *parameters,
|
||||||
Eolian_Function_Type func_type)
|
Eolian_Function_Type func_type)
|
||||||
{
|
{
|
||||||
if (parameters == NULL) return {};
|
if (parameters == NULL) return {};
|
||||||
|
@ -46,126 +46,113 @@ convert_eolian_parameters(Eina_Iterator *parameters,
|
||||||
}
|
}
|
||||||
|
|
||||||
static efl::eolian::parameters_container_type
|
static efl::eolian::parameters_container_type
|
||||||
convert_eolian_parameters(Eolian_Function const& func, getter_t func_type)
|
_convert_eolian_parameters(Eolian_Function const& func, getter_t func_type)
|
||||||
{
|
{
|
||||||
return convert_eolian_parameters
|
return _convert_eolian_parameters
|
||||||
(::eolian_function_parameters_get(&func), func_type.value);
|
(::eolian_function_parameters_get(&func), func_type.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static efl::eolian::parameters_container_type
|
static efl::eolian::parameters_container_type
|
||||||
convert_eolian_parameters(Eina_Iterator *parameters, getter_t func_type)
|
_convert_eolian_parameters(Eina_Iterator *parameters, getter_t func_type)
|
||||||
{
|
{
|
||||||
return convert_eolian_parameters(parameters, func_type.value);
|
return _convert_eolian_parameters(parameters, func_type.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static efl::eolian::parameters_container_type
|
static efl::eolian::parameters_container_type
|
||||||
convert_eolian_parameters(Eina_Iterator *parameters, setter_t func_type)
|
_convert_eolian_parameters(Eina_Iterator *parameters, setter_t func_type)
|
||||||
{
|
{
|
||||||
return convert_eolian_parameters(parameters, func_type.value);
|
return _convert_eolian_parameters(parameters, func_type.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static efl::eolian::parameters_container_type
|
static efl::eolian::parameters_container_type
|
||||||
convert_eolian_parameters(Eolian_Function const& func)
|
_convert_eolian_parameters(Eolian_Function const& func)
|
||||||
{
|
{
|
||||||
assert(function_type(func) != EOLIAN_PROPERTY);
|
assert(function_op_type(func) != EOLIAN_PROPERTY);
|
||||||
return convert_eolian_parameters
|
return _convert_eolian_parameters
|
||||||
(::eolian_function_parameters_get(&func), function_type(func));
|
(::eolian_function_parameters_get(&func), function_op_type(func));
|
||||||
}
|
}
|
||||||
|
|
||||||
static efl::eolian::functions_container_type
|
static efl::eolian::eo_function
|
||||||
convert_eolian_property_to_functions(Eolian_Class const& klass)
|
_convert_property_set_to_function(Eolian_Class const& klass,
|
||||||
|
Eolian_Function const& prop_)
|
||||||
{
|
{
|
||||||
efl::eolian::functions_container_type container;
|
|
||||||
std::string cxx_classname = safe_lower(class_name(klass));
|
|
||||||
Eina_Iterator *properties =
|
|
||||||
::eolian_class_functions_get(&klass, EOLIAN_PROPERTY); // XXX
|
|
||||||
void *curr;
|
|
||||||
std::string prefix(class_prefix(klass));
|
std::string prefix(class_prefix(klass));
|
||||||
EINA_ITERATOR_FOREACH(properties, curr)
|
efl::eolian::eo_function set_ =
|
||||||
{
|
{
|
||||||
Eolian_Function *prop_ = static_cast<Eolian_Function*>(curr);
|
efl::eolian::eo_function::regular_,
|
||||||
if (property_is_getter(*prop_))
|
function_name(prop_) + "_set",
|
||||||
{
|
function_impl(prop_, prefix) + "_set",
|
||||||
efl::eolian::parameters_container_type params
|
function_return_type(prop_, eolian_cxx::setter),
|
||||||
= convert_eolian_parameters(*prop_, eolian_cxx::getter);
|
_convert_eolian_parameters(::eolian_function_parameters_get(&prop_),
|
||||||
|
eolian_cxx::setter),
|
||||||
efl::eolian::eo_function get_;
|
convert_comments_function(klass, prop_, eolian_cxx::setter)
|
||||||
get_.type = efl::eolian::eo_function::regular_;
|
};
|
||||||
get_.name = function_name(*prop_) + "_get";
|
efl::eolian::parameters_container_type keys =
|
||||||
get_.impl = function_impl(*prop_, prefix) + "_get";
|
_convert_eolian_parameters(::eolian_property_keys_get(&prop_),
|
||||||
|
eolian_cxx::setter);
|
||||||
efl::eolian::eolian_type_instance ret =
|
if (!keys.empty())
|
||||||
function_return_type(*prop_, eolian_cxx::getter);
|
{
|
||||||
|
keys.reserve(keys.size() + set_.params.size());
|
||||||
// if the getter has a single parameter and a void return
|
keys.insert(keys.end(), set_.params.begin(),
|
||||||
// it is transformed into a getter with no parameters
|
set_.params.end());
|
||||||
// that actually returns what would be the first argument.
|
set_.params = keys;
|
||||||
if (params.size() == 1 && efl::eolian::type_is_void(ret) &&
|
|
||||||
!function_return_is_explicit_void(*prop_, eolian_cxx::getter))
|
|
||||||
{
|
|
||||||
get_.ret = params[0].type;
|
|
||||||
get_.params.clear();
|
|
||||||
}
|
|
||||||
else // otherwise just create the described getter
|
|
||||||
{
|
|
||||||
get_.ret = ret;
|
|
||||||
get_.params = params;
|
|
||||||
std::transform
|
|
||||||
(params.begin(), params.end(), get_.params.begin(),
|
|
||||||
[](efl::eolian::eo_parameter const& param)
|
|
||||||
{
|
|
||||||
efl::eolian::eolian_type getter_param_type =
|
|
||||||
type_to_native(param.type);
|
|
||||||
getter_param_type.native += "*";
|
|
||||||
return efl::eolian::eo_parameter
|
|
||||||
{ { getter_param_type }, param.name };
|
|
||||||
});
|
|
||||||
}
|
|
||||||
efl::eolian::parameters_container_type keys =
|
|
||||||
convert_eolian_parameters(::eolian_property_keys_get(prop_),
|
|
||||||
eolian_cxx::getter);
|
|
||||||
if (!keys.empty())
|
|
||||||
{
|
|
||||||
keys.reserve(keys.size() + get_.params.size());
|
|
||||||
keys.insert(keys.end(), get_.params.begin(),
|
|
||||||
get_.params.end());
|
|
||||||
get_.params = keys;
|
|
||||||
}
|
|
||||||
get_.comment = convert_comments_function(*prop_, eolian_cxx::getter);
|
|
||||||
container.push_back(get_);
|
|
||||||
}
|
|
||||||
if (property_is_setter(*prop_))
|
|
||||||
{
|
|
||||||
efl::eolian::eo_function set_;
|
|
||||||
set_.type = efl::eolian::eo_function::regular_;
|
|
||||||
set_.name = function_name(*prop_) + "_set";
|
|
||||||
set_.impl = function_impl(*prop_, prefix) + "_set";
|
|
||||||
efl::eolian::parameters_container_type keys =
|
|
||||||
convert_eolian_parameters(::eolian_property_keys_get(prop_),
|
|
||||||
eolian_cxx::setter);
|
|
||||||
efl::eolian::parameters_container_type params =
|
|
||||||
convert_eolian_parameters(::eolian_function_parameters_get(prop_),
|
|
||||||
eolian_cxx::setter);
|
|
||||||
set_.params = params;
|
|
||||||
if (!keys.empty())
|
|
||||||
{
|
|
||||||
keys.reserve(keys.size() + set_.params.size());
|
|
||||||
keys.insert(keys.end(), set_.params.begin(),
|
|
||||||
set_.params.end());
|
|
||||||
set_.params = keys;
|
|
||||||
}
|
|
||||||
set_.ret = function_return_type(*prop_, eolian_cxx::setter);
|
|
||||||
set_.comment = convert_comments_function(*prop_, eolian_cxx::setter);
|
|
||||||
container.push_back(set_);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
eina_iterator_free(properties);
|
return set_;
|
||||||
return container;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string get_class_name(std::string const& name)
|
static efl::eolian::eo_function
|
||||||
|
_convert_property_get_to_function(Eolian_Class const& klass,
|
||||||
|
Eolian_Function const& prop_)
|
||||||
|
{
|
||||||
|
std::string prefix(class_prefix(klass));
|
||||||
|
efl::eolian::eo_function get_ =
|
||||||
|
{
|
||||||
|
efl::eolian::eo_function::regular_,
|
||||||
|
function_name(prop_) + "_get",
|
||||||
|
function_impl(prop_, prefix) + "_get",
|
||||||
|
function_return_type(prop_, eolian_cxx::getter),
|
||||||
|
_convert_eolian_parameters(prop_, eolian_cxx::getter),
|
||||||
|
convert_comments_function(klass, prop_, eolian_cxx::getter)
|
||||||
|
};
|
||||||
|
|
||||||
|
// if the getter has a single parameter and a void return
|
||||||
|
// it is transformed into a getter with no parameters
|
||||||
|
// that actually returns what would be the first argument.
|
||||||
|
if (get_.params.size() == 1 && efl::eolian::type_is_void(get_.ret) &&
|
||||||
|
!function_return_is_explicit_void(prop_, eolian_cxx::getter))
|
||||||
|
{
|
||||||
|
get_.ret = get_.params[0].type;
|
||||||
|
get_.params.clear();
|
||||||
|
}
|
||||||
|
else // otherwise just create the described getter
|
||||||
|
{
|
||||||
|
std::transform
|
||||||
|
(get_.params.begin(), get_.params.end(), get_.params.begin(),
|
||||||
|
[](efl::eolian::eo_parameter const& param)
|
||||||
|
{
|
||||||
|
efl::eolian::eolian_type getter_param_type =
|
||||||
|
type_to_native(param.type);
|
||||||
|
getter_param_type.native += "*";
|
||||||
|
return efl::eolian::eo_parameter
|
||||||
|
{ { getter_param_type }, param.name };
|
||||||
|
});
|
||||||
|
}
|
||||||
|
efl::eolian::parameters_container_type keys =
|
||||||
|
_convert_eolian_parameters(::eolian_property_keys_get(&prop_),
|
||||||
|
eolian_cxx::getter);
|
||||||
|
if (!keys.empty())
|
||||||
|
{
|
||||||
|
keys.reserve(keys.size() + get_.params.size());
|
||||||
|
keys.insert(keys.end(), get_.params.begin(),
|
||||||
|
get_.params.end());
|
||||||
|
get_.params = keys;
|
||||||
|
}
|
||||||
|
return get_;
|
||||||
|
}
|
||||||
|
|
||||||
|
static std::string
|
||||||
|
_convert_class_name(std::string const& name)
|
||||||
{
|
{
|
||||||
// "eo_base" is the Eolian name for EO_BASE_CLASS.
|
|
||||||
return (name == "eo_base" || name == "eo::base" || name == "")
|
return (name == "eo_base" || name == "eo::base" || name == "")
|
||||||
? "efl::eo::base"
|
? "efl::eo::base"
|
||||||
: name;
|
: name;
|
||||||
|
@ -188,102 +175,17 @@ convert_eolian_inheritances(efl::eolian::eo_class& cls, Eolian_Class const& klas
|
||||||
{
|
{
|
||||||
// First element is the parent
|
// First element is the parent
|
||||||
const char *ptr = static_cast<const char*>(curr);
|
const char *ptr = static_cast<const char*>(curr);
|
||||||
cls.parent = get_class_name(class_format_cxx(safe_lower(ptr)));
|
cls.parent = _convert_class_name(class_format_cxx(safe_lower(ptr)));
|
||||||
|
|
||||||
EINA_ITERATOR_FOREACH(inheritances, curr)
|
EINA_ITERATOR_FOREACH(inheritances, curr)
|
||||||
{
|
{
|
||||||
std::string extension = safe_lower(static_cast<const char*>(curr));
|
std::string extension = safe_lower(static_cast<const char*>(curr));
|
||||||
cls.extensions.push_back(get_class_name(class_format_cxx(extension)));
|
cls.extensions.push_back(_convert_class_name(class_format_cxx(extension)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eina_iterator_free(inheritances);
|
eina_iterator_free(inheritances);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
|
||||||
{
|
|
||||||
std::string prefix(class_prefix(klass));
|
|
||||||
Eina_Iterator *itr = ::eolian_class_implements_get(&klass);
|
|
||||||
void *impl_desc_;
|
|
||||||
|
|
||||||
EINA_ITERATOR_FOREACH(itr, impl_desc_)
|
|
||||||
{
|
|
||||||
const Eolian_Implement *impl_desc = static_cast<Eolian_Implement*>(impl_desc_);
|
|
||||||
const Eolian_Class *impl_class = eolian_implement_class_get(impl_desc);
|
|
||||||
Eolian_Function_Type impl_type;
|
|
||||||
const Eolian_Function *impl_func = eolian_implement_function_get(impl_desc, &impl_type);
|
|
||||||
/* fixme */
|
|
||||||
if (eolian_function_is_constructing(impl_func))
|
|
||||||
{
|
|
||||||
efl::eolian::eo_constructor constructor;
|
|
||||||
std::string parent = safe_lower(eolian_class_full_name_get(impl_class));
|
|
||||||
if (parent == "eo_base" || parent == "eo.base") parent = "eo";
|
|
||||||
constructor.name = parent + "_" + function_name(*impl_func);
|
|
||||||
constructor.params = convert_eolian_parameters(*impl_func);
|
|
||||||
constructor.comment = convert_comments_function(*impl_func, eolian_cxx::ctor);
|
|
||||||
cls.constructors.push_back(constructor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
eina_iterator_free(itr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
convert_eolian_constructors(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
|
||||||
{
|
|
||||||
void *curr;
|
|
||||||
std::string prefix(class_prefix(klass));
|
|
||||||
Eina_Iterator *constructors =
|
|
||||||
::eolian_class_functions_get(&klass, EOLIAN_METHOD);
|
|
||||||
EINA_ITERATOR_FOREACH(constructors, curr)
|
|
||||||
{
|
|
||||||
Eolian_Function *eo_constructor = static_cast<Eolian_Function*>(curr);
|
|
||||||
/* fixme */
|
|
||||||
if (!eolian_function_is_constructing(eo_constructor))
|
|
||||||
continue;
|
|
||||||
efl::eolian::eo_constructor constructor;
|
|
||||||
constructor.name = function_impl(*eo_constructor, prefix);
|
|
||||||
constructor.params = convert_eolian_parameters(*eo_constructor);
|
|
||||||
constructor.comment = convert_comments_function(*eo_constructor, eolian_cxx::ctor);
|
|
||||||
cls.constructors.push_back(constructor);
|
|
||||||
}
|
|
||||||
eina_iterator_free(constructors);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
convert_eolian_functions(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
|
||||||
{
|
|
||||||
void *curr;
|
|
||||||
|
|
||||||
Eina_Iterator *eolian_functions =
|
|
||||||
::eolian_class_functions_get(&klass, EOLIAN_METHOD);
|
|
||||||
EINA_ITERATOR_FOREACH(eolian_functions, curr)
|
|
||||||
{
|
|
||||||
efl::eolian::eo_function func_;
|
|
||||||
Eolian_Function *eol_func = static_cast<Eolian_Function*>(curr);
|
|
||||||
/* fixme */
|
|
||||||
if (eolian_function_is_constructing(eol_func))
|
|
||||||
continue;
|
|
||||||
// XXX Eolian only provides regular methods so far
|
|
||||||
func_.type = efl::eolian::eo_function::regular_;
|
|
||||||
func_.name = function_name(*eol_func);
|
|
||||||
func_.impl = function_impl(*eol_func, class_prefix(klass));
|
|
||||||
func_.ret = function_return_type(*eol_func);
|
|
||||||
func_.params = convert_eolian_parameters(*eol_func);
|
|
||||||
func_.comment = convert_comments_function(*eol_func, eolian_cxx::method);
|
|
||||||
cls.functions.push_back(func_);
|
|
||||||
}
|
|
||||||
eina_iterator_free(eolian_functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
convert_eolian_properties(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
|
||||||
{
|
|
||||||
efl::eolian::functions_container_type properties
|
|
||||||
= convert_eolian_property_to_functions(klass);
|
|
||||||
cls.functions.insert
|
|
||||||
(cls.functions.end(), properties.begin(), properties.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
convert_eolian_events(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
convert_eolian_events(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
||||||
{
|
{
|
||||||
|
@ -297,22 +199,74 @@ convert_eolian_class_new(Eolian_Class const& klass)
|
||||||
{
|
{
|
||||||
efl::eolian::eo_class cls;
|
efl::eolian::eo_class cls;
|
||||||
cls.type = class_type(klass);
|
cls.type = class_type(klass);
|
||||||
cls.name = safe_lower(class_name(klass));
|
cls.name = class_name(klass);
|
||||||
cls.name_space = class_namespace_full(klass);
|
cls.name_space = class_namespace_full(klass);
|
||||||
cls.eo_name = class_eo_name(klass);
|
cls.eo_name = class_eo_name(klass);
|
||||||
cls.comment = convert_comments_class(klass);
|
cls.comment = convert_comments_class(klass);
|
||||||
return cls;
|
return cls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
convert_eolian_implements(efl::eolian::eo_class& cls, Eolian_Class const& klass)
|
||||||
|
{
|
||||||
|
std::string prefix(class_prefix(klass));
|
||||||
|
efl::eina::iterator<const Eolian_Implement> itr = implements_get(klass);
|
||||||
|
efl::eina::iterator<const Eolian_Implement> end;
|
||||||
|
|
||||||
|
while (itr != end)
|
||||||
|
{
|
||||||
|
const Eolian_Implement impl = *itr;
|
||||||
|
assert(!!implement_function(impl));
|
||||||
|
assert(!!implement_class(impl));
|
||||||
|
Eolian_Function const& func = *implement_function(impl);
|
||||||
|
Eolian_Class const& icls = *implement_class(impl);
|
||||||
|
|
||||||
|
if (implement_is_property_get(impl))
|
||||||
|
{
|
||||||
|
cls.functions.push_back
|
||||||
|
(_convert_property_get_to_function(icls, func));
|
||||||
|
}
|
||||||
|
else if (implement_is_property_set(impl))
|
||||||
|
{
|
||||||
|
cls.functions.push_back
|
||||||
|
(_convert_property_set_to_function(icls, func));
|
||||||
|
}
|
||||||
|
else if (function_op_type(func) == eolian_cxx::property.value)
|
||||||
|
{
|
||||||
|
cls.functions.push_back
|
||||||
|
(_convert_property_get_to_function(icls, func));
|
||||||
|
cls.functions.push_back
|
||||||
|
(_convert_property_set_to_function(icls, func));
|
||||||
|
}
|
||||||
|
else if (function_is_constructor(klass, func))
|
||||||
|
{
|
||||||
|
cls.constructors.push_back({
|
||||||
|
function_impl(func, class_prefix(icls)),
|
||||||
|
_convert_eolian_parameters(func),
|
||||||
|
convert_comments_function(icls, func)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (implement_is_visible(impl))
|
||||||
|
{
|
||||||
|
cls.functions.push_back({
|
||||||
|
function_type(func),
|
||||||
|
function_name(func),
|
||||||
|
function_impl(func, class_prefix(icls)),
|
||||||
|
function_return_type(func),
|
||||||
|
_convert_eolian_parameters(func),
|
||||||
|
convert_comments_function(icls, func, eolian_cxx::method)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
efl::eolian::eo_class
|
efl::eolian::eo_class
|
||||||
convert_eolian_class(const Eolian_Class& klass)
|
convert_eolian_class(const Eolian_Class& klass)
|
||||||
{
|
{
|
||||||
efl::eolian::eo_class cls(eolian_cxx::convert_eolian_class_new(klass));
|
efl::eolian::eo_class cls(eolian_cxx::convert_eolian_class_new(klass));
|
||||||
eolian_cxx::convert_eolian_inheritances(cls, klass);
|
eolian_cxx::convert_eolian_inheritances(cls, klass);
|
||||||
eolian_cxx::convert_eolian_implements(cls, klass);
|
eolian_cxx::convert_eolian_implements(cls, klass);
|
||||||
eolian_cxx::convert_eolian_constructors(cls, klass);
|
|
||||||
eolian_cxx::convert_eolian_functions(cls, klass);
|
|
||||||
eolian_cxx::convert_eolian_properties(cls, klass);
|
|
||||||
eolian_cxx::convert_eolian_events(cls, klass);
|
eolian_cxx::convert_eolian_events(cls, klass);
|
||||||
efl::eolian::eo_class_validate(cls);
|
efl::eolian::eo_class_validate(cls);
|
||||||
return cls;
|
return cls;
|
||||||
|
|
|
@ -38,7 +38,7 @@ _comment_parameters_list(Eina_Iterator *params)
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string
|
static std::string
|
||||||
_comment_brief_and_params(Eolian_Function const& function, Eolian_Function_Type ftype = EOLIAN_METHOD)
|
_comment_brief_and_params(Eolian_Function const& function, Eolian_Function_Type ftype)
|
||||||
{
|
{
|
||||||
std::string doc = "";
|
std::string doc = "";
|
||||||
std::string func = safe_str(::eolian_function_description_get(&function, ftype));
|
std::string func = safe_str(::eolian_function_description_get(&function, ftype));
|
||||||
|
@ -79,11 +79,12 @@ convert_comments_class(Eolian_Class const& klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
convert_comments_function(Eolian_Function const& function,
|
convert_comments_function(Eolian_Class const& klass,
|
||||||
|
Eolian_Function const& function,
|
||||||
Eolian_Function_Type func_type)
|
Eolian_Function_Type func_type)
|
||||||
{
|
{
|
||||||
std::string doc = _comment_brief_and_params(function);
|
std::string doc = _comment_brief_and_params(function, func_type);
|
||||||
if (func_type != eolian_cxx::ctor.value)
|
if (!function_is_constructor(klass, function))
|
||||||
doc += _comment_return(function, func_type);
|
doc += _comment_return(function, func_type);
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,33 +11,34 @@
|
||||||
|
|
||||||
namespace eolian_cxx {
|
namespace eolian_cxx {
|
||||||
|
|
||||||
std::string convert_comments_class(Eolian_Class const& kls);
|
std::string convert_comments_class(Eolian_Class const& klass);
|
||||||
|
|
||||||
std::string convert_comments_function(Eolian_Function const& function,
|
std::string convert_comments_function(Eolian_Class const& klass,
|
||||||
|
Eolian_Function const& function,
|
||||||
Eolian_Function_Type func_type);
|
Eolian_Function_Type func_type);
|
||||||
|
|
||||||
inline std::string
|
inline std::string
|
||||||
convert_comments_function(Eolian_Function const& constructor_, ctor_t func_type_)
|
convert_comments_function(Eolian_Class const& klass, Eolian_Function const& function_, method_t func_type_)
|
||||||
{
|
{
|
||||||
return convert_comments_function(constructor_, func_type_.value);
|
return convert_comments_function(klass, function_, func_type_.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string
|
inline std::string
|
||||||
convert_comments_function(Eolian_Function const& function_, method_t func_type_)
|
convert_comments_function(Eolian_Class const& klass, Eolian_Function const& property_, getter_t func_type_)
|
||||||
{
|
{
|
||||||
return convert_comments_function(function_, func_type_.value);
|
return convert_comments_function(klass, property_, func_type_.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string
|
inline std::string
|
||||||
convert_comments_function(Eolian_Function const& property_, getter_t func_type_)
|
convert_comments_function(Eolian_Class const& klass, Eolian_Function const& property_, setter_t func_type_)
|
||||||
{
|
{
|
||||||
return convert_comments_function(property_, func_type_.value);
|
return convert_comments_function(klass, property_, func_type_.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string
|
inline std::string
|
||||||
convert_comments_function(Eolian_Function const& property_, setter_t func_type_)
|
convert_comments_function(Eolian_Class const& klass, Eolian_Function const& function_)
|
||||||
{
|
{
|
||||||
return convert_comments_function(property_, func_type_.value);
|
return convert_comments_function(klass, function_, eolian_cxx::method);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,14 +169,17 @@ run(options_type const& opts)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto classes = class_list_all();
|
efl::eina::iterator<const Eolian_Class> it(class_list_all());
|
||||||
for (const Eolian_Class& c : classes)
|
efl::eina::iterator<const Eolian_Class> end;
|
||||||
|
while (it != end)
|
||||||
{
|
{
|
||||||
|
Eolian_Class c = (*it);
|
||||||
if (!generate(c, opts))
|
if (!generate(c, opts))
|
||||||
{
|
{
|
||||||
klass = &c;
|
klass = &c;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue