From 4bd50c9f0dc1d7b1413a6bda587b8a5999cd7a19 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 30 Aug 2015 11:58:05 +0200 Subject: Moved creation of inline class documentation to separate template file --- src/context.cpp | 8 +++- templates/html/htmlclass.tpl | 7 ++-- templates/html/htmlfile.tpl | 73 ++---------------------------------- templates/html/htmlinlineclasses.tpl | 70 ++++++++++++++++++++++++++++++++++ templates/html/htmlmodule.tpl | 73 ++---------------------------------- templates/html/htmlnamespace.tpl | 73 ++---------------------------------- 6 files changed, 89 insertions(+), 215 deletions(-) create mode 100644 templates/html/htmlinlineclasses.tpl diff --git a/src/context.cpp b/src/context.cpp index 68e1167..8f9200e 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -1739,6 +1739,7 @@ class ClassContext::Private : public DefinitionContext addProperty("allMembersFileName", this,&Private::allMembersFileName); addProperty("memberGroups", this,&Private::memberGroups); addProperty("additionalInheritedMembers",this,&Private::additionalInheritedMembers); + addProperty("isSimple", this,&Private::isSimple); } virtual ~Private() {} TemplateVariant title() const @@ -2362,6 +2363,10 @@ class ClassContext::Private : public DefinitionContext } return m_cache.additionalInheritedMembers.get(); } + TemplateVariant isSimple() const + { + return m_classDef->isSimple(); + } private: ClassDef *m_classDef; @@ -5192,7 +5197,8 @@ class ClassListContext::Private : public GenericNodeListContext { continue; } - if (cd->isLinkableInProject() && cd->templateMaster()==0) + if (cd->isLinkableInProject() && cd->templateMaster()==0 && + !cd->isHidden() && !cd->isEmbeddedInOuterScope()) { append(ClassContext::alloc(cd)); } diff --git a/templates/html/htmlclass.tpl b/templates/html/htmlclass.tpl index bb734b6..24694b3 100644 --- a/templates/html/htmlclass.tpl +++ b/templates/html/htmlclass.tpl @@ -180,7 +180,6 @@ {% endif %} {# memberdecls #} - {# TODO: isSimple #} {# nestedClasses #} {% with list=compound.classes label='nested-classes' title=tr.classes local=1 %} {% include 'htmldeclcomp.tpl' %} @@ -379,9 +378,9 @@ {% endif %} {# member definitions #} {# inline classes #} - {% if compound.classes %} - {# TODO write inlined simple classes: tr.classDocumentation / tr.typeDocumentation #} - {% endif %} + {% with classList=compound.classes %} + {% include 'htmlinlineclasses.tpl' %} + {% endwith %} {# typedefs #} {% with memberListInfo=compound.detailedTypedefs %} {% include 'htmlmemdef.tpl' %} diff --git a/templates/html/htmlfile.tpl b/templates/html/htmlfile.tpl index 67af096..dbf0841 100644 --- a/templates/html/htmlfile.tpl +++ b/templates/html/htmlfile.tpl @@ -160,76 +160,9 @@ {% endif %} {# member definitions #} {# inline classes #} - {% if compound.inlineClasses %} -

{{ tr.classDocumentation }}

- {% for class in compound.inlineClasses %} - {# write anchor #} - -
-
- - -
{{ class.compoundType }} {{ class.name }}
-
-
-
- {# TODO: the stuff inside textblock can be the same as in htmlclass.tpl!! #} - {# template specifier #} - {% if class.language=='cpp' and class.templateDecls %} -

{% spaceless %} - {% for targList in class.templateDecls %} - template< - {% for targ in targList %} - {{ targ.type }}{% if targ.name %} {{ targ.name }}{% endif %}{% if targ.defVal %} = {{ targ.defVal }}{% endif %}{% if not forloop.last %}, {% endif %} - {% endfor %} - >
- {% endfor %} - {% endspaceless %} - {{ class.classType }} {{ class.name }} -

- {% endif %} - {# brief description #} - {% if class.brief and config.REPEAT_BRIEF %} -

{{ class.brief }}

- {% endif %} - {# detailed docs #} - {{ class.details }} - {# source def #} - {% if class.sourceDef %} - {% markers obj in class.sourceDef with tr.definedAtLineInSourceFile %} - {% with text=obj.text %} - {% include 'htmlobjlink.tpl' %} - {% endwith %} - {% endmarkers %} - {% endif %} -
- {# table with fields #} - - - {% for member in class.members %} - - - - - {% endfor %} -
{{ tr.compoundMembers }}
- {{ member.fieldType }} - - {{ member.name }} - {% if member.isVariable and member.declArgs %}{{ member.declArgs }}{% endif %} - {{ member.bitfields }} - - {% if member.brief and not member.details %}{# only brief #} - {{ member.brief }} - {% else %} {# only details or both #} - {% if member.brief %}

{{ member.brief }}

{% endif %} - {{ member.details }} - {% endif %} -
-
-
- {% endfor %} - {% endif %} + {% with classList=compound.inlineClasses %} + {% include 'htmlinlineclasses.tpl' %} + {% endwith %} {# defines #} {% with memberListInfo=compound.detailedMacros %} {% include 'htmlmemdef.tpl' %} diff --git a/templates/html/htmlinlineclasses.tpl b/templates/html/htmlinlineclasses.tpl new file mode 100644 index 0000000..876c491 --- /dev/null +++ b/templates/html/htmlinlineclasses.tpl @@ -0,0 +1,70 @@ +{# input: classList #} +{% if classList %} +

{{ tr.classDocumentation }}

+ {% for class in classList %} + {# write anchor #} + +
+
+ + +
{{ class.compoundType }} {{ class.name }}
+
+
+
+ {# template specifier #} + {% if class.language=='cpp' and class.templateDecls %} +

{% spaceless %} + {% for targList in class.templateDecls %} + template< + {% for targ in targList %} + {{ targ.type }}{% if targ.name %} {{ targ.name }}{% endif %}{% if targ.defVal %} = {{ targ.defVal }}{% endif %}{% if not forloop.last %}, {% endif %} + {% endfor %} + >
+ {% endfor %} + {% endspaceless %} + {{ class.classType }} {{ class.name }} +

+ {% endif %} + {# brief description #} + {% if class.brief and config.REPEAT_BRIEF %} +

{{ class.brief }}

+ {% endif %} + {# detailed docs #} + {{ class.details }} + {# source def #} + {% if class.sourceDef %} + {% markers obj in class.sourceDef with tr.definedAtLineInSourceFile %} + {% with text=obj.text %} + {% include 'htmlobjlink.tpl' %} + {% endwith %} + {% endmarkers %} + {% endif %} +
+ {# table with fields #} + + + {% for member in class.members %} + + + + + {% endfor %} +
{{ tr.compoundMembers }}
+ {{ member.fieldType }} + + {{ member.name }} + {% if member.isVariable and member.declArgs %}{{ member.declArgs }}{% endif %} + {{ member.bitfields }} + + {% if member.brief and not member.details %}{# only brief #} + {{ member.brief }} + {% else %} {# only details or both #} + {% if member.brief %}

{{ member.brief }}

{% endif %} + {{ member.details }} + {% endif %} +
+
+
+ {% endfor %} +{% endif %} diff --git a/templates/html/htmlmodule.tpl b/templates/html/htmlmodule.tpl index ff97b2c..887da1b 100644 --- a/templates/html/htmlmodule.tpl +++ b/templates/html/htmlmodule.tpl @@ -214,76 +214,9 @@ {% endif %} {# member definitions #} {# inline classes #} - {% if compound.inlineClasses %} -

{{ tr.classDocumentation }}

- {% for class in compound.inlineClasses %} - {# write anchor #} - -
-
- - -
{{ class.compoundType }} {{ class.name }}
-
-
-
- {# TODO: the stuff inside textblock can be the same as in htmlclass.tpl!! #} - {# template specifier #} - {% if class.language=='cpp' and class.templateDecls %} -

{% spaceless %} - {% for targList in class.templateDecls %} - template< - {% for targ in targList %} - {{ targ.type }}{% if targ.name %} {{ targ.name }}{% endif %}{% if targ.defVal %} = {{ targ.defVal }}{% endif %}{% if not forloop.last %}, {% endif %} - {% endfor %} - >
- {% endfor %} - {% endspaceless %} - {{ class.classType }} {{ class.name }} -

- {% endif %} - {# brief description #} - {% if class.brief and config.REPEAT_BRIEF %} -

{{ class.brief }}

- {% endif %} - {# detailed docs #} - {{ class.details }} - {# source def #} - {% if class.sourceDef %} - {% markers obj in class.sourceDef with tr.definedAtLineInSourceFile %} - {% with text=obj.text %} - {% include 'htmlobjlink.tpl' %} - {% endwith %} - {% endmarkers %} - {% endif %} -
- {# table with fields #} - - - {% for member in class.members %} - - - - - {% endfor %} -
{{ tr.compoundMembers }}
- {{ member.fieldType }} - - {{ member.name }} - {% if member.isVariable and member.declArgs %}{{ member.declArgs }}{% endif %} - {{ member.bitfields }} - - {% if member.brief and not member.details %}{# only brief #} - {{ member.brief }} - {% else %} {# only details or both #} - {% if member.brief %}

{{ member.brief }}

{% endif %} - {{ member.details }} - {% endif %} -
-
-
- {% endfor %} - {% endif %} + {% with classList=compound.inlineClasses %} + {% include 'htmlinlineclasses.tpl' %} + {% endwith %} {# defines #} {% with memberListInfo=compound.detailedMacros %} {% include 'htmlmemdef.tpl' %} diff --git a/templates/html/htmlnamespace.tpl b/templates/html/htmlnamespace.tpl index e21ba9d..eb127de 100644 --- a/templates/html/htmlnamespace.tpl +++ b/templates/html/htmlnamespace.tpl @@ -114,76 +114,9 @@ {% endif %} {# member definitions #} {# inline classes #} - {% if compound.inlineClasses %} -

{{ tr.classDocumentation }}

- {% for class in compound.inlineClasses %} - {# write anchor #} - -
-
- - -
{{ class.compoundType }} {{ class.name }}
-
-
-
- {# TODO: the stuff inside textblock can be the same as in htmlclass.tpl!! #} - {# template specifier #} - {% if class.language=='cpp' and class.templateDecls %} -

{% spaceless %} - {% for targList in class.templateDecls %} - template< - {% for targ in targList %} - {{ targ.type }}{% if targ.name %} {{ targ.name }}{% endif %}{% if targ.defVal %} = {{ targ.defVal }}{% endif %}{% if not forloop.last %}, {% endif %} - {% endfor %} - >
- {% endfor %} - {% endspaceless %} - {{ class.classType }} {{ class.name }} -

- {% endif %} - {# brief description #} - {% if class.brief and config.REPEAT_BRIEF %} -

{{ class.brief }}

- {% endif %} - {# detailed docs #} - {{ class.details }} - {# source def #} - {% if class.sourceDef %} - {% markers obj in class.sourceDef with tr.definedAtLineInSourceFile %} - {% with text=obj.text %} - {% include 'htmlobjlink.tpl' %} - {% endwith %} - {% endmarkers %} - {% endif %} -
- {# table with fields #} - - - {% for member in class.members %} - - - - - {% endfor %} -
{{ tr.compoundMembers }}
- {{ member.fieldType }} - - {{ member.name }} - {% if member.isVariable and member.declArgs %}{{ member.declArgs }}{% endif %} - {{ member.bitfields }} - - {% if member.brief and not member.details %}{# only brief #} - {{ member.brief }} - {% else %} {# only details or both #} - {% if member.brief %}

{{ member.brief }}

{% endif %} - {{ member.details }} - {% endif %} -
-
-
- {% endfor %} - {% endif %} + {% with classList=compound.inlineClasses %} + {% include 'htmlinlineclasses.tpl' %} + {% endwith %} {# typedefs #} {% with memberListInfo=compound.detailedTypedefs %} {% include 'htmlmemdef.tpl' %} -- cgit v0.12