chiark / gitweb /
doxygen: render Reference in TOC only if there is some reference.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 29 Jan 2018 22:47:32 +0000 (23:47 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 29 Jan 2018 22:59:39 +0000 (23:59 +0100)
doxygen/templates/base-reference.html
doxygen/test/compound_modules/group__subgroup.html
doxygen/test/compound_modules/input.h

index 811fe5715bdcdd7ac9e6e617942b6aabb2b0b7a3..51a87e055131cd1322012323a7e59b15c09038cd 100644 (file)
@@ -41,6 +41,7 @@
             <li><a href="#{{ id }}">{{ name }}</a></li>
             {% endif %}
             {% endfor %}
+            {% if compound.modules or compound.dirs or compound.files or compound.namespaces or compound.classes or compound.typedefs or compound.funcs or compound.vars or compound.defines or compound.groups %}
             <li>
               Reference
               <ul>
@@ -79,6 +80,7 @@
                 {% endfor %}
               </ul>
             </li>
+            {% endif %}
           </ul>
         </div>
         {% endif %}
index 73269df6fd1b813c8d12d98c0b83dda4ca55b043..0033b88c496a917b57b462ef1c34ae5c916ddc39 100644 (file)
         <div class="m-block m-default">
           <h3>Contents</h3>
           <ul>
-            <li>
-              Reference
-              <ul>
-                <li><a href="#func-members">Functions</a></li>
-              </ul>
-            </li>
+            <li><a href="#subgroup-description">Description</a></li>
           </ul>
         </div>
-        <section id="func-members">
-          <h2><a href="#func-members">Functions</a></h3>
-          <dl class="m-dox">
-            <dt>
-              <span class="m-dox-wrap-bumper">auto <a href="#gac0124d4b60010824c0b73bd5f27759c6" class="m-dox">fizzbuzz</a>(</span><span class="m-dox-wrap">) -&gt; int</span>
-            </dt>
-            <dd>Returns 5 every 5 runs or something.</dd>
-          </dl>
-        </section>
-        <section>
-          <h2>Function documentation</h2>
-          <section class="m-dox-details" id="gac0124d4b60010824c0b73bd5f27759c6"><div>
-            <h3>
-              <span class="m-dox-wrap-bumper">int </span><span class="m-dox-wrap"><span class="m-dox-wrap-bumper"><a href="#gac0124d4b60010824c0b73bd5f27759c6" class="m-dox-self">fizzbuzz</a>(</span><span class="m-dox-wrap">)</span></span>
-            </h3>
-            <p>Returns 5 every 5 runs or something.</p>
-<p>Did I pass the interview now?</p>
-          </div></section>
-        </section>
+<section id="subgroup-description"><h2><a href="#subgroup-description">Description</a></h2><p>Subgroup description. There are <strong>no members</strong>, so there should be also no Reference section in the TOC.</p></section>
       </div>
     </div>
   </div>
index 753fe3a0e21f2b78eaa63de1bd9f936a0c3886b4..c795f7f8c65628590e1bdb6a4bdbf48db470ecc6 100644 (file)
@@ -21,13 +21,9 @@ void bar();
 @defgroup subgroup A subgroup
 @brief Subgroup brief description
 @ingroup group
-@{ */
 
-/**
-@brief Returns 5 every 5 runs or something
+@section subgroup-description Description
 
-Did I pass the interview now?
+Subgroup description. There are **no members**, so there should be also no
+Reference section in the TOC.
 */
-int fizzbuzz();
-
-/*@}*/