summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/grammar/klass_def.hpp
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/grammar/klass_def.hpp
parent86afeee2246ebb9d58dc5676d58df137f5ba764c (diff)
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 '')
-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
647 function_pointer 647 function_pointer
648}; 648};
649 649
650enum class member_scope
651{
652 scope_unknown,
653 scope_public,
654 scope_private,
655 scope_protected,
656};
657
650struct function_def 658struct function_def
651{ 659{
652 klass_name klass; // Klass information for function_def as method 660 klass_name klass; // Klass information for function_def as method
@@ -660,6 +668,7 @@ struct function_def
660 documentation_def return_documentation; 668 documentation_def return_documentation;
661 documentation_def property_documentation; 669 documentation_def property_documentation;
662 function_type type; 670 function_type type;
671 member_scope scope;
663 bool is_beta; 672 bool is_beta;
664 bool is_protected; 673 bool is_protected;
665 bool is_static; 674 bool is_static;
@@ -678,6 +687,7 @@ struct function_def
678 && lhs.return_documentation == rhs.return_documentation 687 && lhs.return_documentation == rhs.return_documentation
679 && lhs.property_documentation == rhs.property_documentation 688 && lhs.property_documentation == rhs.property_documentation
680 && lhs.type == rhs.type 689 && lhs.type == rhs.type
690 && lhs.scope == rhs.scope
681 && lhs.is_beta == rhs.is_beta 691 && lhs.is_beta == rhs.is_beta
682 && lhs.is_protected == rhs.is_protected 692 && lhs.is_protected == rhs.is_protected
683 && lhs.is_static == rhs.is_static; 693 && lhs.is_static == rhs.is_static;
@@ -697,6 +707,7 @@ struct function_def
697 documentation_def _return_documentation, 707 documentation_def _return_documentation,
698 documentation_def _property_documentation, 708 documentation_def _property_documentation,
699 function_type _type, 709 function_type _type,
710 member_scope _scope,
700 bool _is_beta = false, 711 bool _is_beta = false,
701 bool _is_protected = false, 712 bool _is_protected = false,
702 bool _is_static = false, 713 bool _is_static = false,
@@ -708,6 +719,7 @@ struct function_def
708 return_documentation(_return_documentation), 719 return_documentation(_return_documentation),
709 property_documentation(_property_documentation), 720 property_documentation(_property_documentation),
710 type(_type), 721 type(_type),
722 scope(_scope),
711 is_beta(_is_beta), is_protected(_is_protected), 723 is_beta(_is_beta), is_protected(_is_protected),
712 is_static(_is_static), 724 is_static(_is_static),
713 unit(unit) {} 725 unit(unit) {}
@@ -718,6 +730,7 @@ struct function_def
718 Eolian_Type const* r_type = ::eolian_function_return_type_get(function, type); 730 Eolian_Type const* r_type = ::eolian_function_return_type_get(function, type);
719 name = ::eolian_function_name_get(function); 731 name = ::eolian_function_name_get(function);
720 return_documentation = eolian_function_return_documentation_get(function, type); 732 return_documentation = eolian_function_return_documentation_get(function, type);
733 scope = static_cast<member_scope>(eolian_function_scope_get(function, type));
721 if(r_type) 734 if(r_type)
722 return_type.set(r_type, unit, EOLIAN_C_TYPE_RETURN); 735 return_type.set(r_type, unit, EOLIAN_C_TYPE_RETURN);
723 if(type == EOLIAN_METHOD || type == EOLIAN_FUNCTION_POINTER) 736 if(type == EOLIAN_METHOD || type == EOLIAN_FUNCTION_POINTER)