chiark / gitweb /
doxygen: show corresponding #include files.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 31 Dec 2018 02:07:34 +0000 (03:07 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 31 Dec 2018 02:47:33 +0000 (03:47 +0100)
commitaa6de409edc8f35cfe9270e7946fa875a2b1b651
tree521352d6526e8a7c32bd41702bf3b1351e557493
parent96c84dce062466ab1eb9ee15864c44c23808e13d
doxygen: show corresponding #include files.

This is again a superset of the functionality that stock Doxygen
supports (well of course, I'm full-assing things as usual):

 * Classes (structs, unions) show their corresponding include file right
   in the header (that's what Doxygen does, too)
 * Besides that, namespaces that are fully contained in one file show
   the corresponding include file as well
 * In case of modules (groups) or when namespace contents are spread
   over multiple files, each member shows its own specific include file
   in the detailed docs (because not doing that would be very confusing
   for users, especially if the mapping to files is not trivial). This
   means that functions/enums/typedefs/variables/defines that were
   previously just a brief docs may now get expanded to full docs just
   to contain the include file information. This also unfortunately hits
   a bug in Doxygen, where it doesn't properly report the header
   location for declarations of free (non-member) functions and
   variables (but uses the definition location, which is in most cases
   in an (otherwise undocumented) *.cpp file). I need to report and/or
   PR that, ugh.
 * Files don't provide the include file information, because there it's
   known implicitly.
 * The SHOW_INCLUDE_FILES setting (which defaults to YES and is meant
   to be for "a list of the files that are included by a file in the
   documentation of that file" which is just absolutely fucking useless
   in every way imaginable) is reused to toggle showing of the include
   information.
 * To make the rendering a bit more compact, in case the struct or
   member contains template parameters, the include information is put
   next to these instead of after the signature.
 * As with everything else in m.css, if the corresponding header is not
   documented at all, the include file information is not present.

The \headerfile Doxygen command is not supported, because (what
a surprise! this is totally shitty as well! who would have thought!):

 * it works only for classes, you can't override the include name for
   the file itself!
 * and forget about doing anything like that for free functions,
   typedefs or the like!
 * (minor) it doesn't support #include A_MACRO
 * it doesn't seem to be exposed in the XML at all (ahahahahah AAAARGH)

Co-authored-by: Ryohei Machida <machida_mn@complex.ist.hokudai.ac.jp>
55 files changed:
css/m-dark+doxygen.compiled.css
css/m-dark.doxygen.compiled.css
css/m-doxygen.css
css/m-light+doxygen.compiled.css
css/m-light.doxygen.compiled.css
doc/doxygen.rst
doxygen/dox2html5.py
doxygen/templates/base-class-reference.html
doxygen/templates/details-define.html
doxygen/templates/details-enum.html
doxygen/templates/details-func.html
doxygen/templates/details-typedef.html
doxygen/templates/details-var.html
doxygen/templates/namespace.html
doxygen/test/compound_deprecated/namespaceDeprecatedNamespace.html
doxygen/test/compound_deprecated/structDeprecatedNamespace_1_1BaseDeprecatedClass.html
doxygen/test/compound_deprecated/structDeprecatedNamespace_1_1DeprecatedClass.html
doxygen/test/compound_detailed/namespaceEno.html
doxygen/test/compound_detailed/namespaceFoo.html
doxygen/test/compound_detailed/namespaceNamee.html
doxygen/test/compound_detailed/namespaceType.html
doxygen/test/compound_detailed/namespaceVar.html
doxygen/test/compound_detailed/namespaceWarning.html
doxygen/test/compound_detailed/structTemplate.html
doxygen/test/compound_detailed/structTemplateWarning.html
doxygen/test/compound_detailed/structTemplate_3_01void_01_4.html
doxygen/test/compound_includes/Doxyfile [new file with mode: 0644]
doxygen/test/compound_includes/First.h [new file with mode: 0644]
doxygen/test/compound_includes/Second.h [new file with mode: 0644]
doxygen/test/compound_includes/classClass.html [new file with mode: 0644]
doxygen/test/compound_includes/group__group.html [new file with mode: 0644]
doxygen/test/compound_includes/namespaceContained.html [new file with mode: 0644]
doxygen/test/compound_includes/namespaceSpread.html [new file with mode: 0644]
doxygen/test/compound_includes_disabled/Doxyfile [new file with mode: 0644]
doxygen/test/compound_includes_disabled/classClass.html [new file with mode: 0644]
doxygen/test/compound_includes_disabled/group__group.html [new file with mode: 0644]
doxygen/test/compound_includes_disabled/namespaceContained.html [new file with mode: 0644]
doxygen/test/compound_includes_disabled/namespaceSpread.html [new file with mode: 0644]
doxygen/test/compound_includes_templated/Doxyfile [new file with mode: 0644]
doxygen/test/compound_includes_templated/First.h [new file with mode: 0644]
doxygen/test/compound_includes_templated/Second.h [new file with mode: 0644]
doxygen/test/compound_includes_templated/namespaceSpread.html [new file with mode: 0644]
doxygen/test/compound_includes_templated/structStruct.html [new file with mode: 0644]
doxygen/test/compound_includes_undocumented_files/Doxyfile [new file with mode: 0644]
doxygen/test/compound_includes_undocumented_files/First.h [new file with mode: 0644]
doxygen/test/compound_includes_undocumented_files/Second.h [new file with mode: 0644]
doxygen/test/compound_listing/classRoot_1_1Directory_1_1Sub_1_1Class.html
doxygen/test/compound_listing/namespaceRoot_1_1Directory.html
doxygen/test/compound_namespace_members_in_file_scope/namespaceNamespace.html
doxygen/test/cpp_friends/classClass.html
doxygen/test/cpp_friends/classTemplate.html
doxygen/test/cpp_signals_slots/classClass.html
doxygen/test/cpp_template_alias/structTemplate.html
doxygen/test/test_compound.py
doxygen/test/test_doxyfile.py