const Eolian_Type *rettypet = NULL;
const char *rettype = NULL;
Eina_Bool ret_const = EINA_FALSE;
- Eolian_Function_Scope scope = eolian_function_scope_get(func);
+ Eolian_Object_Scope scope = eolian_function_scope_get(func);
_class_func_env_create(class, eolian_function_name_get(func), ftype, &func_env);
char *fsuffix = "";
typedef enum
{
EOLIAN_SCOPE_PUBLIC,
+ EOLIAN_SCOPE_PRIVATE,
EOLIAN_SCOPE_PROTECTED
-} Eolian_Function_Scope;
+} Eolian_Object_Scope;
typedef enum
{
*
* @ingroup Eolian
*/
-EAPI Eolian_Function_Scope eolian_function_scope_get(const Eolian_Function *function_id);
+EAPI Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id);
/*
* @brief Returns the name of a function
*/
EAPI Eina_Bool eolian_class_event_information_get(const Eolian_Event *event, const char **event_name, const Eolian_Type **event_type, const char **event_desc);
+/*
+ * @brief Returns the scope of an event
+ *
+ * @param[in] event the event handle
+ * @return the event scope
+ *
+ * @ingroup Eolian
+ */
+EAPI Eolian_Object_Scope eolian_class_event_scope_get(const Eolian_Event *event);
+
/*
* @brief Indicates if the class constructor has to invoke
* a non-generated class constructor function.
if (event_comment) *event_comment = event->comment;
return EINA_TRUE;
}
+
+EAPI Eolian_Object_Scope
+eolian_class_event_scope_get(const Eolian_Event *event)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(event, EOLIAN_SCOPE_PUBLIC);
+ return event->scope;
+}
}
void
-database_function_scope_set(Eolian_Function *fid, Eolian_Function_Scope scope)
+database_function_scope_set(Eolian_Function *fid, Eolian_Object_Scope scope)
{
EINA_SAFETY_ON_NULL_RETURN(fid);
fid->scope = scope;
#include <Eina.h>
#include "eolian_database.h"
-EAPI Eolian_Function_Scope
+EAPI Eolian_Object_Scope
eolian_function_scope_get(const Eolian_Function *fid)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EOLIAN_SCOPE_PUBLIC);
}
ev->name = eina_stringshare_add(eina_strbuf_string_get(buf));
pop_strbuf(ls);
- if (ls->t.kw == KW_at_private || ls->t.kw == KW_at_protected)
- eo_lexer_get(ls);
+ if (ls->t.kw == KW_at_private)
+ {
+ ev->scope = EOLIAN_SCOPE_PRIVATE;
+ eo_lexer_get(ls);
+ }
+ else if (ls->t.kw == KW_at_protected)
+ {
+ ev->scope = EOLIAN_SCOPE_PROTECTED;
+ eo_lexer_get(ls);
+ }
if (ls->t.token == ':')
{
eo_lexer_get(ls);
Eina_List *keys; /* list of Eolian_Function_Parameter */
Eina_List *params; /* list of Eolian_Function_Parameter */
Eolian_Function_Type type;
- Eolian_Function_Scope scope;
+ Eolian_Object_Scope scope;
Eolian_Type *get_ret_type;
Eolian_Type *set_ret_type;
Eolian_Expression *get_ret_val;
Eina_Stringshare *name;
Eina_Stringshare *comment;
Eolian_Type *type;
+ int scope;
};
typedef struct _Eolian_Struct_Field
void database_function_object_set_as_const(Eolian_Function *foo_id, Eina_Bool is_const);
void database_function_set_as_class(Eolian_Function *foo_id, Eina_Bool is_class);
Eina_Bool database_function_set_as_virtual_pure(Eolian_Function *function_id, Eolian_Function_Type type);
-void database_function_scope_set(Eolian_Function *function_id, Eolian_Function_Scope scope);
+void database_function_scope_set(Eolian_Function *function_id, Eolian_Object_Scope scope);
Eolian_Function_Parameter *database_property_key_add(Eolian_Function *foo_id, Eolian_Type *type, const char *name, const char *description);
Eolian_Function_Parameter *database_property_value_add(Eolian_Function *foo_id, Eolian_Type *type, const char *name, const char *description);