@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,150 @@
|
|
|
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 assert from 'node:assert'
|
|
15
|
+
import * as util from 'node:util'
|
|
16
|
+
|
|
17
|
+
import { DoxygenXmlParser } from '../doxygen-xml-parser.js'
|
|
18
|
+
import { ParamDataModel } from './paramtype-dm.js'
|
|
19
|
+
import { AbstractDataModelBase } from '../types.js'
|
|
20
|
+
|
|
21
|
+
// ----------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
// <xsd:complexType name="templateparamlistType">
|
|
24
|
+
// <xsd:sequence>
|
|
25
|
+
// <xsd:element name="param" type="paramType" minOccurs="0" maxOccurs="unbounded" />
|
|
26
|
+
// </xsd:sequence>
|
|
27
|
+
// </xsd:complexType>
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Abstract base class for template parameter list type data models.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Represents template parameter list elements within Doxygen XML structures,
|
|
34
|
+
* corresponding to the templateparamlistType complex type in the XML schema.
|
|
35
|
+
* This class handles the parsing of parameter collections for templated
|
|
36
|
+
* constructs such as template classes and functions. All concrete template
|
|
37
|
+
* parameter list data model classes should extend this abstract base to
|
|
38
|
+
* ensure consistent parsing and data representation.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
// eslint-disable-next-line max-len
|
|
43
|
+
export abstract class AbstractTemplateParamListType extends AbstractDataModelBase {
|
|
44
|
+
/**
|
|
45
|
+
* Collection of parameter data models within this template parameter list.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Optional array containing parameter elements found within the template
|
|
49
|
+
* parameter list structure. Each parameter represents a template parameter
|
|
50
|
+
* definition including its type, name, and other attributes. The array
|
|
51
|
+
* supports zero to many parameters as per the XML schema, accommodating
|
|
52
|
+
* both non-templated constructs and complex template declarations.
|
|
53
|
+
*/
|
|
54
|
+
params?: ParamDataModel[] | undefined
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a new AbstractTemplateParamListType instance from XML data.
|
|
58
|
+
*
|
|
59
|
+
* @param xml - The Doxygen XML parser instance for processing XML elements
|
|
60
|
+
* @param element - The XML element containing the template parameter list
|
|
61
|
+
* data
|
|
62
|
+
* @param elementName - The name of the XML element being processed
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* Parses the provided XML element to extract template parameter list
|
|
66
|
+
* information including parameter collections. The constructor processes
|
|
67
|
+
* parameter elements into ParamDataModel instances when present. This
|
|
68
|
+
* element type has no attributes as per the XML schema definition,
|
|
69
|
+
* containing only parameter child elements.
|
|
70
|
+
*/
|
|
71
|
+
constructor(xml: DoxygenXmlParser, element: object, elementName: string) {
|
|
72
|
+
super(elementName)
|
|
73
|
+
|
|
74
|
+
// console.log(elementName, util.inspect(element, { compact: false, depth: 999 }))
|
|
75
|
+
|
|
76
|
+
// ------------------------------------------------------------------------
|
|
77
|
+
// Process elements.
|
|
78
|
+
|
|
79
|
+
const innerElements = xml.getInnerElements(element, elementName)
|
|
80
|
+
assert(innerElements.length > 0)
|
|
81
|
+
|
|
82
|
+
// console.log(util.inspect(item))
|
|
83
|
+
for (const innerElement of innerElements) {
|
|
84
|
+
if (xml.hasInnerText(innerElement)) {
|
|
85
|
+
// Ignore texts
|
|
86
|
+
} else if (xml.hasInnerElement(innerElement, 'param')) {
|
|
87
|
+
this.params ??= []
|
|
88
|
+
this.params.push(new ParamDataModel(xml, innerElement))
|
|
89
|
+
} else {
|
|
90
|
+
console.error(util.inspect(innerElement))
|
|
91
|
+
console.error(
|
|
92
|
+
`${elementName} element:`,
|
|
93
|
+
Object.keys(innerElement),
|
|
94
|
+
'not implemented yet in',
|
|
95
|
+
this.constructor.name
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ------------------------------------------------------------------------
|
|
101
|
+
// Process attributes.
|
|
102
|
+
|
|
103
|
+
assert(!xml.hasAttributes(element))
|
|
104
|
+
|
|
105
|
+
// ------------------------------------------------------------------------
|
|
106
|
+
|
|
107
|
+
// console.log(util.inspect(this, { compact: false, depth: 999 }))
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ----------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
// <xsd:element name="templateparamlist" type="templateparamlistType" minOccurs="0" />
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Concrete data model class for template parameter list elements.
|
|
117
|
+
*
|
|
118
|
+
* @remarks
|
|
119
|
+
* Represents individual template parameter list elements found within
|
|
120
|
+
* Doxygen compound XML structures. This class extends the abstract base
|
|
121
|
+
* to provide specific handling for 'templateparamlist' elements, which
|
|
122
|
+
* define the template parameters for templated constructs such as template
|
|
123
|
+
* classes, template functions, and template variables. Each template
|
|
124
|
+
* parameter list contains parameter definitions that specify the generic
|
|
125
|
+
* types and values used in template instantiation.
|
|
126
|
+
*
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
export class TemplateParamListDataModel extends AbstractTemplateParamListType {
|
|
130
|
+
/**
|
|
131
|
+
* Constructs a new TemplateParamListDataModel instance from XML data.
|
|
132
|
+
*
|
|
133
|
+
* @param xml - The Doxygen XML parser instance for processing XML elements
|
|
134
|
+
* @param element - The XML element containing the template parameter list
|
|
135
|
+
* data
|
|
136
|
+
*
|
|
137
|
+
* @remarks
|
|
138
|
+
* Initialises the template parameter list data model by parsing the
|
|
139
|
+
* provided XML element as a 'templateparamlist' element type. The
|
|
140
|
+
* constructor delegates to the parent class for common parameter list
|
|
141
|
+
* processing whilst specifying the element name for proper XML structure
|
|
142
|
+
* handling.
|
|
143
|
+
*/
|
|
144
|
+
constructor(xml: DoxygenXmlParser, element: object) {
|
|
145
|
+
// console.log(elementName, util.inspect(element, { compact: false, depth: 999 }))
|
|
146
|
+
super(xml, element, 'templateparamlist')
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// ----------------------------------------------------------------------------
|
|
@@ -0,0 +1,377 @@
|
|
|
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 assert from 'node:assert'
|
|
15
|
+
import * as fs from 'node:fs/promises'
|
|
16
|
+
import * as path from 'node:path'
|
|
17
|
+
import * as util from 'node:util'
|
|
18
|
+
|
|
19
|
+
import { CliOptions } from '../../docusaurus/cli-options.js'
|
|
20
|
+
import { CompoundDefDataModel } from './compounds/compounddef-dm.js'
|
|
21
|
+
import { DoxygenFileDataModel } from './doxyfile/doxyfiletype-dm.js'
|
|
22
|
+
import { DoxygenIndexDataModel } from './index/indexdoxygentype-dm.js'
|
|
23
|
+
import { XmlElement } from './types.js'
|
|
24
|
+
import { IndexCompoundDataModel } from './index/indexcompoundtype-dm.js'
|
|
25
|
+
import { DoxygenDataModel } from './compounds/doxygentype-dm.js'
|
|
26
|
+
import { MemberDefDataModel } from './compounds/memberdeftype-dm.js'
|
|
27
|
+
import { DoxygenXmlParser } from './doxygen-xml-parser.js'
|
|
28
|
+
|
|
29
|
+
// ----------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Top-level data model class for orchestrating Doxygen XML parsing and data
|
|
33
|
+
* organisation.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* This class serves as the primary entry point for parsing Doxygen-generated
|
|
37
|
+
* XML files and constructing a comprehensive data model. It coordinates the
|
|
38
|
+
* parsing of index files, compound definitions, and configuration files,
|
|
39
|
+
* maintaining references to all parsed content for subsequent processing.
|
|
40
|
+
* The class provides methods for sequential parsing operations and ensures
|
|
41
|
+
* data integrity throughout the parsing workflow.
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export class DataModel {
|
|
46
|
+
/**
|
|
47
|
+
* The global configuration options for the parsing operation.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Contains command-line interface options that control the behaviour of
|
|
51
|
+
* the parser and influence how XML files are processed and data models
|
|
52
|
+
* are constructed.
|
|
53
|
+
*/
|
|
54
|
+
options: CliOptions
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The XML parser instance used for processing Doxygen XML files.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Provides low-level XML parsing functionality and utility methods for
|
|
61
|
+
* extracting elements, attributes, and text content from the parsed XML
|
|
62
|
+
* structure.
|
|
63
|
+
*/
|
|
64
|
+
xml: DoxygenXmlParser
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Counter tracking the number of XML files successfully parsed.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Incremented for each XML file processed during the parsing operation,
|
|
71
|
+
* providing metrics for progress monitoring and diagnostic reporting.
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue 0
|
|
74
|
+
*/
|
|
75
|
+
parsedFilesCounter = 0
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The parsed Doxygen index data model from the main index XML file.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* Contains the top-level index structure that references all compound
|
|
82
|
+
* definitions and provides the navigation structure for the documentation.
|
|
83
|
+
* Populated during the initial parsing phase from `index.xml`.
|
|
84
|
+
*/
|
|
85
|
+
doxygenindex?: DoxygenIndexDataModel // from index.xml
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Collection of compound definition data models parsed from individual XML
|
|
89
|
+
* files.
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* Each compound definition represents a documented entity such as a class,
|
|
93
|
+
* namespace, or file, along with its members and associated documentation.
|
|
94
|
+
* Populated by parsing XML files referenced in the index.
|
|
95
|
+
*/
|
|
96
|
+
compoundDefs: CompoundDefDataModel[] // from `${'@_refid'}.xml`
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The parsed Doxyfile configuration data model.
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* Contains the Doxygen configuration options and settings that influenced
|
|
103
|
+
* the generation of the XML documentation. Parsed from `Doxyfile.xml` if
|
|
104
|
+
* present in the input folder.
|
|
105
|
+
*/
|
|
106
|
+
doxyfile?: DoxygenFileDataModel // from Doxyfile.xml
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The project version string extracted from the documentation metadata.
|
|
110
|
+
*
|
|
111
|
+
* @remarks
|
|
112
|
+
* Optional version identifier for the documented project, typically derived
|
|
113
|
+
* from the Doxygen configuration or project metadata during parsing.
|
|
114
|
+
*/
|
|
115
|
+
projectVersion?: string
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Constructs a new DataModel instance with the specified configuration
|
|
119
|
+
* options.
|
|
120
|
+
*
|
|
121
|
+
* @param options - The command-line interface options for controlling parsing
|
|
122
|
+
* behaviour
|
|
123
|
+
*
|
|
124
|
+
* @remarks
|
|
125
|
+
* Initialises the data model with the provided configuration options and
|
|
126
|
+
* creates a new DoxygenXmlParser instance for XML processing. The compound
|
|
127
|
+
* definitions array is initialised as empty and will be populated during
|
|
128
|
+
* the parsing phase.
|
|
129
|
+
*/
|
|
130
|
+
constructor(options: CliOptions) {
|
|
131
|
+
this.options = options
|
|
132
|
+
|
|
133
|
+
this.xml = new DoxygenXmlParser(options)
|
|
134
|
+
|
|
135
|
+
this.compoundDefs = []
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Orchestrates the complete parsing of Doxygen XML files and data model
|
|
140
|
+
* construction.
|
|
141
|
+
*
|
|
142
|
+
* @remarks
|
|
143
|
+
* This method performs the complete parsing workflow in sequential phases:
|
|
144
|
+
* parsing the main index file, processing all referenced compound XML files,
|
|
145
|
+
* and parsing the Doxyfile configuration. It maintains the original XML
|
|
146
|
+
* element order and content fidelity throughout the process. Progress
|
|
147
|
+
* information is logged to the console, with detailed output in verbose mode.
|
|
148
|
+
*/
|
|
149
|
+
async parse(): Promise<void> {
|
|
150
|
+
// The parser is configured to preserve the original, non-trimmed content
|
|
151
|
+
// and the original elements order. The downsize
|
|
152
|
+
// Some details are from the schematic documentation:
|
|
153
|
+
// https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/README.md#documents
|
|
154
|
+
// The defaults are in the project source:
|
|
155
|
+
// https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/src/xmlparser/OptionsBuilder.js
|
|
156
|
+
|
|
157
|
+
// ------------------------------------------------------------------------
|
|
158
|
+
// Parse the top index.xml file.
|
|
159
|
+
|
|
160
|
+
if (!this.options.verbose) {
|
|
161
|
+
console.log('Parsing Doxygen generated .xml files...')
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
await this.parseDoxygenIndex()
|
|
165
|
+
|
|
166
|
+
assert(this.doxygenindex !== undefined)
|
|
167
|
+
|
|
168
|
+
// ------------------------------------------------------------------------
|
|
169
|
+
// Parse all compound *.xml files mentioned in the index.
|
|
170
|
+
|
|
171
|
+
if (Array.isArray(this.doxygenindex.compounds)) {
|
|
172
|
+
for (const indexCompound of this.doxygenindex.compounds) {
|
|
173
|
+
// Parallelise not possible, the order is relevant.
|
|
174
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
175
|
+
const parsedDoxygenElements: XmlElement[] = await this.parseFile({
|
|
176
|
+
fileName: `${indexCompound.refid}.xml`,
|
|
177
|
+
})
|
|
178
|
+
// console.log(util.inspect(parsedDoxygen))
|
|
179
|
+
// console.log(JSON.stringify(parsedDoxygen, null, ' '))
|
|
180
|
+
this.processCompoundDefs(indexCompound, parsedDoxygenElements)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
this.processMemberdefs()
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ------------------------------------------------------------------------
|
|
187
|
+
// Parse the Doxyfile.xml with the options.
|
|
188
|
+
|
|
189
|
+
await this.parseDoxyfile()
|
|
190
|
+
|
|
191
|
+
assert(this.doxyfile)
|
|
192
|
+
|
|
193
|
+
console.log(this.parsedFilesCounter, 'xml files parsed')
|
|
194
|
+
if (this.options.verbose) {
|
|
195
|
+
if (this.xml.images.length > 0) {
|
|
196
|
+
console.log(this.xml.images.length, 'images identified')
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Parses the main Doxygen index XML file and initialises the index data
|
|
203
|
+
* model.
|
|
204
|
+
*
|
|
205
|
+
* @remarks
|
|
206
|
+
* This method reads and parses the `index.xml` file, ignoring the XML
|
|
207
|
+
* prologue and top-level text nodes. It extracts the `doxygenindex`
|
|
208
|
+
* element and constructs the corresponding data model. Any unrecognised
|
|
209
|
+
* elements are logged for diagnostic purposes.
|
|
210
|
+
*/
|
|
211
|
+
async parseDoxygenIndex(): Promise<void> {
|
|
212
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
213
|
+
const parsedIndexElements: XmlElement[] = await this.parseFile({
|
|
214
|
+
fileName: 'index.xml',
|
|
215
|
+
})
|
|
216
|
+
// console.log(util.inspect(parsedIndex))
|
|
217
|
+
// console.log(util.inspect(parsedIndex[0]['?xml']))
|
|
218
|
+
// console.log(JSON.stringify(parsedIndex, null, ' '))
|
|
219
|
+
|
|
220
|
+
for (const element of parsedIndexElements) {
|
|
221
|
+
if (this.xml.hasInnerElement(element, '?xml')) {
|
|
222
|
+
// Ignore the top xml prologue.
|
|
223
|
+
} else if (this.xml.hasInnerText(element)) {
|
|
224
|
+
// Ignore top texts.
|
|
225
|
+
} else if (this.xml.hasInnerElement(element, 'doxygenindex')) {
|
|
226
|
+
this.doxygenindex = new DoxygenIndexDataModel(this.xml, element)
|
|
227
|
+
} else {
|
|
228
|
+
console.error(util.inspect(element, { compact: false, depth: 999 }))
|
|
229
|
+
console.error(
|
|
230
|
+
'index.xml element:',
|
|
231
|
+
Object.keys(element),
|
|
232
|
+
'not implemented yet in',
|
|
233
|
+
this.constructor.name
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Processes compound definitions from the parsed Doxygen XML elements.
|
|
241
|
+
*
|
|
242
|
+
* @param indexCompound - The compound index data model
|
|
243
|
+
* @param parsedDoxygenElements - The array of parsed XML elements for the
|
|
244
|
+
* compound
|
|
245
|
+
*
|
|
246
|
+
* @remarks
|
|
247
|
+
* This method iterates through the parsed XML elements, ignoring the XML
|
|
248
|
+
* prologue and top-level text nodes. For recognised `doxygen` elements, it
|
|
249
|
+
* constructs the compound definitions and appends them to the internal data
|
|
250
|
+
* model. Unrecognised elements are logged for further analysis.
|
|
251
|
+
*/
|
|
252
|
+
processCompoundDefs(
|
|
253
|
+
indexCompound: IndexCompoundDataModel,
|
|
254
|
+
parsedDoxygenElements: XmlElement[]
|
|
255
|
+
) {
|
|
256
|
+
for (const element of parsedDoxygenElements) {
|
|
257
|
+
if (this.xml.hasInnerElement(element, '?xml')) {
|
|
258
|
+
// Ignore the top xml prologue.
|
|
259
|
+
} else if (this.xml.hasInnerText(element)) {
|
|
260
|
+
// Ignore top texts.
|
|
261
|
+
} else if (this.xml.hasInnerElement(element, 'doxygen')) {
|
|
262
|
+
const doxygen = new DoxygenDataModel(this.xml, element)
|
|
263
|
+
if (Array.isArray(doxygen.compoundDefs)) {
|
|
264
|
+
this.compoundDefs.push(...doxygen.compoundDefs)
|
|
265
|
+
}
|
|
266
|
+
} else {
|
|
267
|
+
console.error(util.inspect(element, { compact: false, depth: 999 }))
|
|
268
|
+
console.error(
|
|
269
|
+
`${indexCompound.refid}.xml element:`,
|
|
270
|
+
Object.keys(element),
|
|
271
|
+
'not implemented yet in',
|
|
272
|
+
this.constructor.name
|
|
273
|
+
)
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Processes member definitions and updates member kinds where necessary.
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* This method traverses all compound definitions and their associated
|
|
283
|
+
* sections. It collects member definitions by their identifiers and, for
|
|
284
|
+
* each member with an empty kind, assigns the kind from the corresponding
|
|
285
|
+
* member definition. This ensures that all members are correctly classified
|
|
286
|
+
* within the internal data model.
|
|
287
|
+
*/
|
|
288
|
+
processMemberdefs() {
|
|
289
|
+
const memberDefsById = new Map<string, MemberDefDataModel>()
|
|
290
|
+
for (const compoundDef of this.compoundDefs) {
|
|
291
|
+
if (compoundDef.sectionDefs !== undefined) {
|
|
292
|
+
for (const sectionDef of compoundDef.sectionDefs) {
|
|
293
|
+
if (sectionDef.memberDefs !== undefined) {
|
|
294
|
+
for (const memberDef of sectionDef.memberDefs) {
|
|
295
|
+
memberDefsById.set(memberDef.id, memberDef)
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (sectionDef.members !== undefined) {
|
|
299
|
+
for (const member of sectionDef.members) {
|
|
300
|
+
if (member.kind.length === 0) {
|
|
301
|
+
const memberDef = memberDefsById.get(member.refid)
|
|
302
|
+
assert(memberDef !== undefined)
|
|
303
|
+
member.kind = memberDef.kind
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Parses the Doxyfile XML and initialises the configuration data model.
|
|
314
|
+
*
|
|
315
|
+
* @remarks
|
|
316
|
+
* This method reads and parses the `Doxyfile.xml` file, ignoring the XML
|
|
317
|
+
* prologue and top-level text nodes. It extracts the `doxyfile` element and
|
|
318
|
+
* constructs the corresponding configuration data model. Any unrecognised
|
|
319
|
+
* elements are logged for diagnostic purposes.
|
|
320
|
+
*/
|
|
321
|
+
async parseDoxyfile(): Promise<void> {
|
|
322
|
+
const parsedDoxyfileElements = (await this.parseFile({
|
|
323
|
+
fileName: 'Doxyfile.xml',
|
|
324
|
+
})) as XmlElement[]
|
|
325
|
+
// console.log(util.inspect(parsedDoxyfile))
|
|
326
|
+
// console.log(JSON.stringify(parsedDoxyfile, null, ' '))
|
|
327
|
+
|
|
328
|
+
for (const element of parsedDoxyfileElements) {
|
|
329
|
+
if (this.xml.hasInnerElement(element, '?xml')) {
|
|
330
|
+
// Ignore the top xml prologue.
|
|
331
|
+
} else if (this.xml.hasInnerElement(element, '#text')) {
|
|
332
|
+
// Ignore top texts.
|
|
333
|
+
} else if (this.xml.hasInnerElement(element, 'doxyfile')) {
|
|
334
|
+
this.doxyfile = new DoxygenFileDataModel(this.xml, element)
|
|
335
|
+
} else {
|
|
336
|
+
console.error(util.inspect(element, { compact: false, depth: 999 }))
|
|
337
|
+
console.error(
|
|
338
|
+
'Doxyfile.xml element:',
|
|
339
|
+
Object.keys(element),
|
|
340
|
+
'not implemented yet in',
|
|
341
|
+
this.constructor.name
|
|
342
|
+
)
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// --------------------------------------------------------------------------
|
|
348
|
+
// Support methods.
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Reads and parses the specified XML file, returning the parsed content.
|
|
352
|
+
*
|
|
353
|
+
* @param fileName - The name of the XML file to be parsed
|
|
354
|
+
* @returns A promise that resolves to the parsed XML content
|
|
355
|
+
*
|
|
356
|
+
* @remarks
|
|
357
|
+
* This method constructs the full file path using the configured input
|
|
358
|
+
* folder, reads the XML file as a UTF-8 string, and parses it using the
|
|
359
|
+
* configured XML parser. The method increments the internal counter for
|
|
360
|
+
* parsed files and, if verbose mode is enabled, logs the file being parsed.
|
|
361
|
+
*/
|
|
362
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
363
|
+
async parseFile({ fileName }: { fileName: string }): Promise<any> {
|
|
364
|
+
const folderPath = this.options.doxygenXmlInputFolderPath
|
|
365
|
+
const filePath: string = path.join(folderPath, fileName)
|
|
366
|
+
const xmlString: string = await fs.readFile(filePath, { encoding: 'utf8' })
|
|
367
|
+
|
|
368
|
+
if (this.options.verbose) {
|
|
369
|
+
console.log(`Parsing '${fileName}'...`)
|
|
370
|
+
}
|
|
371
|
+
this.parsedFilesCounter += 1
|
|
372
|
+
|
|
373
|
+
return this.xml.xmlParser.parse(xmlString)
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// ----------------------------------------------------------------------------
|