@xpack/doxygen2docusaurus 1.1.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +4 -3
- package/bin/doxygen2docusaurus.js +1 -1
- package/dist/cli/main.d.ts +0 -8
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +1 -29
- package/dist/cli/main.js.map +1 -1
- package/dist/docusaurus/cli-options.d.ts +4 -65
- package/dist/docusaurus/cli-options.d.ts.map +1 -1
- package/dist/docusaurus/cli-options.js +16 -91
- package/dist/docusaurus/cli-options.js.map +1 -1
- package/dist/docusaurus/generator.d.ts +7 -4
- package/dist/docusaurus/generator.d.ts.map +1 -1
- package/dist/docusaurus/generator.js +50 -140
- package/dist/docusaurus/generator.js.map +1 -1
- package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/descriptiontype.js +11 -138
- package/dist/docusaurus/renderers/descriptiontype.js.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.js +0 -24
- package/dist/docusaurus/renderers/docinternalstype.js.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.js +0 -22
- package/dist/docusaurus/renderers/doclisttype.js.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.js +1 -25
- package/dist/docusaurus/renderers/doctabletype.js.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.js +0 -20
- package/dist/docusaurus/renderers/doctitletype.js.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.js +1 -25
- package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.js +0 -16
- package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.js +0 -12
- package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -1
- package/dist/docusaurus/renderers/inctype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/inctype.js +0 -18
- package/dist/docusaurus/renderers/inctype.js.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.js +0 -23
- package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -1
- package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/listingtype.js +1 -24
- package/dist/docusaurus/renderers/listingtype.js.map +1 -1
- package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/paramtype.js +2 -29
- package/dist/docusaurus/renderers/paramtype.js.map +1 -1
- package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/referencetype.js +0 -17
- package/dist/docusaurus/renderers/referencetype.js.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.js +0 -16
- package/dist/docusaurus/renderers/reftexttype.js.map +1 -1
- package/dist/docusaurus/renderers/reftype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftype.js +0 -16
- package/dist/docusaurus/renderers/reftype.js.map +1 -1
- package/dist/docusaurus/renderers/renderers.d.ts.map +1 -1
- package/dist/docusaurus/renderers/renderers.js +4 -33
- package/dist/docusaurus/renderers/renderers.js.map +1 -1
- package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/substringtype.js +0 -17
- package/dist/docusaurus/renderers/substringtype.js.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.js +0 -17
- package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -1
- package/dist/docusaurus/types.d.ts +4 -8
- package/dist/docusaurus/types.d.ts.map +1 -1
- package/dist/docusaurus/types.js +0 -11
- package/dist/docusaurus/types.js.map +1 -1
- package/dist/docusaurus/utils.d.ts.map +1 -1
- package/dist/docusaurus/utils.js +0 -82
- package/dist/docusaurus/utils.js.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.d.ts +2 -2
- package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.js +12 -87
- package/dist/docusaurus/view-model/classes-vm.js.map +1 -1
- package/dist/docusaurus/view-model/collection-base.d.ts +2 -2
- package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -1
- package/dist/docusaurus/view-model/collection-base.js +11 -23
- package/dist/docusaurus/view-model/collection-base.js.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.d.ts +2 -32
- package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.js +47 -129
- package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -1
- package/dist/docusaurus/view-model/concepts-vm.d.ts +26 -0
- package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/concepts-vm.js +329 -0
- package/dist/docusaurus/view-model/concepts-vm.js.map +1 -0
- package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -1
- package/dist/docusaurus/view-model/description-anchors.js +0 -13
- package/dist/docusaurus/view-model/description-anchors.js.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +2 -2
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.js +64 -110
- package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.d.ts +2 -2
- package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.js +7 -80
- package/dist/docusaurus/view-model/groups-vm.js.map +1 -1
- package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/members-vm.js +17 -154
- package/dist/docusaurus/view-model/members-vm.js.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.d.ts +6 -2
- package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.js +82 -89
- package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
- package/dist/docusaurus/view-model/options.d.ts.map +1 -1
- package/dist/docusaurus/view-model/options.js +0 -14
- package/dist/docusaurus/view-model/options.js.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.d.ts +2 -2
- package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.js +3 -50
- package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts +8 -22
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.js +54 -54
- package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -1
- package/dist/docusaurus/view-model/view-model.d.ts +0 -6
- package/dist/docusaurus/view-model/view-model.d.ts.map +1 -1
- package/dist/docusaurus/view-model/view-model.js +20 -63
- package/dist/docusaurus/view-model/view-model.js.map +1 -1
- package/dist/docusaurus/workspace.d.ts +1 -20
- package/dist/docusaurus/workspace.d.ts.map +1 -1
- package/dist/docusaurus/workspace.js +9 -116
- package/dist/docusaurus/workspace.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +5 -7
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.js +23 -187
- package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +0 -9
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +1 -47
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +0 -39
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +36 -1308
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +0 -64
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js +0 -35
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +1 -44
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +0 -9
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.js +3 -48
- package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +3 -15
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +5 -57
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +0 -38
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.js +4 -52
- package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +2 -10
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +19 -64
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js +1 -45
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.js +0 -43
- package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.js +0 -51
- package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +0 -9
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.js +2 -47
- package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js +2 -38
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +0 -21
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.js +4 -82
- package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +1 -42
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +0 -9
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +0 -53
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +0 -12
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +0 -105
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +0 -38
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/data-model.d.ts +0 -65
- package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
- package/dist/doxygen/data-model/data-model.js +4 -115
- package/dist/doxygen/data-model/data-model.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +4 -47
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +0 -40
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +0 -236
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.js +0 -289
- package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +2 -45
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +0 -41
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +0 -6
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.js +1 -43
- package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/types.d.ts +1 -10
- package/dist/doxygen/data-model/types.d.ts.map +1 -1
- package/dist/doxygen/data-model/types.js +0 -15
- package/dist/doxygen/data-model/types.js.map +1 -1
- package/dist/index.d.ts +4 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -42
- package/dist/index.js.map +1 -1
- package/package.json +53 -56
- package/src/cli/main.ts +122 -0
- package/src/docusaurus/cli-options.ts +560 -0
- package/src/docusaurus/generator.ts +788 -0
- package/src/docusaurus/renderers/descriptiontype.ts +1299 -0
- package/src/docusaurus/renderers/docinternalstype.ts +354 -0
- package/src/docusaurus/renderers/doclisttype.ts +134 -0
- package/src/docusaurus/renderers/doctabletype.ts +220 -0
- package/src/docusaurus/renderers/doctitletype.ts +77 -0
- package/src/docusaurus/renderers/docvariablelisttype.ts +123 -0
- package/src/docusaurus/renderers/docxrefsecttype.ts +84 -0
- package/src/docusaurus/renderers/element-renderer-base.ts +112 -0
- package/src/docusaurus/renderers/inctype.ts +75 -0
- package/src/docusaurus/renderers/linkedtexttype.ts +64 -0
- package/src/docusaurus/renderers/listingtype.ts +235 -0
- package/src/docusaurus/renderers/paramtype.ts +116 -0
- package/src/docusaurus/renderers/referencetype.ts +83 -0
- package/src/docusaurus/renderers/reftexttype.ts +81 -0
- package/src/docusaurus/renderers/reftype.ts +77 -0
- package/src/docusaurus/renderers/renderers.ts +756 -0
- package/src/docusaurus/renderers/substringtype.ts +53 -0
- package/src/docusaurus/renderers/tableofcontentstype.ts +74 -0
- package/src/docusaurus/types.ts +187 -0
- package/src/docusaurus/utils.ts +409 -0
- package/src/docusaurus/view-model/README.md +12 -0
- package/src/docusaurus/view-model/classes-vm.ts +1088 -0
- package/src/docusaurus/view-model/collection-base.ts +352 -0
- package/src/docusaurus/view-model/compound-base-vm.ts +1340 -0
- package/src/docusaurus/view-model/concepts-vm.ts +719 -0
- package/src/docusaurus/view-model/description-anchors.ts +107 -0
- package/src/docusaurus/view-model/files-and-folders-vm.ts +1293 -0
- package/src/docusaurus/view-model/groups-vm.ts +548 -0
- package/src/docusaurus/view-model/members-vm.ts +1943 -0
- package/src/docusaurus/view-model/namespaces-vm.ts +1018 -0
- package/src/docusaurus/view-model/options.ts +95 -0
- package/src/docusaurus/view-model/pages-vm.ts +342 -0
- package/src/docusaurus/view-model/tree-entries-vm.ts +376 -0
- package/src/docusaurus/view-model/view-model.ts +513 -0
- package/src/docusaurus/workspace.ts +588 -0
- package/src/doxygen/data-model/README.md +13 -0
- package/src/doxygen/data-model/compounds/compounddef-dm.ts +1156 -0
- package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +266 -0
- package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +10107 -0
- package/src/doxygen/data-model/compounds/docvarlistentrytype-dm.ts +354 -0
- package/src/doxygen/data-model/compounds/doxygentype-dm.ts +187 -0
- package/src/doxygen/data-model/compounds/enumvaluetype-dm.ts +218 -0
- package/src/doxygen/data-model/compounds/inctype-dm.ts +217 -0
- package/src/doxygen/data-model/compounds/linkedtexttype-dm.ts +288 -0
- package/src/doxygen/data-model/compounds/listofallmemberstype-dm.ts +160 -0
- package/src/doxygen/data-model/compounds/locationtype-dm.ts +284 -0
- package/src/doxygen/data-model/compounds/memberdeftype-dm.ts +874 -0
- package/src/doxygen/data-model/compounds/memberreftype-dm.ts +270 -0
- package/src/doxygen/data-model/compounds/membertype-dm.ts +239 -0
- package/src/doxygen/data-model/compounds/paramtype-dm.ts +302 -0
- package/src/doxygen/data-model/compounds/referencetype-dm.ts +248 -0
- package/src/doxygen/data-model/compounds/reftexttype-dm.ts +234 -0
- package/src/doxygen/data-model/compounds/reftype-dm.ts +430 -0
- package/src/doxygen/data-model/compounds/reimplementtype-dm.ts +201 -0
- package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +330 -0
- package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +563 -0
- package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +150 -0
- package/src/doxygen/data-model/data-model.ts +377 -0
- package/src/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.ts +271 -0
- package/src/doxygen/data-model/doxyfile/doxyfiletype-dm.ts +200 -0
- package/src/doxygen/data-model/doxygen-xml-parser.ts +522 -0
- package/src/doxygen/data-model/index/indexcompoundtype-dm.ts +256 -0
- package/src/doxygen/data-model/index/indexdoxygentype-dm.ts +196 -0
- package/src/doxygen/data-model/index/indexmembertype-dm.ts +230 -0
- package/src/doxygen/data-model/types.ts +175 -0
- package/src/doxygen/data-model/xsds/README.md +6 -0
- package/src/doxygen/data-model/xsds/compound.xsd +1699 -0
- package/src/doxygen/data-model/xsds/doxyfile.xsd +355 -0
- package/src/doxygen/data-model/xsds/index.xsd +72 -0
- package/src/doxygen/data-model/xsds/xml.xsd +23 -0
- package/src/index.ts +261 -0
- package/src/tsconfig.json +10 -0
- package/dist/doxygen2docusaurus.d.ts +0 -1147
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/tsdoc-metadata.json +0 -11
- /package/{template → templates}/css/custom.css +0 -0
- /package/{template → templates}/img/README.md +0 -0
- /package/{template → templates}/img/document-svgrepo-com.svg +0 -0
- /package/{template → templates}/img/folder-svgrepo-com.svg +0 -0
|
@@ -0,0 +1,1088 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
|
+
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
+
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
7
|
+
*
|
|
8
|
+
* If a copy of the license was not distributed with this file, it can
|
|
9
|
+
* be obtained from https://opensource.org/licenses/MIT.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// ----------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
// import * as util from 'node:util'
|
|
15
|
+
import assert from 'node:assert'
|
|
16
|
+
import crypto from 'node:crypto'
|
|
17
|
+
|
|
18
|
+
import { CompoundBase } from './compound-base-vm.js'
|
|
19
|
+
import type { CompoundDefDataModel } from '../../doxygen/data-model/compounds/compounddef-dm.js'
|
|
20
|
+
import { CollectionBase } from './collection-base.js'
|
|
21
|
+
import {
|
|
22
|
+
flattenPath,
|
|
23
|
+
sanitizeAnonymousNamespace,
|
|
24
|
+
sanitizeHierarchicalPath,
|
|
25
|
+
} from '../utils.js'
|
|
26
|
+
import type {
|
|
27
|
+
SidebarCategory,
|
|
28
|
+
SidebarCategoryItem,
|
|
29
|
+
SidebarDocItem,
|
|
30
|
+
SidebarItem,
|
|
31
|
+
FrontMatter,
|
|
32
|
+
NavbarItem,
|
|
33
|
+
} from '../types.js'
|
|
34
|
+
import type {
|
|
35
|
+
BaseCompoundRefDataModel,
|
|
36
|
+
DerivedCompoundRefDataModel,
|
|
37
|
+
} from '../../doxygen/data-model/compounds/compoundreftype-dm.js'
|
|
38
|
+
import type { TemplateParamListDataModel } from '../../doxygen/data-model/compounds/templateparamlisttype-dm.js'
|
|
39
|
+
import { ClassTreeEntry, type TreeEntryBase } from './tree-entries-vm.js'
|
|
40
|
+
|
|
41
|
+
// ----------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Mapping of class kinds to their plural display names.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Used for generating appropriate headings and labels in the documentation
|
|
48
|
+
* output based on the specific type of class compound.
|
|
49
|
+
*/
|
|
50
|
+
const kindsPlurals: Record<string, string> = {
|
|
51
|
+
class: 'Classes',
|
|
52
|
+
struct: 'Structs',
|
|
53
|
+
union: 'Unions',
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ----------------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Manages the collection of class, struct, and union documentation.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Handles the organisation and generation of class-type compound
|
|
63
|
+
* documentation, including hierarchy creation, sidebar generation,
|
|
64
|
+
* and index file creation. Supports inheritance relationships and
|
|
65
|
+
* alphabetical organisation.
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export class Classes extends CollectionBase {
|
|
70
|
+
// compoundsById: Map<string, Class>
|
|
71
|
+
/**
|
|
72
|
+
* Array of top-level classes without parent classes.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* Contains classes that are not derived from other documented classes,
|
|
76
|
+
* used for organising hierarchical displays and inheritance trees.
|
|
77
|
+
*/
|
|
78
|
+
topLevelClasses: Class[] = []
|
|
79
|
+
|
|
80
|
+
// --------------------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
// constructor (workspace: Workspace) {
|
|
83
|
+
// super(workspace)
|
|
84
|
+
|
|
85
|
+
// // this.compoundsById = new Map()
|
|
86
|
+
// }
|
|
87
|
+
|
|
88
|
+
// --------------------------------------------------------------------------
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Adds a class compound to the collection.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* Creates a new Class instance from the compound definition and registers
|
|
95
|
+
* it in the collection for later processing and hierarchy creation.
|
|
96
|
+
*
|
|
97
|
+
* @param compoundDef - The compound definition for the class
|
|
98
|
+
* @returns The created Class instance
|
|
99
|
+
*/
|
|
100
|
+
override addChild(compoundDef: CompoundDefDataModel): CompoundBase {
|
|
101
|
+
const classs = new Class(this, compoundDef)
|
|
102
|
+
this.collectionCompoundsById.set(classs.id, classs)
|
|
103
|
+
|
|
104
|
+
return classs
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// --------------------------------------------------------------------------
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Creates hierarchical relationships between class compounds.
|
|
111
|
+
*
|
|
112
|
+
* @remarks
|
|
113
|
+
* Establishes parent-child relationships based on inheritance data,
|
|
114
|
+
* building the class hierarchy tree and identifying top-level classes
|
|
115
|
+
* that have no documented parent classes.
|
|
116
|
+
*/
|
|
117
|
+
override createCompoundsHierarchies(): void {
|
|
118
|
+
// Recreate classes hierarchies.
|
|
119
|
+
for (const [classId, classs] of this.collectionCompoundsById) {
|
|
120
|
+
if (!(classs instanceof Class)) {
|
|
121
|
+
continue
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
for (const baseClassId of classs.baseClassIds) {
|
|
125
|
+
// console.log(classId, baseClassId)
|
|
126
|
+
const baseClass = this.collectionCompoundsById.get(baseClassId)
|
|
127
|
+
if (baseClass instanceof Class) {
|
|
128
|
+
// console.log('baseClassId', baseClassId, 'has child', classId)
|
|
129
|
+
baseClass.children.push(classs)
|
|
130
|
+
|
|
131
|
+
classs.baseClasses.push(baseClass)
|
|
132
|
+
} else {
|
|
133
|
+
if (this.workspace.options.debug) {
|
|
134
|
+
console.log(baseClass)
|
|
135
|
+
}
|
|
136
|
+
console.warn(baseClassId, 'ignored as base class for', classId)
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
for (const [classId, classs] of this.collectionCompoundsById) {
|
|
142
|
+
if (!(classs instanceof Class)) {
|
|
143
|
+
continue
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (classs.baseClassIds.size === 0) {
|
|
147
|
+
if (this.workspace.options.debug) {
|
|
148
|
+
console.log('topLevelClassId:', classId, classs.compoundName)
|
|
149
|
+
}
|
|
150
|
+
this.topLevelClasses.push(classs)
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// --------------------------------------------------------------------------
|
|
156
|
+
|
|
157
|
+
override addSidebarItems(sidebarCategory: SidebarCategory): void {
|
|
158
|
+
const indicesSet = this.workspace.indicesMaps.get('classes')
|
|
159
|
+
if (indicesSet === undefined) {
|
|
160
|
+
return
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Add classes to the sidebar.
|
|
164
|
+
// Top level classes are added below a Class category
|
|
165
|
+
const classesCategory: SidebarCategoryItem = {
|
|
166
|
+
type: 'category',
|
|
167
|
+
label: 'Classes',
|
|
168
|
+
link: {
|
|
169
|
+
type: 'doc',
|
|
170
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/index`,
|
|
171
|
+
},
|
|
172
|
+
collapsed: true,
|
|
173
|
+
items: [
|
|
174
|
+
{
|
|
175
|
+
type: 'category',
|
|
176
|
+
label: 'Hierarchy',
|
|
177
|
+
link: {
|
|
178
|
+
type: 'doc',
|
|
179
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/index`,
|
|
180
|
+
},
|
|
181
|
+
collapsed: true,
|
|
182
|
+
items: [],
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Add the hierarchy.
|
|
188
|
+
for (const classs of this.topLevelClasses) {
|
|
189
|
+
const item = this.createSidebarItemRecursively(classs)
|
|
190
|
+
if (item !== undefined) {
|
|
191
|
+
;(classesCategory.items[0] as SidebarCategoryItem).items.push(item)
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Add the rest of the entries.
|
|
196
|
+
if (indicesSet.has('classes')) {
|
|
197
|
+
classesCategory.items.push({
|
|
198
|
+
type: 'doc',
|
|
199
|
+
label: 'All',
|
|
200
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/all`,
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (indicesSet.has('classes')) {
|
|
205
|
+
classesCategory.items.push({
|
|
206
|
+
type: 'doc',
|
|
207
|
+
label: 'Classes',
|
|
208
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/classes`,
|
|
209
|
+
})
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (indicesSet.has('functions')) {
|
|
213
|
+
classesCategory.items.push({
|
|
214
|
+
type: 'doc',
|
|
215
|
+
label: 'Functions',
|
|
216
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/functions`,
|
|
217
|
+
})
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (indicesSet.has('variables')) {
|
|
221
|
+
classesCategory.items.push({
|
|
222
|
+
type: 'doc',
|
|
223
|
+
label: 'Variables',
|
|
224
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/variables`,
|
|
225
|
+
})
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (indicesSet.has('typedefs')) {
|
|
229
|
+
classesCategory.items.push({
|
|
230
|
+
type: 'doc',
|
|
231
|
+
label: 'Typedefs',
|
|
232
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/typedefs`,
|
|
233
|
+
})
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (indicesSet.has('enums')) {
|
|
237
|
+
classesCategory.items.push({
|
|
238
|
+
type: 'doc',
|
|
239
|
+
label: 'Enums',
|
|
240
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/enums`,
|
|
241
|
+
})
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (indicesSet.has('enumvalues')) {
|
|
245
|
+
classesCategory.items.push({
|
|
246
|
+
type: 'doc',
|
|
247
|
+
label: 'Enum Values',
|
|
248
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/enumvalues`,
|
|
249
|
+
})
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
sidebarCategory.items.push(classesCategory)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Creates sidebar item for class hierarchy recursively.
|
|
257
|
+
*
|
|
258
|
+
* @remarks
|
|
259
|
+
* Generates hierarchical sidebar structures for class inheritance
|
|
260
|
+
* trees, creating category items for classes with children and
|
|
261
|
+
* document items for leaf classes. Handles sidebar label and ID
|
|
262
|
+
* generation with proper CSS classes.
|
|
263
|
+
*
|
|
264
|
+
* @param classs - The class to create sidebar item for
|
|
265
|
+
* @returns The sidebar item or undefined if class lacks required data
|
|
266
|
+
*/
|
|
267
|
+
private createSidebarItemRecursively(classs: Class): SidebarItem | undefined {
|
|
268
|
+
if (classs.sidebarLabel === undefined || classs.sidebarId === undefined) {
|
|
269
|
+
return undefined
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (classs.children.length === 0) {
|
|
273
|
+
const docItem: SidebarDocItem = {
|
|
274
|
+
type: 'doc',
|
|
275
|
+
label: classs.sidebarLabel,
|
|
276
|
+
className: 'doxyEllipsis',
|
|
277
|
+
id: `${this.workspace.sidebarBaseId}${classs.sidebarId}`,
|
|
278
|
+
}
|
|
279
|
+
return docItem
|
|
280
|
+
} else {
|
|
281
|
+
const categoryItem: SidebarCategoryItem = {
|
|
282
|
+
type: 'category',
|
|
283
|
+
label: classs.sidebarLabel,
|
|
284
|
+
link: {
|
|
285
|
+
type: 'doc',
|
|
286
|
+
id: `${this.workspace.sidebarBaseId}${classs.sidebarId}`,
|
|
287
|
+
},
|
|
288
|
+
className: 'doxyEllipsis',
|
|
289
|
+
collapsed: true,
|
|
290
|
+
items: [],
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
for (const child of classs.children) {
|
|
294
|
+
if (child instanceof Class) {
|
|
295
|
+
const item = this.createSidebarItemRecursively(child)
|
|
296
|
+
if (item !== undefined) {
|
|
297
|
+
categoryItem.items.push(item)
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return categoryItem
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// --------------------------------------------------------------------------
|
|
307
|
+
|
|
308
|
+
override createNavbarItems(): NavbarItem[] {
|
|
309
|
+
const navbarItem: NavbarItem = {
|
|
310
|
+
label: 'Classes',
|
|
311
|
+
to: `${this.workspace.menuBaseUrl}classes/`,
|
|
312
|
+
}
|
|
313
|
+
return [navbarItem]
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// --------------------------------------------------------------------------
|
|
317
|
+
|
|
318
|
+
override async generateIndexDotMdFile(): Promise<void> {
|
|
319
|
+
if (this.topLevelClasses.length === 0) {
|
|
320
|
+
return
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const filePath =
|
|
324
|
+
this.workspace.outputFolderPath + 'indices/classes/index.md'
|
|
325
|
+
const permalink = 'classes'
|
|
326
|
+
|
|
327
|
+
const frontMatter: FrontMatter = {
|
|
328
|
+
title: 'Classes',
|
|
329
|
+
slug: `${this.workspace.slugBaseUrl}${permalink}`,
|
|
330
|
+
description:
|
|
331
|
+
'The C++ classes, structs, unions, and interfaces ' +
|
|
332
|
+
'defined in the project',
|
|
333
|
+
custom_edit_url: null,
|
|
334
|
+
keywords: ['doxygen', 'classes', 'reference'],
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const contentLines: string[] = []
|
|
338
|
+
for (const classs of this.topLevelClasses) {
|
|
339
|
+
contentLines.push(...this.generateIndexMdFileRecursively(classs, 1))
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (contentLines.length === 0) {
|
|
343
|
+
return
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const lines: string[] = []
|
|
347
|
+
|
|
348
|
+
lines.push(
|
|
349
|
+
'The classes, structs, union and interfaces used by this project are:'
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
lines.push(...this.workspace.renderTreeTableToHtmlLines({ contentLines }))
|
|
353
|
+
|
|
354
|
+
if (this.workspace.options.verbose) {
|
|
355
|
+
console.log(`Writing classes index file '${filePath}'...`)
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
await this.workspace.writeOutputMdFile({
|
|
359
|
+
filePath,
|
|
360
|
+
frontMatter,
|
|
361
|
+
bodyLines: lines,
|
|
362
|
+
})
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Generates hierarchical index content for class documentation recursively.
|
|
367
|
+
*
|
|
368
|
+
* @remarks
|
|
369
|
+
* Creates HTML tree table rows for class hierarchies with proper
|
|
370
|
+
* indentation, icons, and descriptions. Processes inheritance
|
|
371
|
+
* relationships and generates nested table structures for parent-child
|
|
372
|
+
* class relationships.
|
|
373
|
+
*
|
|
374
|
+
* @param classs - The class to generate index content for
|
|
375
|
+
* @param depth - The current depth level in the hierarchy (1-based)
|
|
376
|
+
* @returns Array of HTML strings representing the tree table rows
|
|
377
|
+
*/
|
|
378
|
+
private generateIndexMdFileRecursively(
|
|
379
|
+
classs: Class,
|
|
380
|
+
depth: number
|
|
381
|
+
): string[] {
|
|
382
|
+
// console.log(util.inspect(classs, { compact: false, depth: 999 }))
|
|
383
|
+
|
|
384
|
+
const lines: string[] = []
|
|
385
|
+
|
|
386
|
+
const permalink = this.workspace.getPagePermalink(classs.id)
|
|
387
|
+
assert(permalink !== undefined && permalink.length > 0)
|
|
388
|
+
|
|
389
|
+
const iconLetters: Record<string, string> = {
|
|
390
|
+
class: 'C',
|
|
391
|
+
struct: 'S',
|
|
392
|
+
union: 'U',
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
let iconLetter: string | undefined = iconLetters[classs.kind]
|
|
396
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
397
|
+
if (iconLetter === undefined) {
|
|
398
|
+
console.error(
|
|
399
|
+
'Icon kind',
|
|
400
|
+
classs.kind,
|
|
401
|
+
'not supported yet in',
|
|
402
|
+
this.constructor.name,
|
|
403
|
+
'(using ?)'
|
|
404
|
+
)
|
|
405
|
+
iconLetter = '?'
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const label = this.workspace.renderString(classs.treeEntryName, 'html')
|
|
409
|
+
|
|
410
|
+
let description = ''
|
|
411
|
+
if (
|
|
412
|
+
classs.briefDescriptionHtmlString !== undefined &&
|
|
413
|
+
classs.briefDescriptionHtmlString.length > 0
|
|
414
|
+
) {
|
|
415
|
+
description = classs.briefDescriptionHtmlString.replace(/[.]$/, '')
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
lines.push('')
|
|
419
|
+
lines.push(
|
|
420
|
+
...this.workspace.renderTreeTableRowToHtmlLines({
|
|
421
|
+
itemIconLetter: iconLetter,
|
|
422
|
+
itemLabel: label,
|
|
423
|
+
itemLink: permalink,
|
|
424
|
+
depth,
|
|
425
|
+
description,
|
|
426
|
+
})
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
if (classs.children.length > 0) {
|
|
430
|
+
for (const childClass of classs.children) {
|
|
431
|
+
lines.push(
|
|
432
|
+
...this.generateIndexMdFileRecursively(childClass as Class, depth + 1)
|
|
433
|
+
)
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return lines
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
override async generatePerInitialsIndexMdFiles(): Promise<void> {
|
|
441
|
+
if (this.topLevelClasses.length === 0) {
|
|
442
|
+
return
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const allUnorderedEntriesMap = new Map<string, TreeEntryBase>()
|
|
446
|
+
|
|
447
|
+
for (const [, compound] of this.collectionCompoundsById) {
|
|
448
|
+
if (!(compound instanceof Class)) {
|
|
449
|
+
continue
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const compoundEntry = new ClassTreeEntry(compound, compound)
|
|
453
|
+
allUnorderedEntriesMap.set(compoundEntry.id, compoundEntry)
|
|
454
|
+
for (const section of compound.sections) {
|
|
455
|
+
for (const member of section.definitionMembers) {
|
|
456
|
+
const memberEntry = new ClassTreeEntry(member, compound)
|
|
457
|
+
allUnorderedEntriesMap.set(memberEntry.id, memberEntry)
|
|
458
|
+
if (member.enumValues !== undefined) {
|
|
459
|
+
for (const enumValue of member.enumValues) {
|
|
460
|
+
const enumValueEntry = new ClassTreeEntry(enumValue, compound)
|
|
461
|
+
allUnorderedEntriesMap.set(enumValueEntry.id, enumValueEntry)
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// ------------------------------------------------------------------------
|
|
469
|
+
|
|
470
|
+
await this.generateIndexFile({
|
|
471
|
+
group: 'classes',
|
|
472
|
+
fileKind: 'all',
|
|
473
|
+
title: 'Classes and Members Index',
|
|
474
|
+
description: 'The classes, structs, unions and their members are:',
|
|
475
|
+
map: allUnorderedEntriesMap,
|
|
476
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
477
|
+
filter: (kind) => true,
|
|
478
|
+
})
|
|
479
|
+
|
|
480
|
+
await this.generateIndexFile({
|
|
481
|
+
group: 'classes',
|
|
482
|
+
fileKind: 'classes',
|
|
483
|
+
title: 'Classes Index',
|
|
484
|
+
description: 'The classes, structs, unions defined in the project are:',
|
|
485
|
+
map: allUnorderedEntriesMap,
|
|
486
|
+
filter: (kind) =>
|
|
487
|
+
kind === 'class' || kind === 'struct' || kind === 'union',
|
|
488
|
+
})
|
|
489
|
+
|
|
490
|
+
await this.generateIndexFile({
|
|
491
|
+
group: 'classes',
|
|
492
|
+
fileKind: 'functions',
|
|
493
|
+
title: 'Class Functions Index',
|
|
494
|
+
description: 'The class member functions defined in the project are:',
|
|
495
|
+
map: allUnorderedEntriesMap,
|
|
496
|
+
filter: (kind) => kind === 'function',
|
|
497
|
+
})
|
|
498
|
+
|
|
499
|
+
await this.generateIndexFile({
|
|
500
|
+
group: 'classes',
|
|
501
|
+
fileKind: 'variables',
|
|
502
|
+
title: 'Class Variables Index',
|
|
503
|
+
description: 'The class member variables defined in the project are:',
|
|
504
|
+
map: allUnorderedEntriesMap,
|
|
505
|
+
filter: (kind) => kind === 'variable',
|
|
506
|
+
})
|
|
507
|
+
|
|
508
|
+
await this.generateIndexFile({
|
|
509
|
+
group: 'classes',
|
|
510
|
+
fileKind: 'typedefs',
|
|
511
|
+
title: 'Class Type Definitions Index',
|
|
512
|
+
description: 'The class member typedefs defined in the project are:',
|
|
513
|
+
map: allUnorderedEntriesMap,
|
|
514
|
+
filter: (kind) => kind === 'typedef',
|
|
515
|
+
})
|
|
516
|
+
|
|
517
|
+
await this.generateIndexFile({
|
|
518
|
+
group: 'classes',
|
|
519
|
+
fileKind: 'enums',
|
|
520
|
+
title: 'Class Enums Index',
|
|
521
|
+
description: 'The class member enums defined in the project are:',
|
|
522
|
+
map: allUnorderedEntriesMap,
|
|
523
|
+
filter: (kind) => kind === 'enum',
|
|
524
|
+
})
|
|
525
|
+
|
|
526
|
+
await this.generateIndexFile({
|
|
527
|
+
group: 'classes',
|
|
528
|
+
fileKind: 'enumvalues',
|
|
529
|
+
title: 'Class Enum Values Index',
|
|
530
|
+
description: 'The class member enum values defined in the project are:',
|
|
531
|
+
map: allUnorderedEntriesMap,
|
|
532
|
+
filter: (kind) => kind === 'enumvalue',
|
|
533
|
+
})
|
|
534
|
+
|
|
535
|
+
// ------------------------------------------------------------------------
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// ============================================================================
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Represents a single class, struct, or union compound for documentation.
|
|
543
|
+
*
|
|
544
|
+
* @remarks
|
|
545
|
+
* Manages individual class compound data including inheritance relationships,
|
|
546
|
+
* template parameters, member organisation, and documentation generation.
|
|
547
|
+
* Supports multiple inheritance, template specialisation, and hierarchical
|
|
548
|
+
* naming conventions for comprehensive class documentation.
|
|
549
|
+
*
|
|
550
|
+
* @public
|
|
551
|
+
*/
|
|
552
|
+
export class Class extends CompoundBase {
|
|
553
|
+
/** Set of base class IDs for inheritance tracking (multiple inheritance). */
|
|
554
|
+
baseClassIds = new Set<string>()
|
|
555
|
+
|
|
556
|
+
/** Array of resolved base class instances. */
|
|
557
|
+
baseClasses: Class[] = []
|
|
558
|
+
|
|
559
|
+
/** Fully qualified class name including namespace hierarchy. */
|
|
560
|
+
fullyQualifiedName = '???'
|
|
561
|
+
|
|
562
|
+
/** Simple class name without namespace qualifiers. */
|
|
563
|
+
unqualifiedName = '???'
|
|
564
|
+
|
|
565
|
+
/** Template parameter specification string. */
|
|
566
|
+
templateParameters = ''
|
|
567
|
+
|
|
568
|
+
/** Complete class name with rendered template parameters. */
|
|
569
|
+
classFullName = '???'
|
|
570
|
+
|
|
571
|
+
/** Rendered template declaration for display purposes. */
|
|
572
|
+
template: string | undefined
|
|
573
|
+
|
|
574
|
+
/** Direct reference to base compound data model objects. */
|
|
575
|
+
baseCompoundRefs: BaseCompoundRefDataModel[] | undefined
|
|
576
|
+
|
|
577
|
+
/** Direct reference to derived compound data model objects. */
|
|
578
|
+
derivedCompoundRefs: DerivedCompoundRefDataModel[] | undefined
|
|
579
|
+
|
|
580
|
+
/** Template parameter list from the compound definition. */
|
|
581
|
+
templateParamList: TemplateParamListDataModel | undefined
|
|
582
|
+
|
|
583
|
+
// --------------------------------------------------------------------------
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Creates a new Class instance from compound definition data.
|
|
587
|
+
*
|
|
588
|
+
* @remarks
|
|
589
|
+
* Initialises class metadata including inheritance relationships,
|
|
590
|
+
* template parameters, naming conventions, and URL structures.
|
|
591
|
+
* Processes fully qualified names, sidebar labels, and creates
|
|
592
|
+
* hierarchical path structures for documentation generation.
|
|
593
|
+
*
|
|
594
|
+
* @param collection - The parent Classes collection managing this class
|
|
595
|
+
* @param compoundDef - The Doxygen compound definition containing class data
|
|
596
|
+
*/
|
|
597
|
+
constructor(collection: Classes, compoundDef: CompoundDefDataModel) {
|
|
598
|
+
super(collection, compoundDef)
|
|
599
|
+
|
|
600
|
+
// console.log('Class.constructor', util.inspect(compoundDef))
|
|
601
|
+
|
|
602
|
+
const { workspace } = this.collection
|
|
603
|
+
|
|
604
|
+
if (Array.isArray(compoundDef.baseCompoundRefs)) {
|
|
605
|
+
for (const ref of compoundDef.baseCompoundRefs) {
|
|
606
|
+
// console.log('component', compoundDef.id, 'has base', ref.refid)
|
|
607
|
+
if (ref.refid !== undefined) {
|
|
608
|
+
this.baseClassIds.add(ref.refid)
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Remove the template parameters.
|
|
614
|
+
this.fullyQualifiedName = sanitizeAnonymousNamespace(
|
|
615
|
+
compoundDef.compoundName.replace(/<.*>/, '')
|
|
616
|
+
)
|
|
617
|
+
// Remove the namespaces(s).
|
|
618
|
+
this.unqualifiedName = this.fullyQualifiedName.replace(/.*::/, '')
|
|
619
|
+
|
|
620
|
+
const index = compoundDef.compoundName.indexOf('<')
|
|
621
|
+
let indexNameTemplateParameters = ''
|
|
622
|
+
if (index >= 0) {
|
|
623
|
+
indexNameTemplateParameters = compoundDef.compoundName
|
|
624
|
+
.substring(index)
|
|
625
|
+
.replace(/^< /, '<')
|
|
626
|
+
.replace(/ >$/, '>')
|
|
627
|
+
this.templateParameters = indexNameTemplateParameters
|
|
628
|
+
} else if (compoundDef.templateParamList !== undefined) {
|
|
629
|
+
indexNameTemplateParameters = this.renderTemplateParameterNamesToString(
|
|
630
|
+
compoundDef.templateParamList
|
|
631
|
+
)
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
this.indexName = `${this.unqualifiedName}${indexNameTemplateParameters}`
|
|
635
|
+
this.sidebarLabel = this.indexName
|
|
636
|
+
|
|
637
|
+
if (this.indexName.length < 42) {
|
|
638
|
+
const { indexName } = this
|
|
639
|
+
this.treeEntryName = indexName
|
|
640
|
+
} else {
|
|
641
|
+
this.treeEntryName = `${this.unqualifiedName}<...>`
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
const { kind } = compoundDef
|
|
645
|
+
const kindCapitalised =
|
|
646
|
+
kind.charAt(0).toUpperCase() + kind.slice(1).toLowerCase()
|
|
647
|
+
|
|
648
|
+
const nameHtml = workspace.renderString(this.unqualifiedName, 'html')
|
|
649
|
+
this.pageTitle = `\`${nameHtml}\` ${kindCapitalised}`
|
|
650
|
+
if (compoundDef.templateParamList !== undefined) {
|
|
651
|
+
this.pageTitle += ' Template'
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
655
|
+
assert(kindsPlurals[kind] !== undefined)
|
|
656
|
+
const pluralKind = kindsPlurals[kind].toLowerCase()
|
|
657
|
+
|
|
658
|
+
// Turn the namespace into a hierarchical path. Keep the dot.
|
|
659
|
+
let sanitizedPath: string = sanitizeHierarchicalPath(
|
|
660
|
+
this.fullyQualifiedName.replaceAll(/::/g, '/')
|
|
661
|
+
)
|
|
662
|
+
if (this.templateParameters.length > 0) {
|
|
663
|
+
// sanitizedPath += sanitizeName(this.templateParameters)
|
|
664
|
+
sanitizedPath += `-${crypto.hash('md5', this.templateParameters)}`
|
|
665
|
+
}
|
|
666
|
+
this.relativePermalink = `${pluralKind}/${sanitizedPath}`
|
|
667
|
+
|
|
668
|
+
// Replace slash with dash.
|
|
669
|
+
this.sidebarId = `${pluralKind}/${flattenPath(sanitizedPath)}`
|
|
670
|
+
|
|
671
|
+
this.createSections(this.unqualifiedName)
|
|
672
|
+
|
|
673
|
+
// console.log('0', compoundDef.id)
|
|
674
|
+
// console.log('1', compoundDef.compoundName)
|
|
675
|
+
// console.log('2', this.relativePermalink)
|
|
676
|
+
// console.log('3', this.docusaurusId)
|
|
677
|
+
// console.log('4', this.sidebarLabel)
|
|
678
|
+
// console.log('5', this.indexName)
|
|
679
|
+
// console.log('6', this.templateParameters)
|
|
680
|
+
// console.log()
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Performs late-stage initialisation after all classes are loaded.
|
|
685
|
+
*
|
|
686
|
+
* @remarks
|
|
687
|
+
* Completes class setup by rendering template parameters to HTML,
|
|
688
|
+
* building full class names with template information, and storing
|
|
689
|
+
* references to compound definition objects for inheritance processing.
|
|
690
|
+
* Called after all compounds are registered.
|
|
691
|
+
*/
|
|
692
|
+
override initializeLate(): void {
|
|
693
|
+
super.initializeLate()
|
|
694
|
+
|
|
695
|
+
const compoundDef = this._private._compoundDef
|
|
696
|
+
assert(compoundDef !== undefined)
|
|
697
|
+
|
|
698
|
+
const { workspace } = this.collection
|
|
699
|
+
|
|
700
|
+
const { fullyQualifiedName } = this
|
|
701
|
+
let classFullName = fullyQualifiedName
|
|
702
|
+
if (this.templateParameters.length > 0) {
|
|
703
|
+
classFullName += workspace.renderString(this.templateParameters, 'html')
|
|
704
|
+
} else {
|
|
705
|
+
classFullName += workspace.renderString(
|
|
706
|
+
this.renderTemplateParameterNamesToString(
|
|
707
|
+
compoundDef.templateParamList
|
|
708
|
+
),
|
|
709
|
+
'html'
|
|
710
|
+
)
|
|
711
|
+
}
|
|
712
|
+
this.classFullName = classFullName
|
|
713
|
+
|
|
714
|
+
if (compoundDef.templateParamList?.params !== undefined) {
|
|
715
|
+
this.template = workspace.renderString(
|
|
716
|
+
this.renderTemplateParametersToString({
|
|
717
|
+
templateParamList: compoundDef.templateParamList,
|
|
718
|
+
withDefaults: true,
|
|
719
|
+
}),
|
|
720
|
+
'html'
|
|
721
|
+
)
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
const { baseCompoundRefs, derivedCompoundRefs, templateParamList } =
|
|
725
|
+
compoundDef
|
|
726
|
+
this.baseCompoundRefs = baseCompoundRefs
|
|
727
|
+
this.derivedCompoundRefs = derivedCompoundRefs
|
|
728
|
+
this.templateParamList = templateParamList
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Determines whether the class has any content to display.
|
|
733
|
+
*
|
|
734
|
+
* @remarks
|
|
735
|
+
* Checks for the presence of child classes, inner compounds,
|
|
736
|
+
* member sections, include directives, or base class content
|
|
737
|
+
* to determine if the class documentation page should be
|
|
738
|
+
* generated and displayed.
|
|
739
|
+
*
|
|
740
|
+
* @returns True if the class has displayable content, false otherwise
|
|
741
|
+
*/
|
|
742
|
+
override hasAnyContent(): boolean {
|
|
743
|
+
if (this.childrenIds.length > 0) {
|
|
744
|
+
return true
|
|
745
|
+
}
|
|
746
|
+
if (this.children.length > 0) {
|
|
747
|
+
return true
|
|
748
|
+
}
|
|
749
|
+
if (this.innerCompounds !== undefined) {
|
|
750
|
+
return true
|
|
751
|
+
}
|
|
752
|
+
if (this.sections.length > 0) {
|
|
753
|
+
return true
|
|
754
|
+
}
|
|
755
|
+
if (this.includes !== undefined) {
|
|
756
|
+
return true
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
return super.hasAnyContent()
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
// --------------------------------------------------------------------------
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Renders the complete class documentation to markdown lines.
|
|
766
|
+
*
|
|
767
|
+
* @remarks
|
|
768
|
+
* Generates the full documentation page including class declaration,
|
|
769
|
+
* inheritance relationships, member indices, detailed descriptions,
|
|
770
|
+
* and location information. Handles base and derived class listings
|
|
771
|
+
* with proper HTML table formatting.
|
|
772
|
+
*
|
|
773
|
+
* @param frontMatter - The frontmatter configuration for the page
|
|
774
|
+
* @returns Array of markdown strings representing the complete documentation
|
|
775
|
+
*/
|
|
776
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
777
|
+
override renderToLines(frontMatter: FrontMatter): string[] {
|
|
778
|
+
const lines: string[] = []
|
|
779
|
+
|
|
780
|
+
const { workspace } = this.collection
|
|
781
|
+
|
|
782
|
+
const name = this.collection.workspace.renderString(
|
|
783
|
+
this.compoundName,
|
|
784
|
+
'html'
|
|
785
|
+
)
|
|
786
|
+
const descriptionTodo = `@${this.kind} ${name}`
|
|
787
|
+
|
|
788
|
+
// The Description header is always shown.
|
|
789
|
+
const morePermalink = '#details'
|
|
790
|
+
|
|
791
|
+
lines.push(
|
|
792
|
+
this.renderBriefDescriptionToHtmlString({
|
|
793
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
794
|
+
todo: descriptionTodo,
|
|
795
|
+
morePermalink,
|
|
796
|
+
})
|
|
797
|
+
)
|
|
798
|
+
|
|
799
|
+
lines.push('')
|
|
800
|
+
lines.push('## Declaration')
|
|
801
|
+
|
|
802
|
+
let classs: Class | undefined = undefined
|
|
803
|
+
if ('collectionCompoundsById' in this.collection) {
|
|
804
|
+
const candidate = (
|
|
805
|
+
this.collection as { collectionCompoundsById: Map<string, unknown> }
|
|
806
|
+
).collectionCompoundsById.get(this.id)
|
|
807
|
+
if (candidate instanceof Class) {
|
|
808
|
+
classs = candidate
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
assert(classs !== undefined)
|
|
812
|
+
|
|
813
|
+
lines.push('')
|
|
814
|
+
lines.push('<div class="doxyDeclaration">')
|
|
815
|
+
if (this.template !== undefined) {
|
|
816
|
+
lines.push(`template ${this.template}<br/>`)
|
|
817
|
+
}
|
|
818
|
+
lines.push(`${this.kind} ${this.classFullName} { ... }`)
|
|
819
|
+
lines.push('</div>')
|
|
820
|
+
|
|
821
|
+
lines.push(...this.renderIncludesIndexToLines())
|
|
822
|
+
|
|
823
|
+
if (this.kind === 'class' || this.kind === 'struct') {
|
|
824
|
+
if (this.baseCompoundRefs !== undefined) {
|
|
825
|
+
const baseCompoundRefs = new Map<string, BaseCompoundRefDataModel>()
|
|
826
|
+
for (const baseCompoundRef of this.baseCompoundRefs) {
|
|
827
|
+
if (!baseCompoundRefs.has(baseCompoundRef.text)) {
|
|
828
|
+
baseCompoundRefs.set(baseCompoundRef.text, baseCompoundRef)
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
lines.push('')
|
|
833
|
+
if (baseCompoundRefs.size > 1) {
|
|
834
|
+
lines.push(`## Base ${kindsPlurals[this.kind].toLowerCase()}`)
|
|
835
|
+
} else {
|
|
836
|
+
lines.push(`## Base ${this.kind}`)
|
|
837
|
+
}
|
|
838
|
+
lines.push('')
|
|
839
|
+
lines.push('<table class="doxyMembersIndex">')
|
|
840
|
+
|
|
841
|
+
for (const baseCompoundRef of baseCompoundRefs.values()) {
|
|
842
|
+
// console.log(
|
|
843
|
+
// util.inspect(baseCompoundRef, { compact: false, depth: 999 })
|
|
844
|
+
// )
|
|
845
|
+
|
|
846
|
+
if (baseCompoundRef.refid !== undefined) {
|
|
847
|
+
const { collection } = this
|
|
848
|
+
const baseClass = collection.collectionCompoundsById.get(
|
|
849
|
+
baseCompoundRef.refid
|
|
850
|
+
)
|
|
851
|
+
if (baseClass instanceof Class) {
|
|
852
|
+
lines.push(...baseClass.renderIndexToLines())
|
|
853
|
+
continue
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
const itemName = workspace.renderString(baseCompoundRef.text, 'html')
|
|
857
|
+
lines.push('')
|
|
858
|
+
|
|
859
|
+
lines.push(
|
|
860
|
+
...workspace.renderMembersIndexItemToHtmlLines({
|
|
861
|
+
type: this.kind,
|
|
862
|
+
name: itemName,
|
|
863
|
+
})
|
|
864
|
+
)
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
lines.push('')
|
|
868
|
+
lines.push('</table>')
|
|
869
|
+
} else if ('baseClassIds' in classs && classs.baseClassIds.size > 0) {
|
|
870
|
+
lines.push('')
|
|
871
|
+
if (classs.baseClassIds.size > 1) {
|
|
872
|
+
lines.push(`## Base ${kindsPlurals[this.kind].toLowerCase()}`)
|
|
873
|
+
} else {
|
|
874
|
+
lines.push(`## Base ${this.kind}`)
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
lines.push('')
|
|
878
|
+
lines.push('<table class="doxyMembersIndex">')
|
|
879
|
+
|
|
880
|
+
for (const baseClassId of classs.baseClassIds) {
|
|
881
|
+
const { collection } = this
|
|
882
|
+
if (collection instanceof Classes) {
|
|
883
|
+
const baseClass =
|
|
884
|
+
collection.collectionCompoundsById.get(baseClassId)
|
|
885
|
+
if (baseClass instanceof Class) {
|
|
886
|
+
// console.log(
|
|
887
|
+
// util.inspect(
|
|
888
|
+
// derivedCompoundDef, { compact: false, depth: 999 }
|
|
889
|
+
// )
|
|
890
|
+
// )
|
|
891
|
+
lines.push(...baseClass.renderIndexToLines())
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
lines.push('')
|
|
897
|
+
lines.push('</table>')
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
if (this.derivedCompoundRefs !== undefined) {
|
|
901
|
+
lines.push('')
|
|
902
|
+
lines.push(`## Derived ${kindsPlurals[this.kind]}`)
|
|
903
|
+
|
|
904
|
+
lines.push('')
|
|
905
|
+
lines.push('<table class="doxyMembersIndex">')
|
|
906
|
+
|
|
907
|
+
for (const derivedCompoundRef of this.derivedCompoundRefs) {
|
|
908
|
+
// console.log(
|
|
909
|
+
// util.inspect(derivedCompoundRef, { compact: false, depth: 999 })
|
|
910
|
+
// )
|
|
911
|
+
|
|
912
|
+
if (derivedCompoundRef.refid !== undefined) {
|
|
913
|
+
let derivedClass: Class | undefined = undefined
|
|
914
|
+
if (
|
|
915
|
+
'collectionCompoundsById' in this.collection &&
|
|
916
|
+
typeof derivedCompoundRef.refid === 'string'
|
|
917
|
+
) {
|
|
918
|
+
const collection = this.collection as {
|
|
919
|
+
collectionCompoundsById: Map<string, unknown>
|
|
920
|
+
}
|
|
921
|
+
const candidate = collection.collectionCompoundsById.get(
|
|
922
|
+
derivedCompoundRef.refid
|
|
923
|
+
)
|
|
924
|
+
if (candidate instanceof Class) {
|
|
925
|
+
derivedClass = candidate
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
if (derivedClass !== undefined) {
|
|
929
|
+
lines.push(...derivedClass.renderIndexToLines())
|
|
930
|
+
} else {
|
|
931
|
+
if (this.collection.workspace.options.verbose) {
|
|
932
|
+
console.warn(
|
|
933
|
+
'Derived class id',
|
|
934
|
+
derivedCompoundRef.refid,
|
|
935
|
+
'not a defined class'
|
|
936
|
+
)
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
const itemName = workspace.renderString(
|
|
940
|
+
derivedCompoundRef.text.trim(),
|
|
941
|
+
'html'
|
|
942
|
+
)
|
|
943
|
+
lines.push('')
|
|
944
|
+
lines.push(
|
|
945
|
+
...this.collection.workspace.renderMembersIndexItemToHtmlLines({
|
|
946
|
+
type: this.kind,
|
|
947
|
+
name: itemName,
|
|
948
|
+
})
|
|
949
|
+
)
|
|
950
|
+
}
|
|
951
|
+
} else {
|
|
952
|
+
const itemName = workspace.renderString(
|
|
953
|
+
derivedCompoundRef.text.trim(),
|
|
954
|
+
'html'
|
|
955
|
+
)
|
|
956
|
+
lines.push('')
|
|
957
|
+
lines.push(
|
|
958
|
+
...this.collection.workspace.renderMembersIndexItemToHtmlLines({
|
|
959
|
+
type: this.kind,
|
|
960
|
+
name: itemName,
|
|
961
|
+
})
|
|
962
|
+
)
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
lines.push('')
|
|
967
|
+
lines.push('</table>')
|
|
968
|
+
} else if ('derivedClassIds' in classs && classs.childrenIds.length > 0) {
|
|
969
|
+
lines.push('')
|
|
970
|
+
lines.push(`## Derived ${kindsPlurals[this.kind]}`)
|
|
971
|
+
|
|
972
|
+
lines.push('')
|
|
973
|
+
lines.push('<table class="doxyMembersIndex">')
|
|
974
|
+
|
|
975
|
+
for (const derivedClassId of classs.childrenIds) {
|
|
976
|
+
const { collection } = this
|
|
977
|
+
const derivedClassCandidate =
|
|
978
|
+
collection.collectionCompoundsById.get(derivedClassId)
|
|
979
|
+
if (derivedClassCandidate instanceof Class) {
|
|
980
|
+
// console.log(
|
|
981
|
+
// util.inspect(
|
|
982
|
+
// derivedCompoundDef,
|
|
983
|
+
// { compact: false, depth: 999 }
|
|
984
|
+
// )
|
|
985
|
+
// )
|
|
986
|
+
lines.push(...derivedClassCandidate.renderIndexToLines())
|
|
987
|
+
} else {
|
|
988
|
+
console.warn('Derived class id', derivedClassId, 'not a class')
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
lines.push('')
|
|
993
|
+
lines.push('</table>')
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
lines.push(
|
|
998
|
+
...this.renderInnerIndicesToLines({
|
|
999
|
+
suffixes: [],
|
|
1000
|
+
})
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
lines.push(...this.renderSectionIndicesToLines())
|
|
1004
|
+
|
|
1005
|
+
lines.push(
|
|
1006
|
+
...this.renderDetailedDescriptionToHtmlLines({
|
|
1007
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1008
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1009
|
+
todo: descriptionTodo,
|
|
1010
|
+
showHeader: true,
|
|
1011
|
+
showBrief: !this.hasSect1InDescription,
|
|
1012
|
+
})
|
|
1013
|
+
)
|
|
1014
|
+
|
|
1015
|
+
if (this.locationLines !== undefined) {
|
|
1016
|
+
lines.push(...this.locationLines)
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
lines.push(...this.renderSectionsToLines())
|
|
1020
|
+
|
|
1021
|
+
lines.push(...this.renderGeneratedFromToLines())
|
|
1022
|
+
|
|
1023
|
+
return lines
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* Renders the class as an index entry for member listings.
|
|
1028
|
+
*
|
|
1029
|
+
* @remarks
|
|
1030
|
+
* Creates HTML table rows suitable for inclusion in member indices,
|
|
1031
|
+
* with links to the class documentation page and brief descriptions.
|
|
1032
|
+
* Generates formatted entries with appropriate CSS classes and
|
|
1033
|
+
* structure for index displays.
|
|
1034
|
+
*
|
|
1035
|
+
* @returns Array of HTML strings representing the index entry
|
|
1036
|
+
*/
|
|
1037
|
+
renderIndexToLines(): string[] {
|
|
1038
|
+
// console.log(util.inspect(this, { compact: false, depth: 999 }))
|
|
1039
|
+
const lines: string[] = []
|
|
1040
|
+
|
|
1041
|
+
const { workspace } = this.collection
|
|
1042
|
+
|
|
1043
|
+
const permalink = workspace.getPagePermalink(this.id)
|
|
1044
|
+
|
|
1045
|
+
const indexName = this.collection.workspace.renderString(
|
|
1046
|
+
this.indexName,
|
|
1047
|
+
'html'
|
|
1048
|
+
)
|
|
1049
|
+
const { kind: itemType } = this
|
|
1050
|
+
let itemName = ''
|
|
1051
|
+
if (permalink !== undefined && permalink.length > 0) {
|
|
1052
|
+
itemName = `<a href="${permalink}">${indexName}</a>`
|
|
1053
|
+
} else {
|
|
1054
|
+
itemName = indexName
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
lines.push('')
|
|
1058
|
+
|
|
1059
|
+
const childrenLines: string[] = []
|
|
1060
|
+
assert(permalink !== undefined)
|
|
1061
|
+
const morePermalink =
|
|
1062
|
+
this.detailedDescriptionHtmlLines !== undefined
|
|
1063
|
+
? `${permalink}/#details`
|
|
1064
|
+
: undefined
|
|
1065
|
+
const briefDescriptionHtmlString: string | undefined =
|
|
1066
|
+
this.briefDescriptionHtmlString
|
|
1067
|
+
if ((briefDescriptionHtmlString ?? '').length > 0) {
|
|
1068
|
+
childrenLines.push(
|
|
1069
|
+
this.renderBriefDescriptionToHtmlString({
|
|
1070
|
+
briefDescriptionHtmlString,
|
|
1071
|
+
morePermalink,
|
|
1072
|
+
})
|
|
1073
|
+
)
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
lines.push(
|
|
1077
|
+
...this.collection.workspace.renderMembersIndexItemToHtmlLines({
|
|
1078
|
+
type: itemType,
|
|
1079
|
+
name: itemName,
|
|
1080
|
+
childrenLines,
|
|
1081
|
+
})
|
|
1082
|
+
)
|
|
1083
|
+
|
|
1084
|
+
return lines
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
// ----------------------------------------------------------------------------
|