summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/marshall_type.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/marshall_type.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_type.hh46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_type.hh b/src/bin/eolian_mono/eolian/mono/marshall_type.hh
index add954a..5c350ad 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_type.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_type.hh
@@ -13,8 +13,6 @@ template <typename OutputIterator, typename Context>
13struct marshall_type_visitor_generate; 13struct marshall_type_visitor_generate;
14template <typename OutputIterator, typename Context> 14template <typename OutputIterator, typename Context>
15struct marshall_annotation_visitor_generate; 15struct marshall_annotation_visitor_generate;
16template <typename OutputIterator, typename Context>
17struct marshall_native_annotation_visitor_generate;
18} 16}
19 17
20/* 18/*
@@ -73,26 +71,6 @@ struct marshall_annotation_generator
73 bool is_return; 71 bool is_return;
74}; 72};
75 73
76struct marshall_native_annotation_generator
77{
78 marshall_native_annotation_generator(bool is_return = false)
79 : is_return(is_return) {}
80
81 template <typename OutputIterator, typename Context>
82 bool generate(OutputIterator sink, attributes::type_def const& type, Context const& context) const
83 {
84 return type.original_type.visit(detail::marshall_native_annotation_visitor_generate<OutputIterator, Context>{sink, &context, type.c_type, false, is_return, type.is_ptr});
85 }
86 template <typename OutputIterator, typename Context>
87 bool generate(OutputIterator sink, attributes::parameter_def const& param, Context const& context) const
88 {
89 return param.type.original_type.visit(detail::marshall_native_annotation_visitor_generate<OutputIterator, Context>{sink, &context, param.type.c_type
90 , param.direction != attributes::parameter_direction::in, false, param.type.is_ptr});
91 }
92
93 bool is_return;
94};
95
96struct marshall_type_terminal 74struct marshall_type_terminal
97{ 75{
98 marshall_type_generator const operator()(bool is_return) const 76 marshall_type_generator const operator()(bool is_return) const
@@ -120,19 +98,6 @@ marshall_annotation_generator const as_generator(marshall_annotation_terminal)
120} 98}
121 99
122 100
123struct marshall_native_annotation_terminal
124{
125 marshall_native_annotation_generator const operator()(bool is_return) const
126 {
127 return marshall_native_annotation_generator(is_return);
128 }
129} const marshall_native_annotation = {};
130
131marshall_native_annotation_generator const as_generator(marshall_native_annotation_terminal)
132{
133 return marshall_native_annotation_generator{};
134}
135
136} 101}
137 102
138namespace efl { namespace eolian { namespace grammar { 103namespace efl { namespace eolian { namespace grammar {
@@ -158,23 +123,12 @@ struct is_generator< ::eolian_mono::marshall_annotation_generator> : std::true_t
158template <> 123template <>
159struct is_generator< ::eolian_mono::marshall_annotation_terminal> : std::true_type {}; 124struct is_generator< ::eolian_mono::marshall_annotation_terminal> : std::true_type {};
160 125
161template <>
162struct is_eager_generator< ::eolian_mono::marshall_native_annotation_generator> : std::true_type {};
163template <>
164struct is_generator< ::eolian_mono::marshall_native_annotation_generator> : std::true_type {};
165template <>
166struct is_generator< ::eolian_mono::marshall_native_annotation_terminal> : std::true_type {};
167
168namespace type_traits { 126namespace type_traits {
169template <> 127template <>
170struct attributes_needed< ::eolian_mono::marshall_annotation_generator> : std::integral_constant<int, 1> {}; 128struct attributes_needed< ::eolian_mono::marshall_annotation_generator> : std::integral_constant<int, 1> {};
171template <> 129template <>
172struct attributes_needed< ::eolian_mono::marshall_annotation_terminal> : std::integral_constant<int, 1> {}; 130struct attributes_needed< ::eolian_mono::marshall_annotation_terminal> : std::integral_constant<int, 1> {};
173 131
174template <>
175struct attributes_needed< ::eolian_mono::marshall_native_annotation_generator> : std::integral_constant<int, 1> {};
176template <>
177struct attributes_needed< ::eolian_mono::marshall_native_annotation_terminal> : std::integral_constant<int, 1> {};
178} 132}
179 133
180} } } 134} } }