[[Get the selected item.
- The selected item can be unselected with function
- @.selected_item.set, and the first item of
+ The selected item can be unselected with
+ @Elm.Diskselector.Item.selected.set, and the first item of
diskselector will be selected.
The selected item always will be centered on diskselector, with
* @param[in] func_type type of the functions to insert into the list.
* @return the iterator
*
+ * Acceptable inputs are EOLIAN_PROPERTY or EOLIAN_METHOD.
+ *
* @ingroup Eolian
*/
EAPI Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type);
* @param[in] ftype The type of function to get the scope for
* @return the function scope
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
* @param[in] f_type type of the function
* @return the function id if found, NULL otherwise.
*
+ * Providing EOLIAN_UNRESOLVED finds any func, EOLIAN_PROPERTY any property,
+ * EOLIAN_METHOD any method, EOLIAN_PROP_GET properties with either only a getter
+ * or full property, EOLIAN_PROP_SET either only a setter or full property.
+ *
* @ingroup Eolian
*/
EAPI const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return the legacy name or NULL.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return the documentation or NULL.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI const Eolian_Documentation *eolian_function_documentation_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return EINA_TRUE if virtual pure, EINA_FALSE othrewise.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_function_is_virtual_pure(const Eolian_Function *function_id, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return EINA_TRUE if auto, EINA_FALSE othrewise.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_function_is_auto(const Eolian_Function *function_id, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return EINA_TRUE if empty, EINA_FALSE othrewise.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_function_is_empty(const Eolian_Function *function_id, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return EINA_TRUE if legacy only, EINA_FALSE otherwise.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
* @param[in] ftype The function type, for property get/set distinction.
* @return the iterator
*
+ * Acceptable input types are PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
* @param[in] ftype The function type, for property get/set distinction.
* @return the iterator
*
+ * Acceptable input types are PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
* The type of the function is needed because a given function can represent a
* property, that can be set and get functions.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
* value if an error occurs (eo_do failure...).
* The default value is not mandatory, so NULL can be returned.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI const Eolian_Expression *
* The type of the function is needed because a given function can represent a
* property, that can be set and get functions.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI const Eolian_Documentation *eolian_function_return_documentation_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
* The type of the function is needed because a given function can represent a
* property, that can be set and get functions.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
* @param[in] f_type The function type, for property get/set distinction.
* @return EINA_TRUE when it is, EINA_FALSE when it's not.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_implement_is_auto(const Eolian_Implement *impl, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return EINA_TRUE when it is, EINA_FALSE when it's not.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_implement_is_empty(const Eolian_Implement *impl, Eolian_Function_Type f_type);
* @param[in] f_type The function type, for property get/set distinction.
* @return EINA_TRUE when it is, EINA_FALSE when it's not.
*
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_implement_is_virtual(const Eolian_Implement *impl, Eolian_Function_Type f_type);
{
EINA_LIST_FOREACH(cl->properties, itr, fid)
{
+ if (!database_function_is_type(fid, f_type))
+ continue;
if (!strcmp(fid->name, func_name))
return fid;
}
_db_fill_implement(Eolian_Class *cl, Eolian_Implement *impl)
{
Eolian_Function *foo_id;
- Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
+ Eolian_Function_Type ftype = EOLIAN_METHOD;
if (impl->is_prop_get && impl->is_prop_set)
ftype = EOLIAN_PROPERTY;
foo_id->set_empty = impl->set_empty;
if (foo_id->get_auto || foo_id->get_empty)
{
- if (ftype == EOLIAN_UNRESOLVED)
+ if (ftype == EOLIAN_METHOD)
foo_id->set_impl = impl;
foo_id->get_impl = impl;
}
(func->ctor_of, EINA_COMPARE_CB(strcmp),
eina_stringshare_ref(cls->full_name));
}
+
+Eina_Bool
+database_function_is_type(Eolian_Function *fid, Eolian_Function_Type ftype)
+{
+ if (ftype == EOLIAN_UNRESOLVED)
+ return EINA_TRUE;
+ else if (ftype == EOLIAN_PROP_GET)
+ return (fid->type == EOLIAN_PROP_GET) || (fid->type == EOLIAN_PROPERTY);
+ else if (ftype == EOLIAN_PROP_SET)
+ return (fid->type == EOLIAN_PROP_SET) || (fid->type == EOLIAN_PROPERTY);
+ return (fid->type == ftype);
+}
\ No newline at end of file
eolian_function_scope_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EOLIAN_SCOPE_PUBLIC);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EOLIAN_SCOPE_PUBLIC);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EOLIAN_SCOPE_PUBLIC);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_scope; break;
- case EOLIAN_PROP_SET: return fid->set_scope; break;
- default: return EOLIAN_SCOPE_PUBLIC;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return EOLIAN_SCOPE_PUBLIC;
+ return fid->get_scope;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return EOLIAN_SCOPE_PUBLIC;
+ return fid->get_scope;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return EOLIAN_SCOPE_PUBLIC;
+ return fid->set_scope;
+ default:
+ return EOLIAN_SCOPE_PUBLIC;
}
}
eolian_function_legacy_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_legacy; break;
- case EOLIAN_PROP_SET: return fid->set_legacy; break;
- default: return NULL;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return NULL;
+ return fid->get_legacy;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->get_legacy;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->set_legacy;
+ default:
+ return NULL;
}
}
eolian_function_is_virtual_pure(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_virtual_pure; break;
- case EOLIAN_PROP_SET: return fid->set_virtual_pure; break;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return EINA_FALSE;
+ return fid->get_virtual_pure;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->get_virtual_pure;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->set_virtual_pure;
+ default:
+ return EINA_FALSE;
}
}
eolian_function_is_auto(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_auto; break;
- case EOLIAN_PROP_SET: return fid->set_auto; break;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return EINA_FALSE;
+ return fid->get_auto;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->get_auto;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->set_auto;
+ default:
+ return EINA_FALSE;
}
}
eolian_function_is_empty(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_empty; break;
- case EOLIAN_PROP_SET: return fid->set_empty; break;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return EINA_FALSE;
+ return fid->get_empty;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->get_empty;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->set_empty;
+ default:
+ return EINA_FALSE;
}
}
eolian_function_is_legacy_only(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_only_legacy; break;
- case EOLIAN_PROP_SET: return fid->set_only_legacy; break;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return EINA_FALSE;
+ return fid->get_only_legacy;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->get_only_legacy;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->set_only_legacy;
+ default:
+ return EINA_FALSE;
}
}
EAPI const Eolian_Type *
eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
switch (ftype)
{
- case EOLIAN_PROP_SET: return fid->set_ret_type;
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROP_GET: return fid->get_ret_type;
- default: return NULL;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return NULL;
+ return fid->get_ret_type;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->get_ret_type;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->set_ret_type;
+ default:
+ return NULL;
}
}
EAPI const Eolian_Expression *
eolian_function_return_default_value_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
switch (ftype)
{
- case EOLIAN_PROP_SET: return fid->set_ret_val;
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_ret_val;
- default: return NULL;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return NULL;
+ return fid->get_ret_val;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->get_ret_val;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->set_ret_val;
+ default:
+ return NULL;
}
}
EAPI const Eolian_Documentation *
eolian_function_return_documentation_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
switch (ftype)
{
- case EOLIAN_PROP_SET: return fid->set_return_doc; break;
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_return_doc; break;
- default: return NULL;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return NULL;
+ return fid->get_return_doc;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->get_return_doc;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return NULL;
+ return fid->set_return_doc;
+ default:
+ return NULL;
}
}
Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_PROP_SET: return fid->set_return_warn_unused;
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return fid->get_return_warn_unused;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ if (fid->type != EOLIAN_METHOD)
+ return EINA_FALSE;
+ return fid->get_return_warn_unused;
+ case EOLIAN_PROP_GET:
+ if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->get_return_warn_unused;
+ case EOLIAN_PROP_SET:
+ if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+ return EINA_FALSE;
+ return fid->set_return_warn_unused;
+ default:
+ return EINA_FALSE;
}
}
eolian_implement_is_auto(const Eolian_Implement *impl, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return impl->get_auto; break;
- case EOLIAN_PROP_SET: return impl->set_auto; break;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ return impl->get_auto && !impl->is_prop_get && !impl->is_prop_set;
+ case EOLIAN_PROP_GET:
+ return impl->get_auto && impl->is_prop_get;
+ case EOLIAN_PROP_SET:
+ return impl->set_auto && impl->is_prop_set;
+ default:
+ return EINA_FALSE;
}
}
eolian_implement_is_empty(const Eolian_Implement *impl, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return impl->get_empty; break;
- case EOLIAN_PROP_SET: return impl->set_empty; break;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ return impl->get_empty && !impl->is_prop_get && !impl->is_prop_set;
+ case EOLIAN_PROP_GET:
+ return impl->get_empty && impl->is_prop_get;
+ case EOLIAN_PROP_SET:
+ return impl->set_empty && impl->is_prop_set;
+ default:
+ return EINA_FALSE;
}
}
eolian_implement_is_virtual(const Eolian_Implement *impl, Eolian_Function_Type ftype)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(impl, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
switch (ftype)
{
- case EOLIAN_UNRESOLVED: case EOLIAN_METHOD: case EOLIAN_PROPERTY: case EOLIAN_PROP_GET: return impl->get_virtual; break;
- case EOLIAN_PROP_SET: return impl->set_virtual; break;
- default: return EINA_FALSE;
+ case EOLIAN_METHOD:
+ return impl->get_virtual && !impl->is_prop_get && !impl->is_prop_set;
+ case EOLIAN_PROP_GET:
+ return impl->get_virtual && impl->is_prop_get;
+ case EOLIAN_PROP_SET:
+ return impl->set_virtual && impl->is_prop_set;
+ default:
+ return EINA_FALSE;
}
}
/* functions */
void database_function_del(Eolian_Function *fid);
void database_function_constructor_add(Eolian_Function *func, const Eolian_Class *klass);
+Eina_Bool database_function_is_type(Eolian_Function *fid, Eolian_Function_Type ftype);
/* func parameters */
void database_parameter_del(Eolian_Function_Parameter *pdesc);
fail_if(!(base = eolian_class_get_by_name("Base")));
/* Base ctor */
- fail_if(!(fid = eolian_class_function_get_by_name(base, "constructor", EOLIAN_UNRESOLVED)));
- fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_UNRESOLVED));
+ fail_if(!(fid = eolian_class_function_get_by_name(base, "constructor", EOLIAN_METHOD)));
+ fail_if(!eolian_function_is_virtual_pure(fid, EOLIAN_METHOD));
/* Property */
fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
fail_if(!(class = eolian_class_get_by_name("Scope")));
/* Property scope */
- fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
- fail_if(eolian_function_scope_get(fid, EOLIAN_PROPERTY) != EOLIAN_SCOPE_PROTECTED);
- fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
- fail_if(eolian_function_scope_get(fid, EOLIAN_PROPERTY) != EOLIAN_SCOPE_PUBLIC);
+ fail_if(eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY));
+ fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROP_GET)));
+ fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PROTECTED);
+ fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROP_GET)));
+ fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PUBLIC);
fail_if(!(fid = eolian_class_function_get_by_name(class, "c", EOLIAN_PROPERTY)));
fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PUBLIC);
fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PROTECTED);
fail_if(v.value.i != 100);
/* legacy only + c only */
- fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
+ fail_if(eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY));
+ fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROP_SET)));
fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET));
fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET));
fail_if(!eolian_function_is_c_only(fid));
fail_if(!(class = eolian_class_get_by_name("Class_Funcs")));
/* Class properties */
- fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
+ fail_if(eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY));
+ fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROP_GET)));
fail_if(!eolian_function_is_class(fid));
- fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
+ fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROP_GET)));
fail_if(eolian_function_is_class(fid));
/* Class methods */