*/
typedef struct _Event_Desc* Eolian_Event;
-#define EOLIAN_METHOD_RETURN_TYPE "method_return_type"
-#define EOLIAN_PROP_GET_RETURN_TYPE "property_get_return_type"
-#define EOLIAN_PROP_SET_RETURN_TYPE "property_set_return_type"
-#define EOLIAN_RETURN_COMMENT "method_return_comment"
-#define EOLIAN_PROP_GET_RETURN_COMMENT "property_get_return_comment"
-#define EOLIAN_PROP_SET_RETURN_COMMENT "property_set_return_comment"
#define EOLIAN_LEGACY "legacy"
#define EOLIAN_LEGACY_GET "legacy_get"
#define EOLIAN_LEGACY_SET "legacy_set"
{
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_CTOR);
database_class_function_add(kls->name, foo_id);
- if (meth->ret) database_function_description_set(foo_id, EOLIAN_RETURN_COMMENT, meth->ret->comment);
+ if (meth->ret) database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
{
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_DTOR);
database_class_function_add(kls->name, foo_id);
- if (meth->ret) database_function_description_set(foo_id, EOLIAN_RETURN_COMMENT, meth->ret->comment);
+ if (meth->ret) database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
database_function_type_set(foo_id, (accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET));
if (accessor->ret && accessor->ret->type)
{
+ Eolian_Function_Type ftype =
+ accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET;
database_function_return_type_set(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->type);
- database_function_data_set(foo_id,
- (accessor->type == SETTER?EOLIAN_PROP_SET_RETURN_COMMENT:EOLIAN_PROP_GET_RETURN_COMMENT),
- accessor->ret->comment);
+ ftype, accessor->ret->type);
+ database_function_return_comment_set(foo_id,
+ ftype, accessor->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->warn_unused);
+ ftype, accessor->ret->warn_unused);
database_function_return_flag_set_own(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->own);
+ ftype, accessor->ret->own);
database_function_return_dflt_val_set(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->dflt_ret_val);
+ ftype, accessor->ret->dflt_ret_val);
}
if (accessor->legacy)
{
database_class_function_add(kls->name, foo_id);
if (meth->ret)
{
- database_function_data_set(foo_id, EOLIAN_METHOD_RETURN_TYPE, meth->ret->type);
- database_function_description_set(foo_id, EOLIAN_RETURN_COMMENT, meth->ret->comment);
+ database_function_return_type_set(foo_id, EOLIAN_METHOD, meth->ret->type);
+ database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
EOLIAN_METHOD, meth->ret->warn_unused);
database_function_return_flag_set_own(foo_id, EOLIAN_METHOD, meth->ret->own);
{
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_CTOR);
database_class_function_add(kls->name, foo_id);
- if (meth->ret) database_function_description_set(foo_id, EOLIAN_RETURN_COMMENT, meth->ret->comment);
+ if (meth->ret) database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
{
Eolian_Function foo_id = database_function_new(meth->name, EOLIAN_DTOR);
database_class_function_add(kls->name, foo_id);
- if (meth->ret) database_function_description_set(foo_id, EOLIAN_RETURN_COMMENT, meth->ret->comment);
+ if (meth->ret) database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
database_function_type_set(foo_id, (accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET));
if (accessor->ret && accessor->ret->type)
{
+ Eolian_Function_Type ftype =
+ accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET;
database_function_return_type_set(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->type);
- database_function_data_set(foo_id,
- (accessor->type == SETTER?EOLIAN_PROP_SET_RETURN_COMMENT:EOLIAN_PROP_GET_RETURN_COMMENT),
- accessor->ret->comment);
+ ftype, accessor->ret->type);
+ database_function_return_comment_set(foo_id,
+ ftype, accessor->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->warn_unused);
+ ftype, accessor->ret->warn_unused);
database_function_return_flag_set_own(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->own);
+ ftype, accessor->ret->own);
database_function_return_dflt_val_set(foo_id,
- accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET, accessor->ret->dflt_ret_val);
+ ftype, accessor->ret->dflt_ret_val);
}
if (accessor->legacy)
{
database_class_function_add(kls->name, foo_id);
if (meth->ret)
{
- database_function_data_set(foo_id, EOLIAN_METHOD_RETURN_TYPE, meth->ret->type);
- database_function_description_set(foo_id, EOLIAN_RETURN_COMMENT, meth->ret->comment);
+ database_function_return_type_set(foo_id, EOLIAN_METHOD, meth->ret->type);
+ database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
EOLIAN_METHOD, meth->ret->warn_unused);
database_function_return_flag_set_own(foo_id, EOLIAN_METHOD, meth->ret->own);
#define PROP_SET_RETURN_DFLT_VAL "property_set_return_dflt_val"
#define METHOD_RETURN_DFLT_VAL "method_return_dflt_val"
+#define EOLIAN_METHOD_RETURN_TYPE "method_return_type"
+#define EOLIAN_PROP_GET_RETURN_TYPE "property_get_return_type"
+#define EOLIAN_PROP_SET_RETURN_TYPE "property_set_return_type"
+
+#define EOLIAN_METHOD_RETURN_COMMENT "method_return_comment"
+#define EOLIAN_PROP_GET_RETURN_COMMENT "property_get_return_comment"
+#define EOLIAN_PROP_SET_RETURN_COMMENT "property_set_return_comment"
+
static Eina_Hash *_classes = NULL;
static int _database_init_count = 0;
{
case EOLIAN_PROP_SET: key = EOLIAN_PROP_SET_RETURN_COMMENT; break;
case EOLIAN_PROP_GET: key = EOLIAN_PROP_GET_RETURN_COMMENT; break;
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: key = EOLIAN_RETURN_COMMENT; break;
+ case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: key = EOLIAN_METHOD_RETURN_COMMENT; break;
default: return NULL;
}
return eolian_function_data_get(foo_id, key);
}
+void database_function_return_comment_set(Eolian_Function foo_id, Eolian_Function_Type ftype, const char *ret_comment)
+{
+ const char *key = NULL;
+ switch (ftype)
+ {
+ case EOLIAN_PROP_SET: key = EOLIAN_PROP_SET_RETURN_COMMENT; break;
+ case EOLIAN_PROP_GET: key = EOLIAN_PROP_GET_RETURN_COMMENT; break;
+ case EOLIAN_METHOD: key = EOLIAN_METHOD_RETURN_COMMENT; break;
+ default: return;
+ }
+ database_function_data_set(foo_id, key, ret_comment);
+}
+
void database_function_return_flag_set_as_warn_unused(Eolian_Function foo_id,
Eolian_Function_Type ftype, Eina_Bool warn_unused)
{
{
Eolian_Function foo_id = (Eolian_Function) fid;
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
- const char *ret_desc = eolian_function_description_get(foo_id, EOLIAN_RETURN_COMMENT);
+ const char *ret_desc = eolian_function_return_comment_get(foo_id, fid->type);
switch (fid->type)
{
case EOLIAN_PROPERTY:
void database_function_return_type_set(Eolian_Function foo_id, Eolian_Function_Type ftype, const char *ret_type);
+void database_function_return_comment_set(Eolian_Function foo_id, Eolian_Function_Type ftype, const char *ret_comment);
+
void database_function_return_dflt_val_set(Eolian_Function foo_id, Eolian_Function_Type ftype, const char *ret_dflt_value);
void database_function_return_flag_set_as_warn_unused(Eolian_Function foo_id,