eina_strbuf_reset(tmpbuf);
- // default constructor
- Eolian_Function ctor_fn = eolian_class_default_constructor_get(classname);
- if (ctor_fn)
- {
- eo_bind_func_generate(classname, ctor_fn, EOLIAN_UNRESOLVED, str_bodyf, NULL);
- }
- // default destructor
- Eolian_Function dtor_fn = eolian_class_default_destructor_get(classname);
- if (dtor_fn)
- {
- eo_bind_func_generate(classname, dtor_fn, EOLIAN_UNRESOLVED, str_bodyf, NULL);
- }
-
//Implements - TODO one generate func def for all
Eolian_Implement impl_desc;
EINA_LIST_FOREACH(eolian_class_implements_list_get(classname), itr, impl_desc)
EOLIAN_PROP_GET,
EOLIAN_METHOD,
EOLIAN_CTOR,
- EOLIAN_DTOR,
- EOLIAN_DFLT_CTOR,
- EOLIAN_DFLT_DTOR
+ EOLIAN_DTOR
} Eolian_Function_Type;
typedef enum
EAPI const Eina_List *eolian_class_functions_list_get(const char *class_name, Eolian_Function_Type func_type);
/*
- * @brief Returns the Function Id for the default constructor.
- *
- * @param[in] class_name name of the class
- * @return a Function Id
- *
- * @ingroup Eolian
- */
-EAPI Eolian_Function eolian_class_default_constructor_get(const char *class_name);
-
-/*
- * @brief Returns the Function Id for the default destructor.
- *
- * @param[in] class_name name of the class
- * @return a Function Id
- *
- * @ingroup Eolian
- */
-EAPI Eolian_Function eolian_class_default_destructor_get(const char *class_name);
-
-/*
* @brief Returns the type of a function
*
* @param[in] function_id Id of the function
Eina_Stringshare *legacy_prefix;
Eina_Stringshare *eo_prefix;
Eina_Stringshare *data_type;
- Eolian_Function dflt_ctor;
- Eolian_Function dflt_dtor;
Eina_List *inherits; /* List Eina_Stringshare * */
Eina_List *properties; /* List prop_name -> _Function_Id */
Eina_List *methods; /* List meth_name -> _Function_Id */
EINA_LIST_FREE(class->methods, fid) _fid_del(fid);
EINA_LIST_FREE(class->properties, fid) _fid_del(fid);
EINA_LIST_FREE(class->events, ev) database_event_free(ev);
- _fid_del((_Function_Id *)class->dflt_ctor);
- _fid_del((_Function_Id *)class->dflt_dtor);
eina_stringshare_del(class->name);
eina_stringshare_del(class->file);
case EOLIAN_CTOR:
desc->constructors = eina_list_append(desc->constructors, foo_id);
break;
- case EOLIAN_DFLT_CTOR:
- desc->dflt_ctor = foo_id;
- break;
case EOLIAN_DTOR:
desc->destructors = eina_list_append(desc->destructors, foo_id);
break;
- case EOLIAN_DFLT_DTOR:
- desc->dflt_dtor = foo_id;
- break;
default:
ERR("Bad function type %d.", fid->type);
return EINA_FALSE;
}
}
-EAPI Eolian_Function
-eolian_class_default_constructor_get(const char *class_name)
-{
- Class_desc *desc = _class_get(class_name);
- EINA_SAFETY_ON_NULL_RETURN_VAL(desc, NULL);
- return desc->dflt_ctor;
-}
-
-EAPI Eolian_Function
-eolian_class_default_destructor_get(const char *class_name)
-{
- Class_desc *desc = _class_get(class_name);
- EINA_SAFETY_ON_NULL_RETURN_VAL(desc, NULL);
- return desc->dflt_dtor;
-}
-
EAPI Eolian_Function_Type
eolian_function_type_get(Eolian_Function function_id)
{
printf(" Data type: <%s>\n", desc->data_type);
}
- // Default constructor
- if (desc->dflt_ctor)
- {
- printf(" default constructor: present - description <%s>\n", eolian_function_description_get(desc->dflt_ctor, "comment"));
- }
-
- // Default destructor
- if (desc->dflt_dtor)
- {
- printf(" default destructor: present - description <%s>\n", eolian_function_description_get(desc->dflt_dtor, "comment"));
- }
-
// Constructors
printf(" constructors:\n");
EINA_LIST_FOREACH(desc->constructors, itr, function)