eolian: add some missing typedecl APIs
This commit is contained in:
parent
cf9dbaa7da
commit
c0287a2752
|
@ -1626,6 +1626,7 @@ EAPI Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp);
|
|||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_c_type_named_get(const Eolian_Type *tp, const char *name);
|
||||
EAPI Eina_Stringshare *eolian_typedecl_c_type_named_get(const Eolian_Typedecl *tp, const char *name);
|
||||
|
||||
/*
|
||||
* @brief Get the full C type name of the given type without a name.
|
||||
|
@ -1643,6 +1644,7 @@ EAPI Eina_Stringshare *eolian_type_c_type_named_get(const Eolian_Type *tp, const
|
|||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Stringshare *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp);
|
||||
|
||||
/*
|
||||
* @brief Get the name of the given type. For regular or complex types, this
|
||||
|
@ -1657,6 +1659,7 @@ EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp);
|
|||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_name_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Stringshare *eolian_typedecl_name_get(const Eolian_Typedecl *tp);
|
||||
|
||||
/*
|
||||
* @brief Get the full (namespaced) name of a function. Only works on named
|
||||
|
@ -1668,6 +1671,7 @@ EAPI Eina_Stringshare *eolian_type_name_get(const Eolian_Type *tp);
|
|||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_full_name_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Stringshare *eolian_typedecl_full_name_get(const Eolian_Typedecl *tp);
|
||||
|
||||
/*
|
||||
* @brief Get an iterator to the list of namespaces of the given type. Only
|
||||
|
@ -1679,6 +1683,7 @@ EAPI Eina_Stringshare *eolian_type_full_name_get(const Eolian_Type *tp);
|
|||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_type_namespaces_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Iterator *eolian_typedecl_namespaces_get(const Eolian_Typedecl *tp);
|
||||
|
||||
/*
|
||||
* @brief Get the name of the function used to free this type.
|
||||
|
|
|
@ -84,6 +84,7 @@ _typedecl_add(Eolian_Type *type)
|
|||
ret->doc = type->doc;
|
||||
ret->legacy = eina_stringshare_ref(type->legacy);
|
||||
ret->is_extern = type->is_extern;
|
||||
ret->parent = type;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -465,12 +465,25 @@ eolian_type_c_type_named_get(const Eolian_Type *tp, const char *name)
|
|||
return ret;
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_typedecl_c_type_named_get(const Eolian_Typedecl *tp, const char *name)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
return eolian_type_c_type_named_get(tp->parent, name);
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_type_c_type_get(const Eolian_Type *tp)
|
||||
{
|
||||
return eolian_type_c_type_named_get(tp, NULL);
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_typedecl_c_type_get(const Eolian_Typedecl *tp)
|
||||
{
|
||||
return eolian_typedecl_c_type_named_get(tp, NULL);
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_type_name_get(const Eolian_Type *tp)
|
||||
{
|
||||
|
@ -478,6 +491,13 @@ eolian_type_name_get(const Eolian_Type *tp)
|
|||
return tp->name;
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_typedecl_name_get(const Eolian_Typedecl *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
return tp->name;
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_type_full_name_get(const Eolian_Type *tp)
|
||||
{
|
||||
|
@ -485,6 +505,13 @@ eolian_type_full_name_get(const Eolian_Type *tp)
|
|||
return tp->full_name;
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_typedecl_full_name_get(const Eolian_Typedecl *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
return tp->full_name;
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_type_namespaces_get(const Eolian_Type *tp)
|
||||
{
|
||||
|
@ -493,6 +520,14 @@ eolian_type_namespaces_get(const Eolian_Type *tp)
|
|||
return eina_list_iterator_new(tp->namespaces);
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_typedecl_namespaces_get(const Eolian_Typedecl *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
if (!tp->namespaces) return NULL;
|
||||
return eina_list_iterator_new(tp->namespaces);
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_type_free_func_get(const Eolian_Type *tp)
|
||||
{
|
||||
|
|
|
@ -188,6 +188,7 @@ struct _Eolian_Typedecl
|
|||
{
|
||||
Eolian_Object base;
|
||||
Eolian_Typedecl_Type type;
|
||||
Eolian_Type *parent;
|
||||
Eolian_Type *base_type;
|
||||
Eina_Stringshare *name;
|
||||
Eina_Stringshare *full_name;
|
||||
|
|
Loading…
Reference in New Issue