summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-06-24 19:19:00 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2019-06-24 19:19:00 +0900
commit127209ce2b5ec5328b38fc114cd821f469dc755b (patch)
tree8fd9a59ef9d382157a9b939f1366c5d982e131f2 /src/lib/eolian_cxx
parent86afeee2246ebb9d58dc5676d58df137f5ba764c (diff)
downloadefl-127209ce2b5ec5328b38fc114cd821f469dc755b.tar.gz
eolian_mono: support eo access modifiers
Summary: Because in C# interface members can't include access modifiers, eolian_mono ignore function scope tags in eo interfaces. ref T7494 Reviewers: q66, felipealmeida, lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7494 Differential Revision: https://phab.enlightenment.org/D9128
Diffstat (limited to 'src/lib/eolian_cxx')
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index d03d52da76..628e2166c5 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -647,6 +647,14 @@ enum class function_type
function_pointer
};
+enum class member_scope
+{
+ scope_unknown,
+ scope_public,
+ scope_private,
+ scope_protected,
+};
+
struct function_def
{
klass_name klass; // Klass information for function_def as method
@@ -660,6 +668,7 @@ struct function_def
documentation_def return_documentation;
documentation_def property_documentation;
function_type type;
+ member_scope scope;
bool is_beta;
bool is_protected;
bool is_static;
@@ -678,6 +687,7 @@ struct function_def
&& lhs.return_documentation == rhs.return_documentation
&& lhs.property_documentation == rhs.property_documentation
&& lhs.type == rhs.type
+ && lhs.scope == rhs.scope
&& lhs.is_beta == rhs.is_beta
&& lhs.is_protected == rhs.is_protected
&& lhs.is_static == rhs.is_static;
@@ -697,6 +707,7 @@ struct function_def
documentation_def _return_documentation,
documentation_def _property_documentation,
function_type _type,
+ member_scope _scope,
bool _is_beta = false,
bool _is_protected = false,
bool _is_static = false,
@@ -708,6 +719,7 @@ struct function_def
return_documentation(_return_documentation),
property_documentation(_property_documentation),
type(_type),
+ scope(_scope),
is_beta(_is_beta), is_protected(_is_protected),
is_static(_is_static),
unit(unit) {}
@@ -718,6 +730,7 @@ struct function_def
Eolian_Type const* r_type = ::eolian_function_return_type_get(function, type);
name = ::eolian_function_name_get(function);
return_documentation = eolian_function_return_documentation_get(function, type);
+ scope = static_cast<member_scope>(eolian_function_scope_get(function, type));
if(r_type)
return_type.set(r_type, unit, EOLIAN_C_TYPE_RETURN);
if(type == EOLIAN_METHOD || type == EOLIAN_FUNCTION_POINTER)