@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,1943 @@
|
|
|
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
|
+
|
|
17
|
+
import type { MemberDefDataModel } from '../../doxygen/data-model/compounds/memberdeftype-dm.js'
|
|
18
|
+
import type { MemberDataModel } from '../../doxygen/data-model/compounds/membertype-dm.js'
|
|
19
|
+
import type { SectionDefDataModel } from '../../doxygen/data-model/compounds/sectiondeftype-dm.js'
|
|
20
|
+
import type { CompoundBase } from './compound-base-vm.js'
|
|
21
|
+
import { getPermalinkAnchor, sanitizeAnonymousNamespace } from '../utils.js'
|
|
22
|
+
import type { Class } from './classes-vm.js'
|
|
23
|
+
import {
|
|
24
|
+
MemberProgramListingDataModel,
|
|
25
|
+
ParaDataModel,
|
|
26
|
+
type ProgramListingDataModel,
|
|
27
|
+
} from '../../doxygen/data-model/compounds/descriptiontype-dm.js'
|
|
28
|
+
import type { LocationDataModel } from '../../doxygen/data-model/compounds/locationtype-dm.js'
|
|
29
|
+
import type { EnumValueDataModel } from '../../doxygen/data-model/compounds/enumvaluetype-dm.js'
|
|
30
|
+
import type { File } from './files-and-folders-vm.js'
|
|
31
|
+
|
|
32
|
+
// ----------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
export const sectionHeaders: Record<string, [string, number]> = {
|
|
35
|
+
typedef: ['Typedefs', 100], // DoxMemberKind too
|
|
36
|
+
'public-type': ['Public Member Typedefs', 110],
|
|
37
|
+
'protected-type': ['Protected Member Typedefs', 120],
|
|
38
|
+
'private-type': ['Private Member Typedefs', 130],
|
|
39
|
+
'package-type': ['Package Member Typedefs', 140],
|
|
40
|
+
|
|
41
|
+
enum: ['Enumerations', 150], // DoxMemberKind too
|
|
42
|
+
|
|
43
|
+
friend: ['Friends', 160], // DoxMemberKind too
|
|
44
|
+
|
|
45
|
+
interface: ['Interfaces', 170], // DoxMemberKind only
|
|
46
|
+
|
|
47
|
+
// Extra, not present in Doxygen.
|
|
48
|
+
constructorr: ['Constructors', 200],
|
|
49
|
+
'public-constructorr': ['Public Constructors', 200],
|
|
50
|
+
'protected-constructorr': ['Protected Constructors', 210],
|
|
51
|
+
'private-constructorr': ['Private Constructors', 220],
|
|
52
|
+
|
|
53
|
+
// Extra, not present in Doxygen.
|
|
54
|
+
'public-destructor': ['Public Destructor', 230],
|
|
55
|
+
'protected-destructor': ['Protected Destructor', 240],
|
|
56
|
+
'private-destructor': ['Private Destructor', 250],
|
|
57
|
+
|
|
58
|
+
// Extra, not present in Doxygen.
|
|
59
|
+
operator: ['Operators', 300],
|
|
60
|
+
'public-operator': ['Public Operators', 310],
|
|
61
|
+
'protected-operator': ['Protected Operators', 320],
|
|
62
|
+
'private-operator': ['Private Operators', 330],
|
|
63
|
+
'package-operator': ['Package Operators', 340],
|
|
64
|
+
|
|
65
|
+
func: ['Functions', 350],
|
|
66
|
+
function: ['Functions', 350], // DoxMemberKind only
|
|
67
|
+
|
|
68
|
+
'public-func': ['Public Member Functions', 360],
|
|
69
|
+
'protected-func': ['Protected Member Functions', 370],
|
|
70
|
+
'private-func': ['Private Member Functions', 380],
|
|
71
|
+
'package-func': ['Package Member Functions', 390],
|
|
72
|
+
|
|
73
|
+
var: ['Variables', 400],
|
|
74
|
+
variable: ['Variables', 400], // DoxMemberKind only
|
|
75
|
+
|
|
76
|
+
'public-attrib': ['Public Member Attributes', 410],
|
|
77
|
+
'protected-attrib': ['Protected Member Attributes', 420],
|
|
78
|
+
'private-attrib': ['Private Member Attributes', 430],
|
|
79
|
+
'package-attrib': ['Package Member Attributes', 440],
|
|
80
|
+
|
|
81
|
+
'public-static-operator': ['Public Operators', 450],
|
|
82
|
+
'protected-static-operator': ['Protected Operators', 460],
|
|
83
|
+
'private-static-operator': ['Private Operators', 470],
|
|
84
|
+
'package-static-operator': ['Package Operators', 480],
|
|
85
|
+
|
|
86
|
+
'public-static-func': ['Public Static Functions', 500],
|
|
87
|
+
'protected-static-func': ['Protected Static Functions', 510],
|
|
88
|
+
'private-static-func': ['Private Static Functions', 520],
|
|
89
|
+
'package-static-func': ['Package Static Functions', 530],
|
|
90
|
+
|
|
91
|
+
'public-static-attrib': ['Public Static Attributes', 600],
|
|
92
|
+
'protected-static-attrib': ['Protected Static Attributes', 610],
|
|
93
|
+
'private-static-attrib': ['Private Static Attributes', 620],
|
|
94
|
+
'package-static-attrib': ['Package Static Attributes', 630],
|
|
95
|
+
|
|
96
|
+
slot: ['Slots', 700], // DoxMemberKind only
|
|
97
|
+
'public-slot': ['Public Slots', 700],
|
|
98
|
+
'protected-slot': ['Protected Slot', 710],
|
|
99
|
+
'private-slot': ['Private Slot', 720],
|
|
100
|
+
|
|
101
|
+
related: ['Related', 800],
|
|
102
|
+
define: ['Macro Definitions', 810], // DoxMemberKind too
|
|
103
|
+
prototype: ['Prototypes', 820], // DoxMemberKind too
|
|
104
|
+
|
|
105
|
+
signal: ['Signals', 830], // DoxMemberKind too
|
|
106
|
+
// 'dcop-func': ['DCOP Functions', 840],
|
|
107
|
+
dcop: ['DCOP Functions', 840], // DoxMemberKind only
|
|
108
|
+
property: ['Properties', 850], // DoxMemberKind too
|
|
109
|
+
event: ['Events', 860], // DoxMemberKind too
|
|
110
|
+
service: ['Services', 870], // DoxMemberKind only
|
|
111
|
+
|
|
112
|
+
'user-defined': ['Definitions', 1000],
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ----------------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Represents a documentation section containing member definitions and
|
|
119
|
+
* references.
|
|
120
|
+
*
|
|
121
|
+
* @remarks
|
|
122
|
+
* Sections organise related members (functions, variables, types, etc.) within
|
|
123
|
+
* compounds, providing structured grouping based on visibility, type, and
|
|
124
|
+
* functionality. Each section manages both member definitions and references
|
|
125
|
+
* to members defined elsewhere.
|
|
126
|
+
*
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
export class Section {
|
|
130
|
+
/**
|
|
131
|
+
* The parent compound containing this section.
|
|
132
|
+
*
|
|
133
|
+
* @remarks
|
|
134
|
+
* References the compound (class, namespace, file, etc.) that owns
|
|
135
|
+
* this section for context and rendering operations.
|
|
136
|
+
*/
|
|
137
|
+
compound: CompoundBase
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The section kind identifier from Doxygen.
|
|
141
|
+
*
|
|
142
|
+
* @remarks
|
|
143
|
+
* Specifies the type of section (e.g., 'public-func', 'private-attrib',
|
|
144
|
+
* 'typedef') which determines member organisation and display headers.
|
|
145
|
+
*/
|
|
146
|
+
kind: string
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The display header name for this section.
|
|
150
|
+
*
|
|
151
|
+
* @remarks
|
|
152
|
+
* Human-readable section title derived from the kind, used for
|
|
153
|
+
* generating section headers in the documentation output.
|
|
154
|
+
*/
|
|
155
|
+
headerName: string
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Optional section description lines in HTML format.
|
|
159
|
+
*
|
|
160
|
+
* @remarks
|
|
161
|
+
* Contains processed description content for sections that include
|
|
162
|
+
* additional explanatory text beyond the standard header.
|
|
163
|
+
*/
|
|
164
|
+
descriptionLines: string[] | undefined
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* All members in this section including references and definitions.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* Contains both member definitions and member references in their
|
|
171
|
+
* original order, used for generating member indices and overviews.
|
|
172
|
+
*/
|
|
173
|
+
indexMembers: (MemberRef | Member)[] = []
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Only member definitions in this section, sorted alphabetically.
|
|
177
|
+
*
|
|
178
|
+
* @remarks
|
|
179
|
+
* Filtered collection containing only actual member definitions
|
|
180
|
+
* (not references), sorted by name for detailed documentation rendering.
|
|
181
|
+
*/
|
|
182
|
+
definitionMembers: Member[] = []
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Private data available only during initialisation.
|
|
186
|
+
*
|
|
187
|
+
* @remarks
|
|
188
|
+
* Temporary storage for section definition data that is cleared
|
|
189
|
+
* after late initialisation to reduce memory usage.
|
|
190
|
+
*
|
|
191
|
+
* @internal
|
|
192
|
+
*/
|
|
193
|
+
_private: {
|
|
194
|
+
// Available only during the initializeLate().
|
|
195
|
+
_sectionDef?: SectionDefDataModel
|
|
196
|
+
} = {}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Initialises a new Section instance from section definition data.
|
|
200
|
+
*
|
|
201
|
+
* @remarks
|
|
202
|
+
* Processes the section metadata, creates member instances, and organises
|
|
203
|
+
* them into appropriate collections for index and definition rendering.
|
|
204
|
+
* Members are sorted alphabetically for consistent documentation output.
|
|
205
|
+
*
|
|
206
|
+
* @param compound - The parent compound containing this section
|
|
207
|
+
* @param sectionDef - The section definition containing member data
|
|
208
|
+
*
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
constructor(compound: CompoundBase, sectionDef: SectionDefDataModel) {
|
|
212
|
+
// console.log(compound.kind, compound.compoundName, sectionDef.kind)
|
|
213
|
+
this._private._sectionDef = sectionDef
|
|
214
|
+
|
|
215
|
+
this.compound = compound
|
|
216
|
+
const { kind } = sectionDef
|
|
217
|
+
this.kind = kind
|
|
218
|
+
|
|
219
|
+
this.headerName = this.getHeaderNameByKind(sectionDef)
|
|
220
|
+
assert(this.headerName.length > 0)
|
|
221
|
+
|
|
222
|
+
const members: (Member | MemberRef)[] = []
|
|
223
|
+
|
|
224
|
+
if (sectionDef.memberDefs !== undefined) {
|
|
225
|
+
for (const memberDefDataModel of sectionDef.memberDefs) {
|
|
226
|
+
const member = new Member(this, memberDefDataModel)
|
|
227
|
+
members.push(member)
|
|
228
|
+
// Do not add it to the global map since additional checks are needed
|
|
229
|
+
// therefore the procedure is done in the global generator.
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (sectionDef.members !== undefined) {
|
|
234
|
+
for (const memberRef of sectionDef.members) {
|
|
235
|
+
members.push(new MemberRef(this, memberRef))
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Original order.
|
|
240
|
+
this.indexMembers = members
|
|
241
|
+
|
|
242
|
+
const definitionMembers: Member[] = []
|
|
243
|
+
for (const member of this.indexMembers) {
|
|
244
|
+
if (member instanceof Member) {
|
|
245
|
+
definitionMembers.push(member)
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Sorted.
|
|
250
|
+
this.definitionMembers = definitionMembers.sort((a, b) =>
|
|
251
|
+
a.name.localeCompare(b.name)
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Performs late initialisation for section descriptions.
|
|
257
|
+
*
|
|
258
|
+
* @remarks
|
|
259
|
+
* Processes optional section descriptions into HTML format for rendering.
|
|
260
|
+
* This method is called after all basic initialisation is complete to
|
|
261
|
+
* ensure proper workspace context for description processing.
|
|
262
|
+
*
|
|
263
|
+
* @public
|
|
264
|
+
*/
|
|
265
|
+
initializeLate(): void {
|
|
266
|
+
const { workspace } = this.compound.collection
|
|
267
|
+
assert(this._private._sectionDef !== undefined)
|
|
268
|
+
|
|
269
|
+
const { _sectionDef: sectionDef } = this._private
|
|
270
|
+
if (sectionDef.description !== undefined) {
|
|
271
|
+
this.descriptionLines = workspace.renderElementToLines(
|
|
272
|
+
sectionDef.description,
|
|
273
|
+
'html'
|
|
274
|
+
)
|
|
275
|
+
// console.log(this.indexMembers, this.descriptionLines)
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Determines if this section contains any member definitions.
|
|
281
|
+
*
|
|
282
|
+
* @remarks
|
|
283
|
+
* Checks whether the section has actual member definitions (not just
|
|
284
|
+
* references) that require detailed documentation rendering. Used to
|
|
285
|
+
* filter sections for output generation.
|
|
286
|
+
*
|
|
287
|
+
* @returns True if the section contains member definitions, false otherwise
|
|
288
|
+
*
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
291
|
+
hasDefinitionMembers(): boolean {
|
|
292
|
+
return this.definitionMembers.length > 0
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// --------------------------------------------------------------------------
|
|
296
|
+
|
|
297
|
+
// <xsd:simpleType name="DoxSectionKind">
|
|
298
|
+
// <xsd:restriction base="xsd:string">
|
|
299
|
+
// <xsd:enumeration value="user-defined" />
|
|
300
|
+
// <xsd:enumeration value="public-type" />
|
|
301
|
+
// <xsd:enumeration value="public-func" />
|
|
302
|
+
// <xsd:enumeration value="public-attrib" />
|
|
303
|
+
// <xsd:enumeration value="public-slot" />
|
|
304
|
+
// <xsd:enumeration value="signal" />
|
|
305
|
+
// <xsd:enumeration value="dcop-func" />
|
|
306
|
+
// <xsd:enumeration value="property" />
|
|
307
|
+
// <xsd:enumeration value="event" />
|
|
308
|
+
// <xsd:enumeration value="public-static-func" />
|
|
309
|
+
// <xsd:enumeration value="public-static-attrib" />
|
|
310
|
+
// <xsd:enumeration value="protected-type" />
|
|
311
|
+
// <xsd:enumeration value="protected-func" />
|
|
312
|
+
// <xsd:enumeration value="protected-attrib" />
|
|
313
|
+
// <xsd:enumeration value="protected-slot" />
|
|
314
|
+
// <xsd:enumeration value="protected-static-func" />
|
|
315
|
+
// <xsd:enumeration value="protected-static-attrib" />
|
|
316
|
+
// <xsd:enumeration value="package-type" />
|
|
317
|
+
// <xsd:enumeration value="package-func" />
|
|
318
|
+
// <xsd:enumeration value="package-attrib" />
|
|
319
|
+
// <xsd:enumeration value="package-static-func" />
|
|
320
|
+
// <xsd:enumeration value="package-static-attrib" />
|
|
321
|
+
// <xsd:enumeration value="private-type" />
|
|
322
|
+
// <xsd:enumeration value="private-func" />
|
|
323
|
+
// <xsd:enumeration value="private-attrib" />
|
|
324
|
+
// <xsd:enumeration value="private-slot" />
|
|
325
|
+
// <xsd:enumeration value="private-static-func" />
|
|
326
|
+
// <xsd:enumeration value="private-static-attrib" />
|
|
327
|
+
// <xsd:enumeration value="friend" />
|
|
328
|
+
// <xsd:enumeration value="related" />
|
|
329
|
+
// <xsd:enumeration value="define" />
|
|
330
|
+
// <xsd:enumeration value="prototype" />
|
|
331
|
+
// <xsd:enumeration value="typedef" />
|
|
332
|
+
// <xsd:enumeration value="enum" />
|
|
333
|
+
// <xsd:enumeration value="func" />
|
|
334
|
+
// <xsd:enumeration value="var" />
|
|
335
|
+
// </xsd:restriction>
|
|
336
|
+
// </xsd:simpleType>
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Determines the display header name for a section based on its kind.
|
|
340
|
+
*
|
|
341
|
+
* @remarks
|
|
342
|
+
* Maps Doxygen section kinds to human-readable header names, handling
|
|
343
|
+
* both standard section types and user-defined sections with custom
|
|
344
|
+
* headers. Falls back to predefined section headers from the global
|
|
345
|
+
* mapping table.
|
|
346
|
+
*
|
|
347
|
+
* @param sectionDef - The section definition containing kind and header data
|
|
348
|
+
* @returns The formatted header name for display
|
|
349
|
+
*
|
|
350
|
+
* @private
|
|
351
|
+
*/
|
|
352
|
+
getHeaderNameByKind(sectionDef: SectionDefDataModel): string {
|
|
353
|
+
// User defined sections have their own header.
|
|
354
|
+
const { header, kind } = sectionDef
|
|
355
|
+
if (kind === 'user-defined') {
|
|
356
|
+
if (header !== undefined) {
|
|
357
|
+
return header.trim()
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
console.warn('sectionDef of kind user-defined')
|
|
361
|
+
|
|
362
|
+
return 'User Defined'
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
if (header !== undefined) {
|
|
366
|
+
console.warn('header', header, 'ignored in sectionDef of kind', kind)
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// ------------------------------------------------------------------------
|
|
370
|
+
|
|
371
|
+
const sectionHeader: [string, number] | undefined = sectionHeaders[kind]
|
|
372
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
373
|
+
if (sectionHeader === undefined) {
|
|
374
|
+
console.error(util.inspect(sectionDef, { compact: false, depth: 999 }))
|
|
375
|
+
console.error(
|
|
376
|
+
sectionDef.constructor.name,
|
|
377
|
+
'kind',
|
|
378
|
+
kind,
|
|
379
|
+
'not yet rendered in',
|
|
380
|
+
this.constructor.name,
|
|
381
|
+
'getHeaderNameByKind'
|
|
382
|
+
)
|
|
383
|
+
return ''
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
return sectionHeader[0].trim()
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Determines the display order for this section based on its kind.
|
|
391
|
+
*
|
|
392
|
+
* @remarks
|
|
393
|
+
* Returns a numeric order value used for sorting sections consistently
|
|
394
|
+
* in documentation output. User-defined sections are placed at the end
|
|
395
|
+
* with order 1000, while predefined sections use values from the global
|
|
396
|
+
* mapping table.
|
|
397
|
+
*
|
|
398
|
+
* @returns Numeric order value for section sorting
|
|
399
|
+
*
|
|
400
|
+
* @public
|
|
401
|
+
*/
|
|
402
|
+
getSectionOrderByKind(): number {
|
|
403
|
+
const { kind } = this
|
|
404
|
+
if (kind === 'user-defined') {
|
|
405
|
+
return 1000 // At the end.
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const header: [string, number] | undefined = sectionHeaders[kind]
|
|
409
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
410
|
+
assert(header !== undefined)
|
|
411
|
+
return header[1]
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// --------------------------------------------------------------------------
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Renders the section index to HTML table lines.
|
|
418
|
+
*
|
|
419
|
+
* @remarks
|
|
420
|
+
* Generates an HTML table containing all members in this section with
|
|
421
|
+
* their signatures and brief descriptions. Both member definitions and
|
|
422
|
+
* references are included in the index for comprehensive overview.
|
|
423
|
+
*
|
|
424
|
+
* @returns Array of HTML lines representing the section index
|
|
425
|
+
*
|
|
426
|
+
* @public
|
|
427
|
+
*/
|
|
428
|
+
renderIndexToLines(): string[] {
|
|
429
|
+
const lines: string[] = []
|
|
430
|
+
|
|
431
|
+
// console.log(sectionDef)
|
|
432
|
+
if (this.indexMembers.length > 0) {
|
|
433
|
+
lines.push('')
|
|
434
|
+
lines.push(`## ${this.headerName} Index`)
|
|
435
|
+
|
|
436
|
+
lines.push('')
|
|
437
|
+
lines.push('<table class="doxyMembersIndex">')
|
|
438
|
+
|
|
439
|
+
for (const member of this.indexMembers) {
|
|
440
|
+
if (member instanceof Member) {
|
|
441
|
+
lines.push(...member.renderIndexToLines())
|
|
442
|
+
} else if (member instanceof MemberRef) {
|
|
443
|
+
const referredMember =
|
|
444
|
+
this.compound.collection.workspace.viewModel.membersById.get(
|
|
445
|
+
member.refid
|
|
446
|
+
)
|
|
447
|
+
assert(referredMember !== undefined)
|
|
448
|
+
lines.push(...referredMember.renderIndexToLines())
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
lines.push('')
|
|
453
|
+
lines.push('</table>')
|
|
454
|
+
}
|
|
455
|
+
return lines
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// --------------------------------------------------------------------------
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Renders the complete section documentation to HTML lines.
|
|
462
|
+
*
|
|
463
|
+
* @remarks
|
|
464
|
+
* Generates detailed section documentation including header, optional
|
|
465
|
+
* description, and full member definitions. Only sections with member
|
|
466
|
+
* definitions are rendered, ensuring meaningful content output.
|
|
467
|
+
*
|
|
468
|
+
* @returns Array of HTML lines representing the complete section
|
|
469
|
+
*
|
|
470
|
+
* @public
|
|
471
|
+
*/
|
|
472
|
+
renderToLines(): string[] {
|
|
473
|
+
const lines: string[] = []
|
|
474
|
+
|
|
475
|
+
if (!this.hasDefinitionMembers()) {
|
|
476
|
+
return lines
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// TODO: filter out members defined in other compounds.
|
|
480
|
+
|
|
481
|
+
lines.push('')
|
|
482
|
+
lines.push('<div class="doxySectionDef">')
|
|
483
|
+
|
|
484
|
+
lines.push('')
|
|
485
|
+
lines.push(`## ${this.headerName}`)
|
|
486
|
+
|
|
487
|
+
if (this.descriptionLines !== undefined) {
|
|
488
|
+
lines.push('')
|
|
489
|
+
lines.push(
|
|
490
|
+
...this.compound.renderDetailedDescriptionToHtmlLines({
|
|
491
|
+
detailedDescriptionHtmlLines: this.descriptionLines,
|
|
492
|
+
showHeader: false,
|
|
493
|
+
})
|
|
494
|
+
)
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
for (const member of this.definitionMembers) {
|
|
498
|
+
lines.push(...member.renderToLines())
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
lines.push('')
|
|
502
|
+
lines.push('</div>')
|
|
503
|
+
|
|
504
|
+
return lines
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// ----------------------------------------------------------------------------
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Base class for member instances providing common functionality.
|
|
512
|
+
*
|
|
513
|
+
* @remarks
|
|
514
|
+
* Provides shared properties and methods for both member definitions and
|
|
515
|
+
* member references, establishing a common interface for member handling
|
|
516
|
+
* throughout the documentation generation process.
|
|
517
|
+
*
|
|
518
|
+
* @internal
|
|
519
|
+
*/
|
|
520
|
+
class MemberBase {
|
|
521
|
+
/**
|
|
522
|
+
* The parent section containing this member.
|
|
523
|
+
*
|
|
524
|
+
* @remarks
|
|
525
|
+
* References the section that owns this member for context and
|
|
526
|
+
* access to compound and workspace information.
|
|
527
|
+
*/
|
|
528
|
+
section: Section
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* The member name identifier.
|
|
532
|
+
*
|
|
533
|
+
* @remarks
|
|
534
|
+
* Base name of the member used for identification and documentation
|
|
535
|
+
* generation across different member types.
|
|
536
|
+
*/
|
|
537
|
+
name: string
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Initialises a new MemberBase instance.
|
|
541
|
+
*
|
|
542
|
+
* @remarks
|
|
543
|
+
* Establishes the basic member properties required for all member types,
|
|
544
|
+
* providing foundation for both definitions and references.
|
|
545
|
+
*
|
|
546
|
+
* @param section - The parent section containing this member
|
|
547
|
+
* @param name - The member name identifier
|
|
548
|
+
*
|
|
549
|
+
* @protected
|
|
550
|
+
*/
|
|
551
|
+
constructor(section: Section, name: string) {
|
|
552
|
+
this.section = section
|
|
553
|
+
this.name = name
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Performs late initialisation for members.
|
|
558
|
+
*
|
|
559
|
+
* @remarks
|
|
560
|
+
* Base implementation is intentionally empty, allowing subclasses to
|
|
561
|
+
* override with specific initialisation logic as needed.
|
|
562
|
+
*
|
|
563
|
+
* @public
|
|
564
|
+
*/
|
|
565
|
+
// Intentionally left blank for subclasses to override.
|
|
566
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
567
|
+
initializeLate(): void {}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Represents a complete member definition with full documentation.
|
|
572
|
+
*
|
|
573
|
+
* @remarks
|
|
574
|
+
* Contains comprehensive member information including documentation,
|
|
575
|
+
* signatures, location data, and rendering capabilities. Handles
|
|
576
|
+
* various member types such as functions, variables, enums, and
|
|
577
|
+
* typedefs with their specific documentation requirements.
|
|
578
|
+
*
|
|
579
|
+
* @public
|
|
580
|
+
*/
|
|
581
|
+
export class Member extends MemberBase {
|
|
582
|
+
/**
|
|
583
|
+
* Unique identifier for this member.
|
|
584
|
+
*
|
|
585
|
+
* @remarks
|
|
586
|
+
* Doxygen-generated unique ID used for cross-references, permalinks,
|
|
587
|
+
* and member lookup operations throughout the documentation.
|
|
588
|
+
*/
|
|
589
|
+
id: string
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* The member kind from Doxygen classification.
|
|
593
|
+
*
|
|
594
|
+
* @remarks
|
|
595
|
+
* Specifies the type of member (e.g., 'function', 'variable', 'enum',
|
|
596
|
+
* 'typedef') which determines rendering and documentation behaviour.
|
|
597
|
+
*/
|
|
598
|
+
kind: string
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Brief description in HTML format.
|
|
602
|
+
*
|
|
603
|
+
* @remarks
|
|
604
|
+
* Optional short description of the member, processed into HTML for
|
|
605
|
+
* display in indices and member overviews.
|
|
606
|
+
*/
|
|
607
|
+
briefDescriptionHtmlString: string | undefined
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Detailed description lines in HTML format.
|
|
611
|
+
*
|
|
612
|
+
* @remarks
|
|
613
|
+
* Comprehensive member documentation including parameters, return values,
|
|
614
|
+
* examples, and detailed explanations processed into HTML lines.
|
|
615
|
+
*/
|
|
616
|
+
detailedDescriptionHtmlLines: string[] | undefined
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Function argument string from Doxygen.
|
|
620
|
+
*
|
|
621
|
+
* @remarks
|
|
622
|
+
* Contains the complete function signature arguments including types,
|
|
623
|
+
* names, and default values for function-type members.
|
|
624
|
+
*/
|
|
625
|
+
argsstring: string | undefined
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Fully qualified member name.
|
|
629
|
+
*
|
|
630
|
+
* @remarks
|
|
631
|
+
* Complete qualified name including namespace and class scope,
|
|
632
|
+
* used for accurate member identification and documentation.
|
|
633
|
+
*/
|
|
634
|
+
qualifiedName: string | undefined
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Member definition string from Doxygen.
|
|
638
|
+
*
|
|
639
|
+
* @remarks
|
|
640
|
+
* Complete member definition including type, qualifiers, and signature,
|
|
641
|
+
* used for generating accurate member documentation and prototypes.
|
|
642
|
+
*/
|
|
643
|
+
definition: string | undefined
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Member type information in HTML format.
|
|
647
|
+
*
|
|
648
|
+
* @remarks
|
|
649
|
+
* Type specification for the member including template parameters and
|
|
650
|
+
* qualifiers, processed into HTML for documentation display.
|
|
651
|
+
*/
|
|
652
|
+
type: string | undefined
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Member initialiser lines in HTML format.
|
|
656
|
+
*
|
|
657
|
+
* @remarks
|
|
658
|
+
* Variable or constant initialisation values, processed into HTML lines
|
|
659
|
+
* for display in member documentation and indices.
|
|
660
|
+
*/
|
|
661
|
+
initializerHtmlLines: string[] | undefined
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* Location information in Markdown format.
|
|
665
|
+
*
|
|
666
|
+
* @remarks
|
|
667
|
+
* File and line number information for the member definition,
|
|
668
|
+
* formatted as Markdown for documentation display.
|
|
669
|
+
*/
|
|
670
|
+
locationMarkdownLines: string[] | undefined
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Template parameters string.
|
|
674
|
+
*
|
|
675
|
+
* @remarks
|
|
676
|
+
* Template parameter specification for template members, formatted
|
|
677
|
+
* for display in member documentation headers.
|
|
678
|
+
*/
|
|
679
|
+
templateParameters: string | undefined
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Enumeration values in HTML format.
|
|
683
|
+
*
|
|
684
|
+
* @remarks
|
|
685
|
+
* For enum members, contains the formatted enumeration values table
|
|
686
|
+
* with descriptions, processed into HTML lines.
|
|
687
|
+
*/
|
|
688
|
+
enumHtmlLines: string[] | undefined
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Function parameters in HTML format.
|
|
692
|
+
*
|
|
693
|
+
* @remarks
|
|
694
|
+
* For function members, contains the processed parameter list with
|
|
695
|
+
* types and names formatted as HTML string.
|
|
696
|
+
*/
|
|
697
|
+
parametersHtmlString: string | undefined
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Program listing for inline code display.
|
|
701
|
+
*
|
|
702
|
+
* @remarks
|
|
703
|
+
* When enabled, contains the source code excerpt for the member
|
|
704
|
+
* definition for inline documentation display.
|
|
705
|
+
*/
|
|
706
|
+
programListing: ProgramListingDataModel | undefined
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Cross-references to members that reference this member.
|
|
710
|
+
*
|
|
711
|
+
* @remarks
|
|
712
|
+
* Markdown-formatted list of members and locations that reference
|
|
713
|
+
* this member, providing reverse lookup capabilities.
|
|
714
|
+
*/
|
|
715
|
+
referencedByMarkdownString: string | undefined
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Cross-references to members referenced by this member.
|
|
719
|
+
*
|
|
720
|
+
* @remarks
|
|
721
|
+
* Markdown-formatted list of members and locations referenced by
|
|
722
|
+
* this member, providing forward lookup capabilities.
|
|
723
|
+
*/
|
|
724
|
+
referencesMarkdownString: string | undefined
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Enumeration values for enum members.
|
|
728
|
+
*
|
|
729
|
+
* @remarks
|
|
730
|
+
* For enumeration members, contains the collection of enum values
|
|
731
|
+
* with their documentation and initialiser values.
|
|
732
|
+
*/
|
|
733
|
+
enumValues: EnumValue[] | undefined
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Collection of member attribute labels.
|
|
737
|
+
*
|
|
738
|
+
* @remarks
|
|
739
|
+
* Contains labels such as 'static', 'inline', 'virtual', 'const' that
|
|
740
|
+
* are displayed as badges in the member documentation.
|
|
741
|
+
*/
|
|
742
|
+
labels: string[] = []
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Indicates if the member uses trailing return type syntax.
|
|
746
|
+
*
|
|
747
|
+
* @remarks
|
|
748
|
+
* For C++ functions with trailing return types (auto func() -> Type),
|
|
749
|
+
* affects how the member signature is formatted in documentation.
|
|
750
|
+
*/
|
|
751
|
+
isTrailingType = false
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Indicates if the member is declared as constexpr.
|
|
755
|
+
*
|
|
756
|
+
* @remarks
|
|
757
|
+
* True for constexpr members, affects display formatting and
|
|
758
|
+
* documentation generation for compile-time constants.
|
|
759
|
+
*/
|
|
760
|
+
isConstexpr = false
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Indicates if the member is a strong enum.
|
|
764
|
+
*
|
|
765
|
+
* @remarks
|
|
766
|
+
* True for enum class declarations, affects how enumeration
|
|
767
|
+
* documentation is formatted and displayed.
|
|
768
|
+
*/
|
|
769
|
+
isStrong = false
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Indicates if the member is declared as const.
|
|
773
|
+
*
|
|
774
|
+
* @remarks
|
|
775
|
+
* True for const members, affects member signature display
|
|
776
|
+
* and documentation formatting.
|
|
777
|
+
*/
|
|
778
|
+
isConst = false
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Indicates if the member is declared as static.
|
|
782
|
+
*
|
|
783
|
+
* @remarks
|
|
784
|
+
* True for static members, affects member organisation,
|
|
785
|
+
* display formatting, and section classification.
|
|
786
|
+
*/
|
|
787
|
+
isStatic = false
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Private data available only during initialisation.
|
|
791
|
+
*
|
|
792
|
+
* @remarks
|
|
793
|
+
* Temporary storage for member definition data that is cleared
|
|
794
|
+
* after late initialisation to reduce memory usage.
|
|
795
|
+
*
|
|
796
|
+
* @internal
|
|
797
|
+
*/
|
|
798
|
+
_private: {
|
|
799
|
+
// Available only during the initializeLate().
|
|
800
|
+
_memberDef?: MemberDefDataModel
|
|
801
|
+
} = {}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Initialises a new Member instance from member definition data.
|
|
805
|
+
*
|
|
806
|
+
* @remarks
|
|
807
|
+
* Creates a member instance with basic identification information.
|
|
808
|
+
* Full initialisation occurs later during the initializeLate phase
|
|
809
|
+
* when workspace context is available for processing descriptions
|
|
810
|
+
* and cross-references.
|
|
811
|
+
*
|
|
812
|
+
* @param section - The parent section containing this member
|
|
813
|
+
* @param memberDef - The member definition containing member metadata
|
|
814
|
+
*
|
|
815
|
+
* @public
|
|
816
|
+
*/
|
|
817
|
+
constructor(section: Section, memberDef: MemberDefDataModel) {
|
|
818
|
+
super(section, memberDef.name)
|
|
819
|
+
this._private._memberDef = memberDef
|
|
820
|
+
|
|
821
|
+
const { id, kind } = memberDef
|
|
822
|
+
this.id = id
|
|
823
|
+
this.kind = kind
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Performs comprehensive late initialisation for member documentation.
|
|
828
|
+
*
|
|
829
|
+
* @remarks
|
|
830
|
+
* Processes member descriptions, signatures, location data, cross-references,
|
|
831
|
+
* and rendering properties. This method transforms raw Doxygen data into
|
|
832
|
+
* formatted HTML content ready for documentation generation. It handles
|
|
833
|
+
* template parameters, enumeration values, and various member attributes.
|
|
834
|
+
*
|
|
835
|
+
* @public
|
|
836
|
+
*/
|
|
837
|
+
override initializeLate(): void {
|
|
838
|
+
super.initializeLate()
|
|
839
|
+
|
|
840
|
+
const { _memberDef: memberDef } = this._private
|
|
841
|
+
assert(memberDef !== undefined)
|
|
842
|
+
|
|
843
|
+
const { workspace } = this.section.compound.collection
|
|
844
|
+
|
|
845
|
+
if (memberDef.briefDescription !== undefined) {
|
|
846
|
+
// console.log(memberDef.briefDescription)
|
|
847
|
+
assert(memberDef.briefDescription.children !== undefined)
|
|
848
|
+
for (const child of memberDef.briefDescription.children) {
|
|
849
|
+
if (child instanceof ParaDataModel) {
|
|
850
|
+
child.skipPara = true
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
this.briefDescriptionHtmlString = workspace
|
|
855
|
+
.renderElementToString(memberDef.briefDescription, 'html')
|
|
856
|
+
.trim()
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
if (memberDef.detailedDescription !== undefined) {
|
|
860
|
+
this.detailedDescriptionHtmlLines = workspace.renderElementToLines(
|
|
861
|
+
memberDef.detailedDescription,
|
|
862
|
+
'html'
|
|
863
|
+
)
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
const { argsstring } = memberDef
|
|
867
|
+
this.argsstring = argsstring
|
|
868
|
+
|
|
869
|
+
if (memberDef.type !== undefined) {
|
|
870
|
+
this.type = workspace.renderElementToString(memberDef.type, 'html').trim()
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
if (memberDef.initializer !== undefined) {
|
|
874
|
+
this.initializerHtmlLines = workspace.renderElementToLines(
|
|
875
|
+
memberDef.initializer,
|
|
876
|
+
'html'
|
|
877
|
+
)
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
if (memberDef.location !== undefined) {
|
|
881
|
+
this.locationMarkdownLines = this.section.compound.renderLocationToLines(
|
|
882
|
+
memberDef.location
|
|
883
|
+
)
|
|
884
|
+
|
|
885
|
+
if (workspace.options.renderProgramListingInline) {
|
|
886
|
+
this.programListing = this.filterProgramListingForLocation(
|
|
887
|
+
memberDef.location
|
|
888
|
+
)
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
if (memberDef.references !== undefined) {
|
|
893
|
+
this.referencesMarkdownString =
|
|
894
|
+
this.section.compound.renderReferencesToHtmlString(memberDef.references)
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
if (memberDef.referencedBy !== undefined) {
|
|
898
|
+
this.referencedByMarkdownString =
|
|
899
|
+
this.section.compound.renderReferencedByToHtmlString(
|
|
900
|
+
memberDef.referencedBy
|
|
901
|
+
)
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
const labels: string[] = []
|
|
905
|
+
if (memberDef.inline?.valueOf() ?? false) {
|
|
906
|
+
labels.push('inline')
|
|
907
|
+
}
|
|
908
|
+
if (memberDef.explicit?.valueOf() ?? false) {
|
|
909
|
+
labels.push('explicit')
|
|
910
|
+
}
|
|
911
|
+
if (memberDef.nodiscard?.valueOf() ?? false) {
|
|
912
|
+
labels.push('nodiscard')
|
|
913
|
+
}
|
|
914
|
+
if (memberDef.constexpr?.valueOf() ?? false) {
|
|
915
|
+
labels.push('constexpr')
|
|
916
|
+
}
|
|
917
|
+
if (memberDef.noexcept?.valueOf() ?? false) {
|
|
918
|
+
labels.push('noexcept')
|
|
919
|
+
}
|
|
920
|
+
if (memberDef.prot === 'protected') {
|
|
921
|
+
labels.push('protected')
|
|
922
|
+
}
|
|
923
|
+
if (memberDef.staticc?.valueOf() ?? false) {
|
|
924
|
+
this.isStatic = true
|
|
925
|
+
labels.push('static')
|
|
926
|
+
}
|
|
927
|
+
if (memberDef.virt !== undefined && memberDef.virt === 'virtual') {
|
|
928
|
+
labels.push('virtual')
|
|
929
|
+
}
|
|
930
|
+
// WARNING: there is no explicit attribute for 'delete'.
|
|
931
|
+
if (memberDef.argsstring?.endsWith('=delete') ?? false) {
|
|
932
|
+
labels.push('delete')
|
|
933
|
+
}
|
|
934
|
+
// WARNING: there is no explicit attribute for 'default'.
|
|
935
|
+
if (memberDef.argsstring?.endsWith('=default') ?? false) {
|
|
936
|
+
labels.push('default')
|
|
937
|
+
}
|
|
938
|
+
if (memberDef.strong?.valueOf() ?? false) {
|
|
939
|
+
labels.push('strong')
|
|
940
|
+
}
|
|
941
|
+
if (memberDef.mutable?.valueOf() ?? false) {
|
|
942
|
+
labels.push('mutable')
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
// WARNING: could not find how to generate 'inherited'.
|
|
946
|
+
|
|
947
|
+
this.labels = labels
|
|
948
|
+
|
|
949
|
+
const type = this.type ?? ''
|
|
950
|
+
const templateParamList =
|
|
951
|
+
memberDef.templateparamlist ??
|
|
952
|
+
(this.section.compound as Class).templateParamList
|
|
953
|
+
|
|
954
|
+
if (
|
|
955
|
+
this.section.compound.isTemplate(templateParamList) &&
|
|
956
|
+
(type.includes('decltype(') ||
|
|
957
|
+
(type.includes('<') && type.includes('>')))
|
|
958
|
+
) {
|
|
959
|
+
this.isTrailingType = true
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
if (templateParamList?.params !== undefined) {
|
|
963
|
+
this.templateParameters = sanitizeAnonymousNamespace(
|
|
964
|
+
this.section.compound.renderTemplateParametersToString({
|
|
965
|
+
templateParamList,
|
|
966
|
+
withDefaults: true,
|
|
967
|
+
})
|
|
968
|
+
)
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
if (memberDef.params !== undefined) {
|
|
972
|
+
const parameters: string[] = []
|
|
973
|
+
for (const param of memberDef.params) {
|
|
974
|
+
parameters.push(workspace.renderElementToString(param, 'html').trim())
|
|
975
|
+
}
|
|
976
|
+
if (parameters.length > 0) {
|
|
977
|
+
this.parametersHtmlString = parameters.join(', ')
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
if (memberDef.kind === 'enum' && memberDef.enumvalues !== undefined) {
|
|
982
|
+
const enumValues = []
|
|
983
|
+
|
|
984
|
+
for (const enumValueDataModel of memberDef.enumvalues) {
|
|
985
|
+
enumValues.push(new EnumValue(this, enumValueDataModel))
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
if (enumValues.length > 0) {
|
|
989
|
+
this.enumValues = enumValues
|
|
990
|
+
|
|
991
|
+
this.enumHtmlLines = this.renderEnumToLines()
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
if (memberDef.qualifiedName !== undefined) {
|
|
996
|
+
this.qualifiedName = sanitizeAnonymousNamespace(memberDef.qualifiedName)
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
if (memberDef.definition !== undefined) {
|
|
1000
|
+
this.definition = sanitizeAnonymousNamespace(memberDef.definition)
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
if (
|
|
1004
|
+
(memberDef.constexpr?.valueOf() ?? false) &&
|
|
1005
|
+
!type.includes('constexpr')
|
|
1006
|
+
) {
|
|
1007
|
+
this.isConstexpr = true
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
this.isStrong = memberDef.strong?.valueOf() ?? false
|
|
1011
|
+
this.isConst = memberDef.constt?.valueOf() ?? false
|
|
1012
|
+
|
|
1013
|
+
// Clear the reference, it is no longer needed.
|
|
1014
|
+
this._private._memberDef = undefined
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Filters program listing content for a specific member location.
|
|
1019
|
+
*
|
|
1020
|
+
* @remarks
|
|
1021
|
+
* Extracts relevant source code lines from file program listings based on
|
|
1022
|
+
* member location data. Creates a filtered program listing containing only
|
|
1023
|
+
* the code relevant to this specific member for inline documentation display.
|
|
1024
|
+
*
|
|
1025
|
+
* @param location - The location data containing file and line information
|
|
1026
|
+
* @returns Filtered program listing or undefined if unavailable
|
|
1027
|
+
*
|
|
1028
|
+
* @private
|
|
1029
|
+
*/
|
|
1030
|
+
filterProgramListingForLocation(
|
|
1031
|
+
location: LocationDataModel | undefined
|
|
1032
|
+
): MemberProgramListingDataModel | undefined {
|
|
1033
|
+
// console.log(location)
|
|
1034
|
+
|
|
1035
|
+
const { workspace } = this.section.compound.collection
|
|
1036
|
+
|
|
1037
|
+
if (location === undefined) {
|
|
1038
|
+
return undefined
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
let programListing: MemberProgramListingDataModel | undefined = undefined
|
|
1042
|
+
|
|
1043
|
+
let definitionFile: File | undefined = undefined
|
|
1044
|
+
let startLine = -1
|
|
1045
|
+
let endLine = -1
|
|
1046
|
+
|
|
1047
|
+
if (location.bodyfile !== undefined) {
|
|
1048
|
+
definitionFile = workspace.filesByPath.get(location.bodyfile)
|
|
1049
|
+
if (definitionFile === undefined) {
|
|
1050
|
+
console.log('no definition')
|
|
1051
|
+
return undefined
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
if (definitionFile.programListing === undefined) {
|
|
1055
|
+
console.log('no listing')
|
|
1056
|
+
return undefined
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
if (location.bodystart !== undefined) {
|
|
1060
|
+
startLine = location.bodystart.valueOf()
|
|
1061
|
+
|
|
1062
|
+
if (location.bodyend !== undefined) {
|
|
1063
|
+
endLine = location.bodyend.valueOf()
|
|
1064
|
+
}
|
|
1065
|
+
if (endLine === -1) {
|
|
1066
|
+
endLine = startLine
|
|
1067
|
+
}
|
|
1068
|
+
} else {
|
|
1069
|
+
return undefined
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
// console.log(definitionFile.indexName, startLine, endLine)
|
|
1073
|
+
|
|
1074
|
+
programListing = new MemberProgramListingDataModel(
|
|
1075
|
+
definitionFile.programListing,
|
|
1076
|
+
startLine,
|
|
1077
|
+
endLine
|
|
1078
|
+
)
|
|
1079
|
+
// } else if (location.file !== undefined) {
|
|
1080
|
+
// definitionFile = workspace.filesByPath.get(location.file)
|
|
1081
|
+
// if (definitionFile === undefined) {
|
|
1082
|
+
// console.log('no definition')
|
|
1083
|
+
// return undefined
|
|
1084
|
+
// }
|
|
1085
|
+
|
|
1086
|
+
// if (definitionFile.programListing === undefined) {
|
|
1087
|
+
// console.log('no listing')
|
|
1088
|
+
// return undefined
|
|
1089
|
+
// }
|
|
1090
|
+
|
|
1091
|
+
// if (location.line !== undefined) {
|
|
1092
|
+
// startLine = location.line.valueOf()
|
|
1093
|
+
// endLine = startLine
|
|
1094
|
+
// } else {
|
|
1095
|
+
// return undefined
|
|
1096
|
+
// }
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
if (definitionFile?.programListing !== undefined) {
|
|
1100
|
+
// console.log(definitionFile.indexName, startLine, endLine)
|
|
1101
|
+
|
|
1102
|
+
programListing = new MemberProgramListingDataModel(
|
|
1103
|
+
definitionFile.programListing,
|
|
1104
|
+
startLine,
|
|
1105
|
+
endLine
|
|
1106
|
+
)
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
// console.log(programListing)
|
|
1110
|
+
return programListing
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
// --------------------------------------------------------------------------
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* Renders the member index entry to HTML table lines.
|
|
1117
|
+
*
|
|
1118
|
+
* @remarks
|
|
1119
|
+
* Generates a formatted HTML table row for member index display, including
|
|
1120
|
+
* member signature, type information, template parameters, and brief
|
|
1121
|
+
* description. The format varies based on member kind (function, variable,
|
|
1122
|
+
* enum, typedef, etc.) to provide appropriate representation.
|
|
1123
|
+
*
|
|
1124
|
+
* @returns Array of HTML lines representing the member index entry
|
|
1125
|
+
*
|
|
1126
|
+
* @public
|
|
1127
|
+
*/
|
|
1128
|
+
renderIndexToLines(): string[] {
|
|
1129
|
+
// console.log(util.inspect(this, { compact: false, depth: 999 }))
|
|
1130
|
+
const lines: string[] = []
|
|
1131
|
+
|
|
1132
|
+
const workspace = this.section.compound.collection.workspace
|
|
1133
|
+
|
|
1134
|
+
const permalink = workspace.getPermalink({
|
|
1135
|
+
refid: this.id,
|
|
1136
|
+
kindref: 'member',
|
|
1137
|
+
})
|
|
1138
|
+
assert(permalink !== undefined && permalink.length > 1)
|
|
1139
|
+
|
|
1140
|
+
const name = workspace.renderString(this.name, 'html')
|
|
1141
|
+
|
|
1142
|
+
let itemTemplate = ''
|
|
1143
|
+
let itemType = ''
|
|
1144
|
+
let itemName = `<a href="${permalink}">${name}</a>`
|
|
1145
|
+
|
|
1146
|
+
if (
|
|
1147
|
+
this.templateParameters !== undefined &&
|
|
1148
|
+
this.templateParameters.length > 0
|
|
1149
|
+
) {
|
|
1150
|
+
if (this.templateParameters.length < 64) {
|
|
1151
|
+
itemTemplate = workspace.renderString(
|
|
1152
|
+
`template ${this.templateParameters}`,
|
|
1153
|
+
'html'
|
|
1154
|
+
)
|
|
1155
|
+
} else {
|
|
1156
|
+
itemTemplate = workspace.renderString('template < ... >', 'html')
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
switch (this.kind) {
|
|
1160
|
+
case 'typedef':
|
|
1161
|
+
if (this.definition?.startsWith('typedef') ?? false) {
|
|
1162
|
+
itemType = 'typedef'
|
|
1163
|
+
assert(this.type !== undefined)
|
|
1164
|
+
itemName = `${this.type} ${itemName}`
|
|
1165
|
+
if (this.argsstring !== undefined) {
|
|
1166
|
+
itemName += this.argsstring
|
|
1167
|
+
}
|
|
1168
|
+
} else if (this.definition?.startsWith('using') ?? false) {
|
|
1169
|
+
itemType = 'using'
|
|
1170
|
+
if (this.type !== undefined) {
|
|
1171
|
+
itemName += ' = '
|
|
1172
|
+
itemName += this.type
|
|
1173
|
+
}
|
|
1174
|
+
} else {
|
|
1175
|
+
console.error('Unsupported typedef in member', this.definition)
|
|
1176
|
+
}
|
|
1177
|
+
break
|
|
1178
|
+
|
|
1179
|
+
case 'function':
|
|
1180
|
+
{
|
|
1181
|
+
// WARNING: the rule to decide which type is trailing is not
|
|
1182
|
+
// in the XMLs.
|
|
1183
|
+
// https://github.com/doxygen/doxygen/discussions/11568
|
|
1184
|
+
// TODO: improve.
|
|
1185
|
+
|
|
1186
|
+
const type = this.type ?? ''
|
|
1187
|
+
|
|
1188
|
+
if (this.isStatic) {
|
|
1189
|
+
itemType += 'static '
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
if (this.isConstexpr) {
|
|
1193
|
+
itemType += 'constexpr '
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
if (this.argsstring !== undefined) {
|
|
1197
|
+
itemName += ' '
|
|
1198
|
+
itemName += workspace.renderString(this.argsstring, 'html')
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
if (this.isTrailingType) {
|
|
1202
|
+
if (!itemType.includes('auto')) {
|
|
1203
|
+
itemType += 'auto '
|
|
1204
|
+
}
|
|
1205
|
+
// WARNING: Doxygen shows this, but the resulting line is too long.
|
|
1206
|
+
itemName += workspace.renderString(' -> ', 'html')
|
|
1207
|
+
itemName += type
|
|
1208
|
+
} else {
|
|
1209
|
+
itemType += type
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
if (this.initializerHtmlLines !== undefined) {
|
|
1213
|
+
// Show only short initializers in the index.
|
|
1214
|
+
itemName += ' '
|
|
1215
|
+
if (this.initializerHtmlLines.length === 1) {
|
|
1216
|
+
itemName += this.initializerHtmlLines[0]
|
|
1217
|
+
} else {
|
|
1218
|
+
itemName += '= ...'
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
break
|
|
1223
|
+
|
|
1224
|
+
case 'variable':
|
|
1225
|
+
if (this.isStatic) {
|
|
1226
|
+
itemType += 'static '
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
if (this.isConstexpr) {
|
|
1230
|
+
itemType += 'constexpr '
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
assert(this.type !== undefined)
|
|
1234
|
+
itemType += this.type
|
|
1235
|
+
if (this.definition?.startsWith('struct ') ?? false) {
|
|
1236
|
+
itemType = workspace.renderString('struct { ... }', 'html')
|
|
1237
|
+
} else if (this.definition?.startsWith('class ') ?? false) {
|
|
1238
|
+
itemType = workspace.renderString('class { ... }', 'html')
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
if (this.argsstring !== undefined) {
|
|
1242
|
+
itemName += this.argsstring
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
if (this.initializerHtmlLines !== undefined) {
|
|
1246
|
+
// Show only short initializers in the index.
|
|
1247
|
+
itemName += ' '
|
|
1248
|
+
if (this.initializerHtmlLines.length === 1) {
|
|
1249
|
+
itemName += this.initializerHtmlLines[0]
|
|
1250
|
+
} else {
|
|
1251
|
+
itemName += '= ...'
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
break
|
|
1255
|
+
|
|
1256
|
+
case 'enum':
|
|
1257
|
+
// console.log(this)
|
|
1258
|
+
itemType = ''
|
|
1259
|
+
if (this.name.length === 0) {
|
|
1260
|
+
itemType += 'anonymous '
|
|
1261
|
+
}
|
|
1262
|
+
itemType += 'enum'
|
|
1263
|
+
if (this.isStrong) {
|
|
1264
|
+
itemType += ' class'
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
itemName = this.name
|
|
1268
|
+
if (this.type !== undefined && this.type.length > 0) {
|
|
1269
|
+
itemName += ` : ${this.type}`
|
|
1270
|
+
}
|
|
1271
|
+
itemName += workspace.renderString(' { ', 'html')
|
|
1272
|
+
itemName += `<a href="${permalink}">...</a>`
|
|
1273
|
+
itemName += workspace.renderString(' }', 'html')
|
|
1274
|
+
|
|
1275
|
+
break
|
|
1276
|
+
|
|
1277
|
+
case 'friend':
|
|
1278
|
+
// console.log(this)
|
|
1279
|
+
itemType = this.type ?? 'class'
|
|
1280
|
+
|
|
1281
|
+
break
|
|
1282
|
+
|
|
1283
|
+
case 'define':
|
|
1284
|
+
// console.log(this)
|
|
1285
|
+
itemType = '#define'
|
|
1286
|
+
|
|
1287
|
+
if (this.parametersHtmlString !== undefined) {
|
|
1288
|
+
itemName += `(${this.parametersHtmlString})`
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
if (this.initializerHtmlLines !== undefined) {
|
|
1292
|
+
itemName += ' '
|
|
1293
|
+
if (this.initializerHtmlLines.length === 1) {
|
|
1294
|
+
itemName += this.initializerHtmlLines[0]
|
|
1295
|
+
} else {
|
|
1296
|
+
itemName += '...'
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
break
|
|
1301
|
+
|
|
1302
|
+
default:
|
|
1303
|
+
console.error(
|
|
1304
|
+
'member kind',
|
|
1305
|
+
this.kind,
|
|
1306
|
+
'not implemented yet in',
|
|
1307
|
+
this.constructor.name,
|
|
1308
|
+
'renderIndexToLines'
|
|
1309
|
+
)
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
lines.push('')
|
|
1313
|
+
|
|
1314
|
+
if (itemName.length === 0) {
|
|
1315
|
+
if (this.section.compound.collection.workspace.options.debug) {
|
|
1316
|
+
console.log(this)
|
|
1317
|
+
}
|
|
1318
|
+
console.warn('empty name in', this.id)
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
const childrenLines: string[] = []
|
|
1322
|
+
const { briefDescriptionHtmlString: briefDescriptionString } = this
|
|
1323
|
+
if (
|
|
1324
|
+
briefDescriptionString !== undefined &&
|
|
1325
|
+
briefDescriptionString.length > 0
|
|
1326
|
+
) {
|
|
1327
|
+
childrenLines.push(
|
|
1328
|
+
this.section.compound.renderBriefDescriptionToHtmlString({
|
|
1329
|
+
briefDescriptionHtmlString: briefDescriptionString,
|
|
1330
|
+
morePermalink: permalink, // No #details, it is already an anchor.
|
|
1331
|
+
})
|
|
1332
|
+
)
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
lines.push(
|
|
1336
|
+
...workspace.renderMembersIndexItemToHtmlLines({
|
|
1337
|
+
template: itemTemplate,
|
|
1338
|
+
type: itemType,
|
|
1339
|
+
name: itemName,
|
|
1340
|
+
childrenLines,
|
|
1341
|
+
})
|
|
1342
|
+
)
|
|
1343
|
+
|
|
1344
|
+
return lines
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
// --------------------------------------------------------------------------
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* Renders the complete member documentation to HTML lines.
|
|
1351
|
+
*
|
|
1352
|
+
* @remarks
|
|
1353
|
+
* Generates comprehensive member documentation including header, signature,
|
|
1354
|
+
* template parameters, descriptions, initialisers, and cross-references.
|
|
1355
|
+
* The output format varies based on member type to provide appropriate
|
|
1356
|
+
* documentation structure for functions, variables, enums, and other members.
|
|
1357
|
+
*
|
|
1358
|
+
* @returns Array of HTML lines representing the complete member documentation
|
|
1359
|
+
*
|
|
1360
|
+
* @public
|
|
1361
|
+
*/
|
|
1362
|
+
renderToLines(): string[] {
|
|
1363
|
+
const lines: string[] = []
|
|
1364
|
+
|
|
1365
|
+
const workspace = this.section.compound.collection.workspace
|
|
1366
|
+
|
|
1367
|
+
const isFunction: boolean =
|
|
1368
|
+
this.section.kind.startsWith('func') ||
|
|
1369
|
+
this.section.kind.endsWith('func') ||
|
|
1370
|
+
this.section.kind.endsWith('constructorr') ||
|
|
1371
|
+
this.section.kind.endsWith('destructor') ||
|
|
1372
|
+
this.section.kind.endsWith('operator')
|
|
1373
|
+
|
|
1374
|
+
const id = getPermalinkAnchor(this.id)
|
|
1375
|
+
const name = this.name + (isFunction ? '()' : '')
|
|
1376
|
+
|
|
1377
|
+
lines.push('')
|
|
1378
|
+
if (this.kind !== 'enum') {
|
|
1379
|
+
lines.push(`### ${workspace.renderString(name, 'markdown')} {#${id}}`)
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
let template: string | undefined = undefined
|
|
1383
|
+
let prototype: string | undefined = undefined
|
|
1384
|
+
const { labels } = this
|
|
1385
|
+
const childrenLines: string[] = []
|
|
1386
|
+
|
|
1387
|
+
// console.log(memberDef.kind)
|
|
1388
|
+
switch (this.kind) {
|
|
1389
|
+
case 'function':
|
|
1390
|
+
case 'typedef':
|
|
1391
|
+
case 'variable':
|
|
1392
|
+
// WARNING: the rule to decide which type is trailing is not in XMLs.
|
|
1393
|
+
// TODO: improve.
|
|
1394
|
+
assert(this.definition !== undefined)
|
|
1395
|
+
prototype = workspace.renderString(this.definition, 'html')
|
|
1396
|
+
if (this.isStatic) {
|
|
1397
|
+
// The html pages show `static` only as a label; strip it.
|
|
1398
|
+
prototype = prototype.replace(/^static /, '')
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
if (this.kind === 'function') {
|
|
1402
|
+
prototype += ' ('
|
|
1403
|
+
|
|
1404
|
+
if (this.parametersHtmlString !== undefined) {
|
|
1405
|
+
prototype += this.parametersHtmlString
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
prototype += ')'
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
if (this.initializerHtmlLines !== undefined) {
|
|
1412
|
+
if (this.initializerHtmlLines.length === 1) {
|
|
1413
|
+
prototype += ` ${this.initializerHtmlLines[0]}`
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
if (
|
|
1418
|
+
this.templateParameters !== undefined &&
|
|
1419
|
+
this.templateParameters.length > 0
|
|
1420
|
+
) {
|
|
1421
|
+
template = workspace.renderString(
|
|
1422
|
+
`template ${this.templateParameters}`,
|
|
1423
|
+
'html'
|
|
1424
|
+
)
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
if (this.briefDescriptionHtmlString !== undefined) {
|
|
1428
|
+
childrenLines.push(
|
|
1429
|
+
this.section.compound.renderBriefDescriptionToHtmlString({
|
|
1430
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1431
|
+
})
|
|
1432
|
+
)
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
if (
|
|
1436
|
+
this.initializerHtmlLines !== undefined &&
|
|
1437
|
+
this.initializerHtmlLines.length > 1
|
|
1438
|
+
) {
|
|
1439
|
+
childrenLines.push('')
|
|
1440
|
+
childrenLines.push('<dl class="doxySectionUser">')
|
|
1441
|
+
childrenLines.push('<dt>Initialiser</dt>')
|
|
1442
|
+
childrenLines.push('<dd>')
|
|
1443
|
+
if (this.initializerHtmlLines.length === 1) {
|
|
1444
|
+
childrenLines.push(
|
|
1445
|
+
`<div class="doxyVerbatim">${this.initializerHtmlLines[0]}</div>`
|
|
1446
|
+
)
|
|
1447
|
+
} else {
|
|
1448
|
+
childrenLines.push(
|
|
1449
|
+
`<div class="doxyVerbatim">${this.initializerHtmlLines[0]}`
|
|
1450
|
+
)
|
|
1451
|
+
for (const initializerLine of this.initializerHtmlLines.slice(1)) {
|
|
1452
|
+
if (initializerLine.trim().length > 0) {
|
|
1453
|
+
childrenLines.push(initializerLine)
|
|
1454
|
+
// } else {
|
|
1455
|
+
// childrenLines.push(' ')
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
childrenLines.push('</div>')
|
|
1459
|
+
}
|
|
1460
|
+
childrenLines.push('</dd>')
|
|
1461
|
+
childrenLines.push('</dl>')
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
if (this.detailedDescriptionHtmlLines !== undefined) {
|
|
1465
|
+
childrenLines.push(
|
|
1466
|
+
...this.section.compound.renderDetailedDescriptionToHtmlLines({
|
|
1467
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1468
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1469
|
+
showHeader: false,
|
|
1470
|
+
showBrief: false,
|
|
1471
|
+
})
|
|
1472
|
+
)
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
break
|
|
1476
|
+
|
|
1477
|
+
case 'enum':
|
|
1478
|
+
prototype = ''
|
|
1479
|
+
if (this.name.length === 0) {
|
|
1480
|
+
prototype += 'anonymous '
|
|
1481
|
+
}
|
|
1482
|
+
prototype += 'enum '
|
|
1483
|
+
if (this.isStrong) {
|
|
1484
|
+
prototype += 'class '
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
if (this.name.length > 0) {
|
|
1488
|
+
lines.push(`### ${workspace.renderString(name, 'markdown')} {#${id}}`)
|
|
1489
|
+
} else {
|
|
1490
|
+
lines.push(`### ${prototype} {#${id}}`)
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
if (
|
|
1494
|
+
this.briefDescriptionHtmlString !== undefined &&
|
|
1495
|
+
this.briefDescriptionHtmlString.length > 0
|
|
1496
|
+
) {
|
|
1497
|
+
childrenLines.push(
|
|
1498
|
+
this.section.compound.renderBriefDescriptionToHtmlString({
|
|
1499
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1500
|
+
})
|
|
1501
|
+
)
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
if (this.enumHtmlLines !== undefined) {
|
|
1505
|
+
childrenLines.push(...this.enumHtmlLines)
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
if (this.detailedDescriptionHtmlLines !== undefined) {
|
|
1509
|
+
childrenLines.push(
|
|
1510
|
+
...this.section.compound.renderDetailedDescriptionToHtmlLines({
|
|
1511
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1512
|
+
showHeader: false,
|
|
1513
|
+
showBrief: false,
|
|
1514
|
+
})
|
|
1515
|
+
)
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
if (this.name.length > 0 && this.qualifiedName !== undefined) {
|
|
1519
|
+
prototype += `${workspace.renderString(this.qualifiedName, 'html')} `
|
|
1520
|
+
} else if (this.name.length > 0) {
|
|
1521
|
+
prototype += `${workspace.renderString(this.name, 'html')} `
|
|
1522
|
+
}
|
|
1523
|
+
if (this.type !== undefined && this.type.length > 0) {
|
|
1524
|
+
prototype += `: ${this.type}`
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
break
|
|
1528
|
+
|
|
1529
|
+
case 'friend':
|
|
1530
|
+
// console.log(this)
|
|
1531
|
+
assert(this.type !== undefined)
|
|
1532
|
+
prototype = `friend ${this.type}`
|
|
1533
|
+
if (this.parametersHtmlString !== undefined) {
|
|
1534
|
+
prototype += ` ${this.parametersHtmlString}`
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
if (this.detailedDescriptionHtmlLines !== undefined) {
|
|
1538
|
+
childrenLines.push(
|
|
1539
|
+
...this.section.compound.renderDetailedDescriptionToHtmlLines({
|
|
1540
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1541
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1542
|
+
showHeader: false,
|
|
1543
|
+
showBrief: true,
|
|
1544
|
+
})
|
|
1545
|
+
)
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
break
|
|
1549
|
+
|
|
1550
|
+
case 'define':
|
|
1551
|
+
// console.log(this)
|
|
1552
|
+
prototype = `#define ${name}`
|
|
1553
|
+
|
|
1554
|
+
if (this.parametersHtmlString !== undefined) {
|
|
1555
|
+
prototype += `(${this.parametersHtmlString})`
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
if (this.initializerHtmlLines !== undefined) {
|
|
1559
|
+
prototype += ' '
|
|
1560
|
+
if (this.initializerHtmlLines.length === 1) {
|
|
1561
|
+
prototype += this.initializerHtmlLines[0]
|
|
1562
|
+
} else {
|
|
1563
|
+
prototype += '...'
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
if (this.briefDescriptionHtmlString !== undefined) {
|
|
1568
|
+
childrenLines.push(
|
|
1569
|
+
this.section.compound.renderBriefDescriptionToHtmlString({
|
|
1570
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1571
|
+
})
|
|
1572
|
+
)
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
if (
|
|
1576
|
+
this.initializerHtmlLines !== undefined &&
|
|
1577
|
+
this.initializerHtmlLines.length > 1
|
|
1578
|
+
) {
|
|
1579
|
+
childrenLines.push('')
|
|
1580
|
+
childrenLines.push('<dl class="doxySectionUser">')
|
|
1581
|
+
childrenLines.push('<dt>Value</dt>')
|
|
1582
|
+
childrenLines.push('<dd>')
|
|
1583
|
+
if (this.initializerHtmlLines.length === 1) {
|
|
1584
|
+
childrenLines.push(
|
|
1585
|
+
`<div class="doxyVerbatim">${this.initializerHtmlLines[0]}</div>`
|
|
1586
|
+
)
|
|
1587
|
+
} else {
|
|
1588
|
+
childrenLines.push(
|
|
1589
|
+
`<div class="doxyVerbatim">${this.initializerHtmlLines[0]}`
|
|
1590
|
+
)
|
|
1591
|
+
for (const initializerLine of this.initializerHtmlLines.slice(1)) {
|
|
1592
|
+
if (initializerLine.trim().length > 0) {
|
|
1593
|
+
childrenLines.push(initializerLine)
|
|
1594
|
+
// } else {
|
|
1595
|
+
// childrenLines.push(' ')
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
childrenLines.push('</div>')
|
|
1599
|
+
}
|
|
1600
|
+
childrenLines.push('</dd>')
|
|
1601
|
+
childrenLines.push('</dl>')
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
childrenLines.push(
|
|
1605
|
+
...this.section.compound.renderDetailedDescriptionToHtmlLines({
|
|
1606
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1607
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1608
|
+
showHeader: false,
|
|
1609
|
+
showBrief: false,
|
|
1610
|
+
})
|
|
1611
|
+
)
|
|
1612
|
+
|
|
1613
|
+
break
|
|
1614
|
+
|
|
1615
|
+
default:
|
|
1616
|
+
lines.push('')
|
|
1617
|
+
console.warn(
|
|
1618
|
+
'memberDef',
|
|
1619
|
+
this.kind,
|
|
1620
|
+
this.name,
|
|
1621
|
+
'not implemented yet in',
|
|
1622
|
+
this.constructor.name,
|
|
1623
|
+
'renderToLines'
|
|
1624
|
+
)
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
if (this.locationMarkdownLines !== undefined) {
|
|
1628
|
+
childrenLines.push(...this.locationMarkdownLines)
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
if (this.programListing !== undefined) {
|
|
1632
|
+
childrenLines.push(
|
|
1633
|
+
...this.section.compound.collection.workspace.renderElementToLines(
|
|
1634
|
+
this.programListing,
|
|
1635
|
+
'html'
|
|
1636
|
+
)
|
|
1637
|
+
)
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
if (this.referencesMarkdownString !== undefined) {
|
|
1641
|
+
childrenLines.push('')
|
|
1642
|
+
childrenLines.push(this.referencesMarkdownString)
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
if (this.referencedByMarkdownString !== undefined) {
|
|
1646
|
+
childrenLines.push('')
|
|
1647
|
+
childrenLines.push(this.referencedByMarkdownString)
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
lines.push('')
|
|
1651
|
+
|
|
1652
|
+
if (prototype !== undefined) {
|
|
1653
|
+
lines.push(
|
|
1654
|
+
...this.renderMemberDefinitionToLines({
|
|
1655
|
+
template,
|
|
1656
|
+
prototype,
|
|
1657
|
+
labels,
|
|
1658
|
+
childrenLines,
|
|
1659
|
+
})
|
|
1660
|
+
)
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
return lines
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Renders a member definition with prototype and documentation.
|
|
1668
|
+
*
|
|
1669
|
+
* @remarks
|
|
1670
|
+
* Generates the HTML structure for displaying member definitions including
|
|
1671
|
+
* template parameters, prototype signature, attribute labels, and detailed
|
|
1672
|
+
* documentation content. Uses Doxygen-compatible CSS classes for styling.
|
|
1673
|
+
*
|
|
1674
|
+
* @param options - Rendering options including template, prototype, labels,
|
|
1675
|
+
* and content
|
|
1676
|
+
* @returns Array of HTML lines representing the member definition
|
|
1677
|
+
*
|
|
1678
|
+
* @private
|
|
1679
|
+
*/
|
|
1680
|
+
private renderMemberDefinitionToLines({
|
|
1681
|
+
template,
|
|
1682
|
+
prototype,
|
|
1683
|
+
labels,
|
|
1684
|
+
childrenLines,
|
|
1685
|
+
}: {
|
|
1686
|
+
template?: string | undefined
|
|
1687
|
+
prototype: string
|
|
1688
|
+
labels: string[]
|
|
1689
|
+
childrenLines: string[]
|
|
1690
|
+
}): string[] {
|
|
1691
|
+
const lines: string[] = []
|
|
1692
|
+
|
|
1693
|
+
lines.push('<div class="doxyMemberItem">')
|
|
1694
|
+
lines.push('<div class="doxyMemberProto">')
|
|
1695
|
+
if (template !== undefined && template.length > 0) {
|
|
1696
|
+
lines.push(`<div class="doxyMemberTemplate">${template}</div>`)
|
|
1697
|
+
}
|
|
1698
|
+
lines.push('<table class="doxyMemberLabels">')
|
|
1699
|
+
lines.push('<tr class="doxyMemberLabels">')
|
|
1700
|
+
lines.push('<td class="doxyMemberLabelsLeft">')
|
|
1701
|
+
lines.push('<table class="doxyMemberName">')
|
|
1702
|
+
lines.push('<tr>')
|
|
1703
|
+
lines.push(`<td class="doxyMemberName">${prototype}</td>`)
|
|
1704
|
+
lines.push('</tr>')
|
|
1705
|
+
lines.push('</table>')
|
|
1706
|
+
lines.push('</td>')
|
|
1707
|
+
if (labels.length > 0) {
|
|
1708
|
+
lines.push('<td class="doxyMemberLabelsRight">')
|
|
1709
|
+
lines.push('<span class="doxyMemberLabels">')
|
|
1710
|
+
for (const label of labels) {
|
|
1711
|
+
lines.push(`<span class="doxyMemberLabel ${label}">${label}</span>`)
|
|
1712
|
+
}
|
|
1713
|
+
lines.push('</span>')
|
|
1714
|
+
lines.push('</td>')
|
|
1715
|
+
}
|
|
1716
|
+
lines.push('</tr>')
|
|
1717
|
+
lines.push('</table>')
|
|
1718
|
+
lines.push('</div>')
|
|
1719
|
+
lines.push('<div class="doxyMemberDoc">')
|
|
1720
|
+
lines.push('') // Required to make the first line a separate paragraph.
|
|
1721
|
+
lines.push(...childrenLines)
|
|
1722
|
+
lines.push('</div>')
|
|
1723
|
+
lines.push('</div>')
|
|
1724
|
+
|
|
1725
|
+
return lines
|
|
1726
|
+
}
|
|
1727
|
+
// --------------------------------------------------------------------------
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* Renders enumeration values to HTML table lines.
|
|
1731
|
+
*
|
|
1732
|
+
* @remarks
|
|
1733
|
+
* Generates a formatted HTML table displaying all enumeration values with
|
|
1734
|
+
* their names, descriptions, and initialiser values. Each enum value
|
|
1735
|
+
* includes an anchor for direct linking and proper formatting for
|
|
1736
|
+
* documentation display.
|
|
1737
|
+
*
|
|
1738
|
+
* @returns Array of HTML lines representing the enumeration values table
|
|
1739
|
+
*
|
|
1740
|
+
* @private
|
|
1741
|
+
*/
|
|
1742
|
+
renderEnumToLines(): string[] {
|
|
1743
|
+
const lines: string[] = []
|
|
1744
|
+
|
|
1745
|
+
lines.push('')
|
|
1746
|
+
lines.push('<dl class="doxyEnumList">')
|
|
1747
|
+
lines.push('<dt class="doxyEnumTableTitle">Enumeration values</dt>')
|
|
1748
|
+
lines.push('<dd>')
|
|
1749
|
+
lines.push('<table class="doxyEnumTable">')
|
|
1750
|
+
|
|
1751
|
+
if (this.enumValues !== undefined) {
|
|
1752
|
+
for (const enumValue of this.enumValues) {
|
|
1753
|
+
const anchor = getPermalinkAnchor(enumValue.id)
|
|
1754
|
+
let enumBriefDescriptionHtmlString: string = (
|
|
1755
|
+
enumValue.briefDescriptionHtmlString ?? ''
|
|
1756
|
+
).replace(/[.]$/, '')
|
|
1757
|
+
// console.log(`|${enumBriefDescription}|`)
|
|
1758
|
+
const { initializerHtmlString: value } = enumValue
|
|
1759
|
+
if (value !== undefined && value.length > 0) {
|
|
1760
|
+
enumBriefDescriptionHtmlString += ` (${value})`
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
lines.push('')
|
|
1764
|
+
// lines.push(`<a id="${anchor}"></a>`)
|
|
1765
|
+
lines.push('<tr class="doxyEnumItem">')
|
|
1766
|
+
lines.push(
|
|
1767
|
+
`<td class="doxyEnumItemName">${enumValue.name}` +
|
|
1768
|
+
`<a id="${anchor}"></a></td>`
|
|
1769
|
+
)
|
|
1770
|
+
// lines.push(`<td class="doxyEnumItemDescription">`+
|
|
1771
|
+
// `<p>${enumBriefDescription}</p></td>`)
|
|
1772
|
+
if (!enumBriefDescriptionHtmlString.includes('\n')) {
|
|
1773
|
+
lines.push(
|
|
1774
|
+
`<td class="doxyEnumItemDescription">` +
|
|
1775
|
+
`${enumBriefDescriptionHtmlString}</td>`
|
|
1776
|
+
)
|
|
1777
|
+
} else {
|
|
1778
|
+
lines.push('<td class="doxyEnumItemDescription">')
|
|
1779
|
+
lines.push(...enumBriefDescriptionHtmlString.split('\n'))
|
|
1780
|
+
lines.push('</td>')
|
|
1781
|
+
}
|
|
1782
|
+
lines.push('</tr>')
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
lines.push('')
|
|
1786
|
+
lines.push('</table>')
|
|
1787
|
+
lines.push('</dd>')
|
|
1788
|
+
lines.push('</dl>')
|
|
1789
|
+
|
|
1790
|
+
return lines
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
// ----------------------------------------------------------------------------
|
|
1795
|
+
|
|
1796
|
+
/**
|
|
1797
|
+
* Represents a reference to a member defined elsewhere.
|
|
1798
|
+
*
|
|
1799
|
+
* @remarks
|
|
1800
|
+
* Member references point to actual member definitions in other compounds,
|
|
1801
|
+
* allowing for cross-referencing and inclusion in multiple contexts without
|
|
1802
|
+
* duplicating the complete member definition data.
|
|
1803
|
+
*
|
|
1804
|
+
* @public
|
|
1805
|
+
*/
|
|
1806
|
+
export class MemberRef extends MemberBase {
|
|
1807
|
+
/**
|
|
1808
|
+
* Reference ID pointing to the actual member definition.
|
|
1809
|
+
*
|
|
1810
|
+
* @remarks
|
|
1811
|
+
* Unique identifier used to locate the referenced member definition
|
|
1812
|
+
* in the global members collection for rendering and cross-referencing.
|
|
1813
|
+
*/
|
|
1814
|
+
refid: string
|
|
1815
|
+
|
|
1816
|
+
/**
|
|
1817
|
+
* Initialises a new MemberRef instance from member reference data.
|
|
1818
|
+
*
|
|
1819
|
+
* @remarks
|
|
1820
|
+
* Creates a lightweight reference to a member defined elsewhere, storing
|
|
1821
|
+
* only the essential information needed for lookups and cross-references.
|
|
1822
|
+
*
|
|
1823
|
+
* @param section - The parent section containing this member reference
|
|
1824
|
+
* @param memberRef - The member reference data containing reference ID
|
|
1825
|
+
*
|
|
1826
|
+
* @public
|
|
1827
|
+
*/
|
|
1828
|
+
constructor(section: Section, memberRef: MemberDataModel) {
|
|
1829
|
+
super(section, memberRef.name)
|
|
1830
|
+
// this.memberRef = memberRef
|
|
1831
|
+
|
|
1832
|
+
const { refid } = memberRef
|
|
1833
|
+
this.refid = refid
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
// ----------------------------------------------------------------------------
|
|
1838
|
+
|
|
1839
|
+
/**
|
|
1840
|
+
* Represents an individual enumeration value with documentation.
|
|
1841
|
+
*
|
|
1842
|
+
* @remarks
|
|
1843
|
+
* Contains the name, description, and initialiser value for enumeration
|
|
1844
|
+
* entries, providing complete documentation support for enum constants
|
|
1845
|
+
* including cross-referencing and detailed descriptions.
|
|
1846
|
+
*
|
|
1847
|
+
* @public
|
|
1848
|
+
*/
|
|
1849
|
+
export class EnumValue {
|
|
1850
|
+
/**
|
|
1851
|
+
* The enumeration value name.
|
|
1852
|
+
*
|
|
1853
|
+
* @remarks
|
|
1854
|
+
* Identifier name of the enumeration constant as declared in the source code.
|
|
1855
|
+
*/
|
|
1856
|
+
name: string
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* Unique identifier for this enumeration value.
|
|
1860
|
+
*
|
|
1861
|
+
* @remarks
|
|
1862
|
+
* Doxygen-generated unique ID used for cross-references and anchor
|
|
1863
|
+
* generation in the documentation.
|
|
1864
|
+
*/
|
|
1865
|
+
id: string
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* Brief description in HTML format.
|
|
1869
|
+
*
|
|
1870
|
+
* @remarks
|
|
1871
|
+
* Optional description of the enumeration value, processed into HTML
|
|
1872
|
+
* for display in enumeration tables and documentation.
|
|
1873
|
+
*/
|
|
1874
|
+
briefDescriptionHtmlString: string | undefined
|
|
1875
|
+
|
|
1876
|
+
/**
|
|
1877
|
+
* Initialiser value in HTML format.
|
|
1878
|
+
*
|
|
1879
|
+
* @remarks
|
|
1880
|
+
* The assigned value for the enumeration constant, if explicitly specified,
|
|
1881
|
+
* formatted as HTML for documentation display.
|
|
1882
|
+
*/
|
|
1883
|
+
initializerHtmlString: string | undefined
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* Reference to the parent enumeration member.
|
|
1887
|
+
*
|
|
1888
|
+
* @remarks
|
|
1889
|
+
* Back-reference to the Member instance that contains this enumeration
|
|
1890
|
+
* value, providing access to parent context and workspace information.
|
|
1891
|
+
*/
|
|
1892
|
+
member: Member
|
|
1893
|
+
|
|
1894
|
+
/**
|
|
1895
|
+
* Initialises a new EnumValue instance from enumeration value data.
|
|
1896
|
+
*
|
|
1897
|
+
* @remarks
|
|
1898
|
+
* Processes the enumeration value metadata including name, description,
|
|
1899
|
+
* and initialiser value, converting them into appropriate HTML format
|
|
1900
|
+
* for documentation rendering.
|
|
1901
|
+
*
|
|
1902
|
+
* @param member - The parent enumeration member
|
|
1903
|
+
* @param enumValue - The enumeration value data from Doxygen
|
|
1904
|
+
*
|
|
1905
|
+
* @public
|
|
1906
|
+
*/
|
|
1907
|
+
constructor(member: Member, enumValue: EnumValueDataModel) {
|
|
1908
|
+
this.member = member
|
|
1909
|
+
|
|
1910
|
+
this.name = enumValue.name.trim()
|
|
1911
|
+
const { id } = enumValue
|
|
1912
|
+
this.id = id
|
|
1913
|
+
|
|
1914
|
+
const workspace = member.section.compound.collection.workspace
|
|
1915
|
+
|
|
1916
|
+
if (enumValue.briefDescription !== undefined) {
|
|
1917
|
+
assert(enumValue.briefDescription.children != null)
|
|
1918
|
+
for (const child of enumValue.briefDescription.children) {
|
|
1919
|
+
if (child instanceof ParaDataModel) {
|
|
1920
|
+
child.skipPara = true
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
if (enumValue.briefDescription?.children !== undefined) {
|
|
1926
|
+
workspace.skipElementsPara(enumValue.briefDescription.children)
|
|
1927
|
+
|
|
1928
|
+
this.briefDescriptionHtmlString = workspace
|
|
1929
|
+
.renderElementToString(enumValue.briefDescription, 'html')
|
|
1930
|
+
.trim()
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
if (enumValue.initializer !== undefined) {
|
|
1934
|
+
this.initializerHtmlString = workspace.renderElementToString(
|
|
1935
|
+
enumValue.initializer,
|
|
1936
|
+
'html'
|
|
1937
|
+
)
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
// console.log(this)
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
// ----------------------------------------------------------------------------
|