summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/grammar/klass_def.hpp
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-08-01 21:12:10 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-08-01 21:12:36 +0200
commit44e00273387ddef127bb98358c729d343ef59f05 (patch)
tree18b51a1c9c6384dbf7619540670c8deb54fee23c /src/lib/eolian_cxx/grammar/klass_def.hpp
parentcf818a84be26cd5e2f57cca4b4a8ae9d5b3715f4 (diff)
mono-docs: Add misc struct docs
Summary: Structs have a convenience constructor which was missing parameter documentation. Struct fields need a <value> tag or there is a hole in the generated docs. The documentation for the type of the field has been used, when available. Test Plan: Build docs and look at generated pages for structs. Reviewers: lauromoura, vitor.sousa, felipealmeida Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9478
Diffstat (limited to '')
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index c3c524c5b4..9157cfd5b1 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -375,10 +375,11 @@ struct type_def
375 bool has_own; 375 bool has_own;
376 bool is_ptr; 376 bool is_ptr;
377 bool is_beta; 377 bool is_beta;
378 std::string doc_summary;
378 379
379 type_def() = default; 380 type_def() = default;
380 type_def(variant_type original_type, std::string c_type, bool has_own, bool is_ptr, bool is_beta) 381 type_def(variant_type original_type, std::string c_type, bool has_own, bool is_ptr, bool is_beta, std::string doc_summary)
381 : original_type(original_type), c_type(c_type), has_own(has_own), is_ptr(is_ptr), is_beta(is_beta) {} 382 : original_type(original_type), c_type(c_type), has_own(has_own), is_ptr(is_ptr), is_beta(is_beta), doc_summary(doc_summary) {}
382 383
383 type_def(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype) 384 type_def(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype)
384 { 385 {
@@ -422,7 +423,7 @@ inline bool operator!=(type_def const& lhs, type_def const& rhs)
422 return !(lhs == rhs); 423 return !(lhs == rhs);
423} 424}
424 425
425type_def const void_ {attributes::regular_type_def{"void", {qualifier_info::is_none, {}}, {}}, "void", false, false, false}; 426type_def const void_ {attributes::regular_type_def{"void", {qualifier_info::is_none, {}}, {}}, "void", false, false, false, ""};
426 427
427inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype) 428inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* unit, Eolian_C_Type_Type ctype)
428{ 429{
@@ -434,6 +435,11 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
434 435
435 Eolian_Typedecl const* decl = eolian_type_typedecl_get(eolian_type); 436 Eolian_Typedecl const* decl = eolian_type_typedecl_get(eolian_type);
436 is_beta = decl && eolian_object_is_beta(EOLIAN_OBJECT(decl)); 437 is_beta = decl && eolian_object_is_beta(EOLIAN_OBJECT(decl));
438 if (decl)
439 {
440 documentation_def documentation = eolian_typedecl_documentation_get(decl);
441 doc_summary = documentation.summary;
442 }
437 switch( ::eolian_type_type_get(eolian_type)) 443 switch( ::eolian_type_type_get(eolian_type))
438 { 444 {
439 case EOLIAN_TYPE_VOID: 445 case EOLIAN_TYPE_VOID: