forked from enlightenment/efl
eolian-cxx: Fix compilation break from changes in Eo nomenclature
Rename of classes and function calls in generated code and C++ headers
This commit is contained in:
parent
f0400e604c
commit
f4a90dcde2
|
@ -746,13 +746,13 @@ template <typename T>
|
||||||
struct is_callable<T, decltype(std::declval<T>() ())> : std::true_type {};
|
struct is_callable<T, decltype(std::declval<T>() ())> : std::true_type {};
|
||||||
|
|
||||||
inline void do_eo_add(Eo*& object, efl::eo::concrete const& parent
|
inline void do_eo_add(Eo*& object, efl::eo::concrete const& parent
|
||||||
, Eo_Class const* klass)
|
, Efl_Class const* klass)
|
||||||
{
|
{
|
||||||
object = ::_eo_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
|
object = ::_eo_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
|
||||||
object = ::_eo_add_end(object, EINA_FALSE, EINA_FALSE);
|
object = ::_eo_add_end(object, EINA_FALSE, EINA_FALSE);
|
||||||
}
|
}
|
||||||
template <typename F>
|
template <typename F>
|
||||||
void do_eo_add(Eo*& object, efl::eo::concrete const& parent, Eo_Class const* klass, F f)
|
void do_eo_add(Eo*& object, efl::eo::concrete const& parent, Efl_Class const* klass, F f)
|
||||||
{
|
{
|
||||||
object = ::_eo_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
|
object = ::_eo_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
|
||||||
f();
|
f();
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
namespace efl { namespace eolian {
|
namespace efl { namespace eolian {
|
||||||
|
|
||||||
typedef ::Eo_Callback_Priority callback_priority;
|
typedef ::Efl_Callback_Priority callback_priority;
|
||||||
namespace callback_priorities
|
namespace callback_priorities
|
||||||
{
|
{
|
||||||
static const callback_priority before = -100;
|
static const callback_priority before = -100;
|
||||||
|
@ -74,7 +74,7 @@ private:
|
||||||
template <typename F>
|
template <typename F>
|
||||||
struct _event_deleter
|
struct _event_deleter
|
||||||
{
|
{
|
||||||
_event_deleter(F* data, Eo* eo, ::Eo_Event_Cb cb, Eo_Event_Description const* description)
|
_event_deleter(F* data, Eo* eo, ::Efl_Event_Cb cb, Efl_Event_Description const* description)
|
||||||
: _data(data), _eo( ::eo_ref(eo)), _cb(cb), _description(description)
|
: _data(data), _eo( ::eo_ref(eo)), _cb(cb), _description(description)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ struct _event_deleter
|
||||||
|
|
||||||
void operator()() const
|
void operator()() const
|
||||||
{
|
{
|
||||||
::eo_event_callback_del(_eo, _description, _cb, _data);
|
::efl_event_callback_del(_eo, _description, _cb, _data);
|
||||||
::ecore_main_loop_thread_safe_call_async(&_deleter_call, _data);
|
::ecore_main_loop_thread_safe_call_async(&_deleter_call, _data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,12 +109,12 @@ private:
|
||||||
|
|
||||||
F* _data;
|
F* _data;
|
||||||
Eo* _eo;
|
Eo* _eo;
|
||||||
::Eo_Event_Cb _cb;
|
::Efl_Event_Cb _cb;
|
||||||
Eo_Event_Description const* _description;
|
Efl_Event_Description const* _description;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
signal_connection make_signal_connection(std::unique_ptr<F>& data, Eo* eo, ::Eo_Event_Cb cb, Eo_Event_Description const* description)
|
signal_connection make_signal_connection(std::unique_ptr<F>& data, Eo* eo, ::Efl_Event_Cb cb, Efl_Event_Description const* description)
|
||||||
{
|
{
|
||||||
signal_connection c(_event_deleter<F>(data.get(), eo, cb, description));
|
signal_connection c(_event_deleter<F>(data.get(), eo, cb, description));
|
||||||
data.release();
|
data.release();
|
||||||
|
@ -152,14 +152,14 @@ signal_connection event_add(Event event, Object object, F&& function)
|
||||||
typedef typename std::remove_reference<F>::type function_type;
|
typedef typename std::remove_reference<F>::type function_type;
|
||||||
std::unique_ptr<function_type> f(new function_type(std::forward<F>(function)));
|
std::unique_ptr<function_type> f(new function_type(std::forward<F>(function)));
|
||||||
|
|
||||||
::eo_event_callback_priority_add
|
::efl_event_callback_priority_add
|
||||||
(object._eo_ptr(), event.description(), 0
|
(object._eo_ptr(), event.description(), 0
|
||||||
, static_cast<Eo_Event_Cb>
|
, static_cast<Efl_Event_Cb>
|
||||||
(&_detail::event_callback<Object, typename Event::parameter_type, function_type>)
|
(&_detail::event_callback<Object, typename Event::parameter_type, function_type>)
|
||||||
, f.get());
|
, f.get());
|
||||||
return make_signal_connection
|
return make_signal_connection
|
||||||
(f, object._eo_ptr()
|
(f, object._eo_ptr()
|
||||||
, static_cast<Eo_Event_Cb>
|
, static_cast<Efl_Event_Cb>
|
||||||
(&_detail::event_callback<Object, typename Event::parameter_type, function_type>)
|
(&_detail::event_callback<Object, typename Event::parameter_type, function_type>)
|
||||||
, event.description());
|
, event.description());
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,88 +46,88 @@ ref_get(const Eo *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Eina_Bool
|
inline Eina_Bool
|
||||||
isa(const Eo *obj, const Eo_Class *klass)
|
isa(const Eo *obj, const Efl_Class *klass)
|
||||||
{
|
{
|
||||||
return eo_isa(obj, klass);
|
return eo_isa(obj, klass);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Eo*
|
inline Eo*
|
||||||
add(const Eo_Class *klass, Eo *parent = NULL)
|
add(const Efl_Class *klass, Eo *parent = NULL)
|
||||||
{
|
{
|
||||||
Eo *eo = eo_add_ref(klass, parent);
|
Eo *eo = eo_add_ref(klass, parent);
|
||||||
return eo;
|
return eo;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
dbg_info_get(Eo *obj, Eo_Dbg_Info *info)
|
dbg_info_get(Eo *obj, Efl_Dbg_Info *info)
|
||||||
{
|
{
|
||||||
eo_dbg_info_get(obj, info);
|
efl_dbg_info_get(obj, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
base_data_set(Eo *obj, const char *key, const void *data)
|
base_data_set(Eo *obj, const char *key, const void *data)
|
||||||
{
|
{
|
||||||
eo_key_data_set(obj, key, data);
|
efl_key_data_set(obj, key, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void*
|
inline void*
|
||||||
base_data_get(const Eo *obj, const char *key)
|
base_data_get(const Eo *obj, const char *key)
|
||||||
{
|
{
|
||||||
void *data;
|
void *data;
|
||||||
data = eo_key_data_get(obj, key);
|
data = efl_key_data_get(obj, key);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
base_data_del(Eo *obj, const char *key)
|
base_data_del(Eo *obj, const char *key)
|
||||||
{
|
{
|
||||||
eo_key_data_set(obj, key, NULL);
|
efl_key_data_set(obj, key, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
parent_set(Eo *obj, Eo *parent)
|
parent_set(Eo *obj, Eo *parent)
|
||||||
{
|
{
|
||||||
eo_parent_set(obj, parent);
|
efl_parent_set(obj, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Eo*
|
inline Eo*
|
||||||
parent_get(const Eo *obj)
|
parent_get(const Eo *obj)
|
||||||
{
|
{
|
||||||
Eo *parent;
|
Eo *parent;
|
||||||
parent = eo_parent_get(obj);
|
parent = efl_parent_get(obj);
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
event_freeze(Eo *obj)
|
event_freeze(Eo *obj)
|
||||||
{
|
{
|
||||||
eo_event_freeze(obj);
|
efl_event_freeze(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
event_thaw(Eo *obj)
|
event_thaw(Eo *obj)
|
||||||
{
|
{
|
||||||
eo_event_thaw(obj);
|
efl_event_thaw(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int
|
inline int
|
||||||
event_freeze_get(const Eo *obj)
|
event_freeze_get(const Eo *obj)
|
||||||
{
|
{
|
||||||
int count = -1;
|
int count = -1;
|
||||||
count = eo_event_freeze_count_get(obj);
|
count = efl_event_freeze_count_get(obj);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
wref_add(Eo *obj, Eo **wref)
|
wref_add(Eo *obj, Eo **wref)
|
||||||
{
|
{
|
||||||
eo_wref_add(obj, wref);
|
efl_wref_add(obj, wref);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
wref_del(Eo *obj, Eo **wref)
|
wref_del(Eo *obj, Eo **wref)
|
||||||
{
|
{
|
||||||
eo_wref_del(obj, wref);
|
efl_wref_del(obj, wref);
|
||||||
}
|
}
|
||||||
|
|
||||||
} } }
|
} } }
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct base_class_definition_generator
|
||||||
if(!as_generator(*(scope_tab << function_declaration))
|
if(!as_generator(*(scope_tab << function_declaration))
|
||||||
.generate(sink, cls.functions, context)) return false;
|
.generate(sink, cls.functions, context)) return false;
|
||||||
|
|
||||||
// static Eo_Class const* _eo_class();
|
// static Efl_Class const* _eo_class();
|
||||||
std::string suffix;
|
std::string suffix;
|
||||||
switch(cls.type)
|
switch(cls.type)
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ struct base_class_definition_generator
|
||||||
|
|
||||||
if(!as_generator
|
if(!as_generator
|
||||||
(
|
(
|
||||||
scope_tab << "static Eo_Class const* _eo_class()\n"
|
scope_tab << "static Efl_Class const* _eo_class()\n"
|
||||||
<< scope_tab << "{\n"
|
<< scope_tab << "{\n"
|
||||||
<< scope_tab << scope_tab << "return "
|
<< scope_tab << scope_tab << "return "
|
||||||
).generate(sink, attributes::unused, context)) return false;
|
).generate(sink, attributes::unused, context)) return false;
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct class_definition_generator
|
||||||
if(!as_generator(*(scope_tab << function_declaration))
|
if(!as_generator(*(scope_tab << function_declaration))
|
||||||
.generate(sink, cls.functions, context)) return false;
|
.generate(sink, cls.functions, context)) return false;
|
||||||
|
|
||||||
// static Eo_Class const* _eo_class();
|
// static Efl_Class const* _eo_class();
|
||||||
std::string suffix;
|
std::string suffix;
|
||||||
switch(cls.type)
|
switch(cls.type)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +95,7 @@ struct class_definition_generator
|
||||||
|
|
||||||
if(!as_generator
|
if(!as_generator
|
||||||
(
|
(
|
||||||
scope_tab << "static Eo_Class const* _eo_class()\n"
|
scope_tab << "static Efl_Class const* _eo_class()\n"
|
||||||
<< scope_tab << "{\n"
|
<< scope_tab << "{\n"
|
||||||
<< scope_tab << scope_tab << "return "
|
<< scope_tab << scope_tab << "return "
|
||||||
).generate(sink, attributes::unused, context)) return false;
|
).generate(sink, attributes::unused, context)) return false;
|
||||||
|
@ -133,7 +133,7 @@ struct class_definition_generator
|
||||||
*attribute_reorder<1, 2, 0, 1>
|
*attribute_reorder<1, 2, 0, 1>
|
||||||
((scope_tab << "static struct " << string_replace(',', '_') << "_event\n"
|
((scope_tab << "static struct " << string_replace(',', '_') << "_event\n"
|
||||||
<< scope_tab << "{\n"
|
<< scope_tab << "{\n"
|
||||||
<< scope_tab << scope_tab << "static Eo_Event_Description const* description()\n"
|
<< scope_tab << scope_tab << "static Efl_Event_Description const* description()\n"
|
||||||
<< scope_tab << scope_tab << "{ return " << string << "; }\n"
|
<< scope_tab << scope_tab << "{ return " << string << "; }\n"
|
||||||
<< scope_tab << scope_tab << "typedef "
|
<< scope_tab << scope_tab << "typedef "
|
||||||
<< (attribute_conditional([] (eina::optional<attributes::type_def> t) { return !!t; })
|
<< (attribute_conditional([] (eina::optional<attributes::type_def> t) { return !!t; })
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct test_param_type<void(T::*)(P), U>
|
||||||
static_assert(std::is_same<P, U>::value, "Wrong type");
|
static_assert(std::is_same<P, U>::value, "Wrong type");
|
||||||
};
|
};
|
||||||
|
|
||||||
test_param_type<typeof( & nonamespace::Complex::inclasscont ), efl::eina::range_list<eo::Base>> inclasscont;
|
test_param_type<typeof( & nonamespace::Complex::inclasscont ), efl::eina::range_list<efl::Object>> inclasscont;
|
||||||
test_param_type<typeof( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<int>>> incontcont;
|
test_param_type<typeof( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<int>>> incontcont;
|
||||||
test_param_type<typeof( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<int>>const&> incontcontown;
|
test_param_type<typeof( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<int>>const&> incontcontown;
|
||||||
test_param_type<typeof( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<int>>const&> incontowncontown;
|
test_param_type<typeof( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<int>>const&> incontowncontown;
|
||||||
|
@ -46,7 +46,7 @@ test_param_type<typeof( & nonamespace::Complex::instringcont ), efl::eina::range
|
||||||
test_param_type<typeof( & nonamespace::Complex::instringowncont ), efl::eina::range_list<efl::eina::string_view>> instringowncont;
|
test_param_type<typeof( & nonamespace::Complex::instringowncont ), efl::eina::range_list<efl::eina::string_view>> instringowncont;
|
||||||
test_param_type<typeof( & nonamespace::Complex::instringcontown ), efl::eina::list<efl::eina::string_view>const&> instringcontown;
|
test_param_type<typeof( & nonamespace::Complex::instringcontown ), efl::eina::list<efl::eina::string_view>const&> instringcontown;
|
||||||
|
|
||||||
test_param_type<typeof( & nonamespace::Complex::outclasscont ), efl::eina::range_list<eo::Base>&> outclasscont;
|
test_param_type<typeof( & nonamespace::Complex::outclasscont ), efl::eina::range_list<efl::Object>&> outclasscont;
|
||||||
test_param_type<typeof( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<int>>&> outcontcont;
|
test_param_type<typeof( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<int>>&> outcontcont;
|
||||||
test_param_type<typeof( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<int>>&> outcontcontown;
|
test_param_type<typeof( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<int>>&> outcontcontown;
|
||||||
test_param_type<typeof( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<int>>&> outcontowncontown;
|
test_param_type<typeof( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<int>>&> outcontowncontown;
|
||||||
|
|
Loading…
Reference in New Issue