summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/klass.hh
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-04-11 12:40:21 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-04-12 18:13:29 +0200
commit8c45aca05ed30da51972ef3122a4f0d7e7a94933 (patch)
tree010f41771caae15be5f6937ac86a7780c8e02e80 /src/bin/eolian_mono/eolian/mono/klass.hh
parent37eee70d56aeff8649822cab62f736512cebf5d0 (diff)
mono-docs: Allow derived classes to have external examples
Summary: You can now have external example files for derived classes (Efl.Ui.Button.SetText) as well as for base classes (Efl.IText.SetText). If both files are present, both examples are embedded in the docs. The more examples the better! Examples for classes in-between the hierarchy (Efl.Ui.Widget.SetText) are not picked up. Might be worth examining in the future. Test Plan: Create example files for both `Efl.Ui.Button.AutorepeatEnabled.cs` and `Efl.Ui.IAutorepeat.AutorepeatEnabled.cs`. You should see both examples appearing in the docs. Reviewers: lauromoura, vitor.sousa Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8597
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 87ad1bd..4664446 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -117,7 +117,9 @@ struct klass
117 // Interface class 117 // Interface class
118 if(class_type == "interface") 118 if(class_type == "interface")
119 { 119 {
120 auto iface_cxt = context_add_tag(class_context{class_context::interface}, context); 120 auto iface_cxt = context_add_tag(class_context{class_context::interface,
121 name_helpers::klass_full_concrete_or_interface_name(cls)},
122 context);
121 123
122 if(!as_generator(documentation).generate(sink, cls, iface_cxt)) 124 if(!as_generator(documentation).generate(sink, cls, iface_cxt))
123 return false; 125 return false;
@@ -195,7 +197,9 @@ struct klass
195 // Concrete class for interfaces, mixins, etc. 197 // Concrete class for interfaces, mixins, etc.
196 if(class_type != "class" && class_type != "abstract class") 198 if(class_type != "class" && class_type != "abstract class")
197 { 199 {
198 auto concrete_cxt = context_add_tag(class_context{class_context::concrete}, context); 200 auto concrete_cxt = context_add_tag(class_context{class_context::concrete,
201 name_helpers::klass_full_concrete_or_interface_name(cls)},
202 context);
199 auto concrete_name = name_helpers::klass_concrete_name(cls); 203 auto concrete_name = name_helpers::klass_concrete_name(cls);
200 auto interface_name = name_helpers::klass_interface_name(cls); 204 auto interface_name = name_helpers::klass_interface_name(cls);
201 205
@@ -277,7 +281,9 @@ struct klass
277 // Inheritable class 281 // Inheritable class
278 if(class_type == "class" || class_type == "abstract class") 282 if(class_type == "class" || class_type == "abstract class")
279 { 283 {
280 auto inherit_cxt = context_add_tag(class_context{class_context::inherit}, context); 284 auto inherit_cxt = context_add_tag(class_context{class_context::inherit,
285 name_helpers::klass_full_concrete_or_interface_name(cls)},
286 context);
281 287
282 // Class header 288 // Class header
283 if(!as_generator 289 if(!as_generator
@@ -351,7 +357,9 @@ struct klass
351 // Native Inherit class 357 // Native Inherit class
352 //if(class_type == "class") 358 //if(class_type == "class")
353 { 359 {
354 auto inative_cxt = context_add_tag(class_context{class_context::inherit_native}, context); 360 auto inative_cxt = context_add_tag(class_context{class_context::inherit_native,
361 name_helpers::klass_full_concrete_or_interface_name(cls)},
362 context);
355 auto native_inherit_name = name_helpers::klass_native_inherit_name(cls); 363 auto native_inherit_name = name_helpers::klass_native_inherit_name(cls);
356 auto inherit_name = name_helpers::klass_inherit_name(cls); 364 auto inherit_name = name_helpers::klass_inherit_name(cls);
357 std::string base_name; 365 std::string base_name;