@xpack/doxygen2docusaurus 2.0.0 → 2.2.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 +3 -1
- package/bin/doxygen2docusaurus.js +5 -5
- package/dist/cli/main.d.ts +0 -14
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +0 -34
- package/dist/cli/main.js.map +1 -1
- package/dist/docusaurus/cli-options.d.ts +3 -292
- package/dist/docusaurus/cli-options.d.ts.map +1 -1
- package/dist/docusaurus/cli-options.js +6 -290
- package/dist/docusaurus/cli-options.js.map +1 -1
- package/dist/docusaurus/generator.d.ts +0 -172
- package/dist/docusaurus/generator.d.ts.map +1 -1
- package/dist/docusaurus/generator.js +20 -280
- package/dist/docusaurus/generator.js.map +1 -1
- package/dist/docusaurus/renderers/conceptparts.d.ts +9 -0
- package/dist/docusaurus/renderers/conceptparts.d.ts.map +1 -0
- package/dist/docusaurus/renderers/conceptparts.js +21 -0
- package/dist/docusaurus/renderers/conceptparts.js.map +1 -0
- package/dist/docusaurus/renderers/descriptiontype.d.ts +0 -417
- package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/descriptiontype.js +11 -555
- package/dist/docusaurus/renderers/descriptiontype.js.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.d.ts +0 -132
- package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.js +0 -156
- package/dist/docusaurus/renderers/docinternalstype.js.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.d.ts +0 -22
- package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.js +0 -42
- package/dist/docusaurus/renderers/doclisttype.js.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.d.ts +0 -88
- package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.js +1 -113
- package/dist/docusaurus/renderers/doctabletype.js.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.d.ts +0 -22
- package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.js +0 -42
- package/dist/docusaurus/renderers/doctitletype.js.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts +0 -44
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.js +1 -69
- package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts +0 -22
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.js +0 -38
- package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.d.ts +0 -74
- package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.js +0 -64
- package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -1
- package/dist/docusaurus/renderers/inctype.d.ts +0 -23
- package/dist/docusaurus/renderers/inctype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/inctype.js +0 -41
- package/dist/docusaurus/renderers/inctype.js.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.d.ts +0 -22
- package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.js +0 -45
- package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -1
- package/dist/docusaurus/renderers/listingtype.d.ts +0 -52
- package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/listingtype.js +1 -88
- package/dist/docusaurus/renderers/listingtype.js.map +1 -1
- package/dist/docusaurus/renderers/paramtype.d.ts +0 -22
- package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/paramtype.js +2 -51
- package/dist/docusaurus/renderers/paramtype.js.map +1 -1
- package/dist/docusaurus/renderers/referencetype.d.ts +0 -23
- package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/referencetype.js +0 -38
- package/dist/docusaurus/renderers/referencetype.js.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.d.ts +0 -22
- package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.js +0 -38
- package/dist/docusaurus/renderers/reftexttype.js.map +1 -1
- package/dist/docusaurus/renderers/reftype.d.ts +0 -22
- package/dist/docusaurus/renderers/reftype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftype.js +0 -38
- package/dist/docusaurus/renderers/reftype.js.map +1 -1
- package/dist/docusaurus/renderers/renderers.d.ts +0 -151
- package/dist/docusaurus/renderers/renderers.d.ts.map +1 -1
- package/dist/docusaurus/renderers/renderers.js +15 -186
- package/dist/docusaurus/renderers/renderers.js.map +1 -1
- package/dist/docusaurus/renderers/substringtype.d.ts +0 -22
- package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/substringtype.js +0 -39
- package/dist/docusaurus/renderers/substringtype.js.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts +0 -22
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.js +0 -39
- package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -1
- package/dist/docusaurus/types.d.ts +0 -110
- 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 +0 -214
- package/dist/docusaurus/utils.d.ts.map +1 -1
- package/dist/docusaurus/utils.js +0 -296
- package/dist/docusaurus/utils.js.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.d.ts +0 -137
- package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.js +9 -225
- package/dist/docusaurus/view-model/classes-vm.js.map +1 -1
- package/dist/docusaurus/view-model/collection-base.d.ts +0 -120
- package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -1
- package/dist/docusaurus/view-model/collection-base.js +11 -101
- package/dist/docusaurus/view-model/collection-base.js.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.d.ts +2 -147
- package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.js +47 -225
- package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -1
- package/dist/docusaurus/view-model/concepts-vm.d.ts +27 -0
- package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/concepts-vm.js +337 -0
- package/dist/docusaurus/view-model/concepts-vm.js.map +1 -0
- package/dist/docusaurus/view-model/description-anchors.d.ts +0 -58
- package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -1
- package/dist/docusaurus/view-model/description-anchors.js +0 -71
- package/dist/docusaurus/view-model/description-anchors.js.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +0 -247
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.js +61 -353
- package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.d.ts +0 -148
- package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.js +2 -223
- package/dist/docusaurus/view-model/groups-vm.js.map +1 -1
- package/dist/docusaurus/view-model/members-vm.d.ts +0 -552
- package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/members-vm.js +17 -702
- package/dist/docusaurus/view-model/members-vm.js.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.d.ts +5 -199
- package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.js +85 -284
- package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
- package/dist/docusaurus/view-model/options.d.ts +0 -43
- package/dist/docusaurus/view-model/options.d.ts.map +1 -1
- package/dist/docusaurus/view-model/options.js +0 -57
- package/dist/docusaurus/view-model/options.js.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.d.ts +0 -115
- package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.js +39 -162
- package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts +8 -142
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.js +54 -174
- package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -1
- package/dist/docusaurus/view-model/view-model.d.ts +0 -125
- package/dist/docusaurus/view-model/view-model.d.ts.map +1 -1
- package/dist/docusaurus/view-model/view-model.js +20 -182
- package/dist/docusaurus/view-model/view-model.js.map +1 -1
- package/dist/docusaurus/workspace.d.ts +1 -126
- package/dist/docusaurus/workspace.d.ts.map +1 -1
- package/dist/docusaurus/workspace.js +8 -221
- package/dist/docusaurus/workspace.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +7 -492
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.js +28 -672
- package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +0 -129
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +1 -145
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/concepts-dm.d.ts +23 -0
- package/dist/doxygen/data-model/compounds/concepts-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/concepts-dm.js +94 -0
- package/dist/doxygen/data-model/compounds/concepts-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +104 -2848
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +73 -3975
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts +0 -165
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +0 -229
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts +0 -70
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js +0 -105
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +0 -84
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +1 -122
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +0 -116
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.js +3 -155
- package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +3 -138
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +5 -180
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +0 -76
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +0 -107
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +0 -162
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.js +4 -203
- package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +2 -443
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +19 -475
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +0 -141
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js +0 -176
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +0 -101
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.js +0 -115
- package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +0 -164
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.js +0 -208
- package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +0 -139
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.js +2 -175
- package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts +0 -120
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js +2 -141
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +0 -268
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.js +4 -326
- package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +0 -105
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +1 -139
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/requirements-dm.d.ts +2 -0
- package/dist/doxygen/data-model/compounds/requirements-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/requirements-dm.js +2 -0
- package/dist/doxygen/data-model/compounds/requirements-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +0 -168
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +0 -209
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +0 -267
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +0 -354
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +0 -66
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +0 -97
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/data-model.d.ts +0 -149
- package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
- package/dist/doxygen/data-model/data-model.js +8 -200
- package/dist/doxygen/data-model/data-model.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +0 -115
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +4 -129
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +0 -87
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +0 -118
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +0 -253
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.js +0 -291
- package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +0 -98
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +2 -122
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +0 -82
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +0 -114
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +0 -85
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.js +1 -107
- package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/types.d.ts +0 -104
- package/dist/doxygen/data-model/types.d.ts.map +1 -1
- package/dist/doxygen/data-model/types.js +0 -52
- package/dist/doxygen/data-model/types.js.map +1 -1
- package/dist/index.d.ts +5 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -42
- package/dist/index.js.map +1 -1
- package/package.json +49 -52
- 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/conceptparts.ts +119 -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 +812 -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 +749 -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 +1037 -0
- package/src/docusaurus/view-model/options.ts +95 -0
- package/src/docusaurus/view-model/pages-vm.ts +389 -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 +1230 -0
- package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +266 -0
- package/src/doxygen/data-model/compounds/concepts-dm.ts +362 -0
- package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +10114 -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 +881 -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/requirements-dm.ts +50 -0
- package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +330 -0
- package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +564 -0
- package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +150 -0
- package/src/doxygen/data-model/data-model.ts +378 -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 +1788 -0
- package/src/doxygen/data-model/xsds/doxyfile.xsd +365 -0
- package/src/doxygen/data-model/xsds/index.xsd +74 -0
- package/src/doxygen/data-model/xsds/xml.xsd +23 -0
- package/src/index.ts +267 -0
- package/src/tsconfig.json +12 -0
- package/dist/doxygen2docusaurus.d.ts +0 -4774
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/tsdoc-metadata.json +0 -11
|
@@ -0,0 +1,1037 @@
|
|
|
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 for any
|
|
6
|
+
* 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 be
|
|
9
|
+
* obtained from https://opensource.org/licenses/mit.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// ----------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
// import * as util from 'node:util'
|
|
15
|
+
import assert from 'node:assert'
|
|
16
|
+
import path from 'node:path'
|
|
17
|
+
|
|
18
|
+
import { CompoundBase } from './compound-base-vm.js'
|
|
19
|
+
import type { CompoundDefDataModel } from '../../doxygen/data-model/compounds/compounddef-dm.js'
|
|
20
|
+
import { CollectionBase } from './collection-base.js'
|
|
21
|
+
import type {
|
|
22
|
+
NavbarItem,
|
|
23
|
+
SidebarCategory,
|
|
24
|
+
SidebarCategoryItem,
|
|
25
|
+
SidebarDocItem,
|
|
26
|
+
SidebarItem,
|
|
27
|
+
FrontMatter,
|
|
28
|
+
} from '../types.js'
|
|
29
|
+
import {
|
|
30
|
+
flattenPath,
|
|
31
|
+
sanitizeAnonymousNamespace,
|
|
32
|
+
sanitizeHierarchicalPath,
|
|
33
|
+
} from '../utils.js'
|
|
34
|
+
import type { TreeEntryBase } from './tree-entries-vm.js'
|
|
35
|
+
import { NamespaceTreeEntry } from './tree-entries-vm.js'
|
|
36
|
+
import { Class } from './classes-vm.js'
|
|
37
|
+
import { Concept } from './concepts-vm.js'
|
|
38
|
+
|
|
39
|
+
// ----------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Manages the collection of namespace documentation compounds.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Handles the organisation and generation of namespace-based documentation,
|
|
46
|
+
* including nested namespace hierarchies, sidebar generation, and comprehensive
|
|
47
|
+
* index file creation. Namespaces provide logical code organisation beyond
|
|
48
|
+
* file boundaries, supporting complex software architectures.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export class Namespaces extends CollectionBase {
|
|
53
|
+
/**
|
|
54
|
+
* Array of top-level namespaces without parent namespaces.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Contains namespaces that are not nested within other namespaces,
|
|
58
|
+
* used for organising hierarchical displays and namespace trees.
|
|
59
|
+
*/
|
|
60
|
+
topLevelNamespaces: Namespace[] = []
|
|
61
|
+
|
|
62
|
+
// --------------------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
// constructor (workspace: Workspace) {
|
|
65
|
+
// super(workspace)
|
|
66
|
+
|
|
67
|
+
// // this.compoundsById = new Map()
|
|
68
|
+
// }
|
|
69
|
+
|
|
70
|
+
// --------------------------------------------------------------------------
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Adds a namespace compound to the collection.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* Creates a new Namespace instance from the compound definition and registers
|
|
77
|
+
* it in the collection for later processing. Anonymous namespaces with empty
|
|
78
|
+
* names are skipped unless they contain child namespaces.
|
|
79
|
+
*
|
|
80
|
+
* @param compoundDef - The compound definition for the namespace
|
|
81
|
+
* @returns The created Namespace instance
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
override addChild(compoundDef: CompoundDefDataModel): CompoundBase {
|
|
86
|
+
const namespace = new Namespace(this, compoundDef)
|
|
87
|
+
// Skip
|
|
88
|
+
if (namespace.compoundName.length === 0) {
|
|
89
|
+
if (namespace.children.length > 0) {
|
|
90
|
+
console.error('Anonymous namespace', namespace.id, ' with children?')
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
this.collectionCompoundsById.set(namespace.id, namespace)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return namespace
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// --------------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Creates hierarchical relationships between namespace compounds.
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* Establishes parent-child relationships based on namespace nesting data,
|
|
106
|
+
* building the namespace hierarchy tree and identifying top-level namespaces
|
|
107
|
+
* that have no parent. This enables proper nested namespace navigation
|
|
108
|
+
* and documentation organisation.
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
override createCompoundsHierarchies(): void {
|
|
113
|
+
// Recreate namespaces hierarchies.
|
|
114
|
+
for (const [, namespace] of this.collectionCompoundsById) {
|
|
115
|
+
for (const childNamespaceId of namespace.childrenIds) {
|
|
116
|
+
const childNamespace =
|
|
117
|
+
this.collectionCompoundsById.get(childNamespaceId)
|
|
118
|
+
assert(childNamespace !== undefined)
|
|
119
|
+
if (this.workspace.options.debug) {
|
|
120
|
+
console.log(
|
|
121
|
+
'namespaceId:',
|
|
122
|
+
childNamespaceId,
|
|
123
|
+
childNamespace.compoundName,
|
|
124
|
+
'has parent',
|
|
125
|
+
namespace.compoundName
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
childNamespace.parent = namespace
|
|
129
|
+
namespace.children.push(childNamespace)
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Create the top level namespace list.
|
|
134
|
+
for (const [namespaceId, namespace] of this.collectionCompoundsById) {
|
|
135
|
+
if (namespace.parent === undefined) {
|
|
136
|
+
if (namespace instanceof Namespace) {
|
|
137
|
+
if (this.workspace.options.debug) {
|
|
138
|
+
console.log(
|
|
139
|
+
'topLevelNamespaceId:',
|
|
140
|
+
namespaceId,
|
|
141
|
+
namespace.compoundName
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
this.topLevelNamespaces.push(namespace)
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Finds a namespace compound by its fully qualified compound name.
|
|
152
|
+
*
|
|
153
|
+
* @remarks
|
|
154
|
+
* Iterates over the collection and returns the first namespace whose
|
|
155
|
+
* `compoundName` matches the supplied string exactly. Used to resolve
|
|
156
|
+
* parent namespace references when building cross-collection hierarchies.
|
|
157
|
+
*
|
|
158
|
+
* @param compoundName - The fully qualified name to search for
|
|
159
|
+
* @returns The matching {@link Namespace}, or `undefined` if not found
|
|
160
|
+
*
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
findNamespaceByCompoundName(compoundName: string): Namespace | undefined {
|
|
164
|
+
for (const namespace of this.collectionCompoundsById.values()) {
|
|
165
|
+
assert(namespace instanceof Namespace)
|
|
166
|
+
if (namespace.compoundName === compoundName) {
|
|
167
|
+
return namespace
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return undefined
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// --------------------------------------------------------------------------
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Adds namespace sidebar items to the provided sidebar category.
|
|
177
|
+
*
|
|
178
|
+
* @remarks
|
|
179
|
+
* Creates comprehensive namespace navigation including hierarchical namespace
|
|
180
|
+
* trees and specialised indices for classes, functions, variables, typedefs,
|
|
181
|
+
* enums, and enum values. The structure provides multiple access paths to
|
|
182
|
+
* namespace content for improved user navigation.
|
|
183
|
+
*
|
|
184
|
+
* @param sidebarCategory - The sidebar category to populate with namespace
|
|
185
|
+
* items
|
|
186
|
+
*
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
override addSidebarItems(sidebarCategory: SidebarCategory): void {
|
|
190
|
+
const indicesSet = this.workspace.indicesMaps.get('namespaces')
|
|
191
|
+
if (indicesSet === undefined) {
|
|
192
|
+
return
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Add namespaces to the sidebar.
|
|
196
|
+
// Top level namespaces are added below a Namespaces category.
|
|
197
|
+
const namespacesCategory: SidebarCategoryItem = {
|
|
198
|
+
type: 'category',
|
|
199
|
+
label: 'Namespaces',
|
|
200
|
+
link: {
|
|
201
|
+
type: 'doc',
|
|
202
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/index`,
|
|
203
|
+
},
|
|
204
|
+
collapsed: true,
|
|
205
|
+
items: [
|
|
206
|
+
{
|
|
207
|
+
type: 'category',
|
|
208
|
+
label: 'Hierarchy',
|
|
209
|
+
link: {
|
|
210
|
+
type: 'doc',
|
|
211
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/index`,
|
|
212
|
+
},
|
|
213
|
+
collapsed: true,
|
|
214
|
+
items: [],
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
for (const namespace of this.topLevelNamespaces) {
|
|
220
|
+
const item = this.createNamespaceItemRecursively(namespace)
|
|
221
|
+
if (item !== undefined) {
|
|
222
|
+
;(namespacesCategory.items[0] as SidebarCategoryItem).items.push(item)
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (indicesSet.has('all')) {
|
|
227
|
+
namespacesCategory.items.push({
|
|
228
|
+
type: 'doc',
|
|
229
|
+
label: 'All',
|
|
230
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/all`,
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (indicesSet.has('concepts')) {
|
|
235
|
+
namespacesCategory.items.push({
|
|
236
|
+
type: 'doc',
|
|
237
|
+
label: 'Concepts',
|
|
238
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/concepts`,
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (indicesSet.has('classes')) {
|
|
243
|
+
namespacesCategory.items.push({
|
|
244
|
+
type: 'doc',
|
|
245
|
+
label: 'Classes',
|
|
246
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/classes`,
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (indicesSet.has('functions')) {
|
|
251
|
+
namespacesCategory.items.push({
|
|
252
|
+
type: 'doc',
|
|
253
|
+
label: 'Functions',
|
|
254
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/functions`,
|
|
255
|
+
})
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (indicesSet.has('variables')) {
|
|
259
|
+
namespacesCategory.items.push({
|
|
260
|
+
type: 'doc',
|
|
261
|
+
label: 'Variables',
|
|
262
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/variables`,
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (indicesSet.has('typedefs')) {
|
|
267
|
+
namespacesCategory.items.push({
|
|
268
|
+
type: 'doc',
|
|
269
|
+
label: 'Typedefs',
|
|
270
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/typedefs`,
|
|
271
|
+
})
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (indicesSet.has('enums')) {
|
|
275
|
+
namespacesCategory.items.push({
|
|
276
|
+
type: 'doc',
|
|
277
|
+
label: 'Enums',
|
|
278
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/enums`,
|
|
279
|
+
})
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if (indicesSet.has('enumvalues')) {
|
|
283
|
+
namespacesCategory.items.push({
|
|
284
|
+
type: 'doc',
|
|
285
|
+
label: 'Enum Values',
|
|
286
|
+
id: `${this.workspace.sidebarBaseId}indices/namespaces/enumvalues`,
|
|
287
|
+
})
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
sidebarCategory.items.push(namespacesCategory)
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Creates sidebar items recursively for namespace hierarchies.
|
|
295
|
+
*
|
|
296
|
+
* @remarks
|
|
297
|
+
* Generates appropriate sidebar structure based on namespace nesting,
|
|
298
|
+
* creating document items for leaf namespaces and category items for
|
|
299
|
+
* namespaces with children. This method builds the hierarchical navigation
|
|
300
|
+
* structure with proper ellipsis styling for nested content.
|
|
301
|
+
*
|
|
302
|
+
* @param namespace - The namespace to create a sidebar item for
|
|
303
|
+
* @returns The created sidebar item, or undefined if the namespace is not
|
|
304
|
+
* displayable
|
|
305
|
+
*
|
|
306
|
+
* @private
|
|
307
|
+
*/
|
|
308
|
+
private createNamespaceItemRecursively(
|
|
309
|
+
namespace: Namespace
|
|
310
|
+
): SidebarItem | undefined {
|
|
311
|
+
if (
|
|
312
|
+
namespace.sidebarLabel === undefined ||
|
|
313
|
+
namespace.sidebarId === undefined
|
|
314
|
+
) {
|
|
315
|
+
return undefined
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (namespace.children.length === 0) {
|
|
319
|
+
const docItem: SidebarDocItem = {
|
|
320
|
+
type: 'doc',
|
|
321
|
+
label: namespace.sidebarLabel,
|
|
322
|
+
id: `${this.workspace.sidebarBaseId}${namespace.sidebarId}`,
|
|
323
|
+
}
|
|
324
|
+
return docItem
|
|
325
|
+
} else {
|
|
326
|
+
const categoryItem: SidebarCategoryItem = {
|
|
327
|
+
type: 'category',
|
|
328
|
+
label: namespace.sidebarLabel,
|
|
329
|
+
link: {
|
|
330
|
+
type: 'doc',
|
|
331
|
+
id: `${this.workspace.sidebarBaseId}${namespace.sidebarId}`,
|
|
332
|
+
},
|
|
333
|
+
className: 'doxyEllipsis',
|
|
334
|
+
collapsed: true,
|
|
335
|
+
items: [],
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
for (const childNamespace of namespace.children) {
|
|
339
|
+
if (childNamespace instanceof Namespace) {
|
|
340
|
+
const item = this.createNamespaceItemRecursively(childNamespace)
|
|
341
|
+
if (item !== undefined) {
|
|
342
|
+
categoryItem.items.push(item)
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return categoryItem
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// --------------------------------------------------------------------------
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Creates navbar items for namespace navigation.
|
|
355
|
+
*
|
|
356
|
+
* @remarks
|
|
357
|
+
* Generates a navigation bar item that provides access to the main
|
|
358
|
+
* namespaces index page, enabling users to explore namespace hierarchies
|
|
359
|
+
* and specialised namespace indices from the top-level navigation.
|
|
360
|
+
*
|
|
361
|
+
* @returns Array containing the namespaces navbar item
|
|
362
|
+
*
|
|
363
|
+
* @public
|
|
364
|
+
*/
|
|
365
|
+
override createNavbarItems(): NavbarItem[] {
|
|
366
|
+
const navbarItem: NavbarItem = {
|
|
367
|
+
label: 'Namespaces',
|
|
368
|
+
to: `${this.workspace.menuBaseUrl}namespaces/`,
|
|
369
|
+
}
|
|
370
|
+
return [navbarItem]
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// --------------------------------------------------------------------------
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Generates the main namespaces index Markdown file.
|
|
377
|
+
*
|
|
378
|
+
* @remarks
|
|
379
|
+
* Creates a comprehensive index file for namespaces when top-level namespaces
|
|
380
|
+
* exist. The index includes a hierarchical tree table showing all namespaces
|
|
381
|
+
* with their descriptions and navigation links, providing a complete overview
|
|
382
|
+
* of the project's namespace organisation.
|
|
383
|
+
*
|
|
384
|
+
* @public
|
|
385
|
+
*/
|
|
386
|
+
override async generateIndexDotMdFile(): Promise<void> {
|
|
387
|
+
if (this.topLevelNamespaces.length === 0) {
|
|
388
|
+
return
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const filePath =
|
|
392
|
+
this.workspace.outputFolderPath + 'indices/namespaces/index.md'
|
|
393
|
+
const permalink = 'namespaces'
|
|
394
|
+
|
|
395
|
+
const frontMatter: FrontMatter = {
|
|
396
|
+
title: 'Namespaces',
|
|
397
|
+
slug: `${this.workspace.slugBaseUrl}${permalink}`,
|
|
398
|
+
description: 'The namespaces used by this project',
|
|
399
|
+
custom_edit_url: null,
|
|
400
|
+
keywords: ['doxygen', 'namespaces', 'reference'],
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const contentLines: string[] = []
|
|
404
|
+
|
|
405
|
+
for (const namespace of this.topLevelNamespaces) {
|
|
406
|
+
contentLines.push(...this.generateIndexMdFileRecursively(namespace, 1))
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (contentLines.length === 0) {
|
|
410
|
+
return
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const lines: string[] = []
|
|
414
|
+
|
|
415
|
+
lines.push('The namespaces used by this project are:')
|
|
416
|
+
|
|
417
|
+
lines.push(...this.workspace.renderTreeTableToHtmlLines({ contentLines }))
|
|
418
|
+
|
|
419
|
+
if (this.workspace.options.verbose) {
|
|
420
|
+
console.log(`Writing namespaces index file '${filePath}'...`)
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
await this.workspace.writeOutputMdFile({
|
|
424
|
+
filePath,
|
|
425
|
+
frontMatter,
|
|
426
|
+
bodyLines: lines,
|
|
427
|
+
})
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Recursively generates index content for namespace hierarchies.
|
|
432
|
+
*
|
|
433
|
+
* @remarks
|
|
434
|
+
* Creates hierarchical HTML tree table rows for namespaces and their
|
|
435
|
+
* children, including appropriate indentation, icons, and navigation links.
|
|
436
|
+
* This method builds the complete nested structure for namespace
|
|
437
|
+
* documentation indices with proper depth handling.
|
|
438
|
+
*
|
|
439
|
+
* @param namespace - The namespace to generate index content for
|
|
440
|
+
* @param depth - The current nesting depth for indentation
|
|
441
|
+
* @returns Array of HTML lines representing the namespace hierarchy
|
|
442
|
+
*
|
|
443
|
+
* @private
|
|
444
|
+
*/
|
|
445
|
+
private generateIndexMdFileRecursively(
|
|
446
|
+
namespace: Namespace,
|
|
447
|
+
depth: number
|
|
448
|
+
): string[] {
|
|
449
|
+
// console.log(util.inspect(namespace, { compact: false, depth: 999 }))
|
|
450
|
+
|
|
451
|
+
const lines: string[] = []
|
|
452
|
+
|
|
453
|
+
const label = this.workspace.renderString(namespace.treeEntryName, 'html')
|
|
454
|
+
|
|
455
|
+
const permalink = this.workspace.getPagePermalink(namespace.id)
|
|
456
|
+
if (permalink === undefined || permalink.length === 0) {
|
|
457
|
+
// console.log(namespace)
|
|
458
|
+
return []
|
|
459
|
+
}
|
|
460
|
+
// assert(permalink !== undefined && permalink.length > 1)
|
|
461
|
+
|
|
462
|
+
let description = ''
|
|
463
|
+
if (
|
|
464
|
+
namespace.briefDescriptionHtmlString !== undefined &&
|
|
465
|
+
namespace.briefDescriptionHtmlString.length > 0
|
|
466
|
+
) {
|
|
467
|
+
description = namespace.briefDescriptionHtmlString.replace(/[.]$/, '')
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
lines.push('')
|
|
471
|
+
lines.push(
|
|
472
|
+
...this.workspace.renderTreeTableRowToHtmlLines({
|
|
473
|
+
itemIconLetter: 'N',
|
|
474
|
+
itemLabel: label,
|
|
475
|
+
itemLink: permalink,
|
|
476
|
+
depth,
|
|
477
|
+
description,
|
|
478
|
+
})
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
if (namespace.children.length > 0) {
|
|
482
|
+
for (const childNamespace of namespace.children) {
|
|
483
|
+
if (childNamespace instanceof Namespace) {
|
|
484
|
+
lines.push(
|
|
485
|
+
...this.generateIndexMdFileRecursively(childNamespace, depth + 1)
|
|
486
|
+
)
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
return lines
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// --------------------------------------------------------------------------
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Generates specialised namespace index files by content type.
|
|
498
|
+
*
|
|
499
|
+
* @remarks
|
|
500
|
+
* Creates comprehensive index files for different types of namespace content
|
|
501
|
+
* including all definitions, classes, functions, variables, typedefs, enums,
|
|
502
|
+
* and enum values. Each index provides filtered views of namespace content
|
|
503
|
+
* for targeted exploration and documentation access.
|
|
504
|
+
*
|
|
505
|
+
* @public
|
|
506
|
+
*/
|
|
507
|
+
override async generatePerInitialsIndexMdFiles(): Promise<void> {
|
|
508
|
+
if (this.topLevelNamespaces.length === 0) {
|
|
509
|
+
return
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
const allUnorderedEntriesMap = new Map<string, TreeEntryBase>()
|
|
513
|
+
|
|
514
|
+
for (const [, compound] of this.collectionCompoundsById) {
|
|
515
|
+
if (!(compound instanceof Namespace)) {
|
|
516
|
+
continue
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
const compoundEntry = new NamespaceTreeEntry(compound, compound)
|
|
520
|
+
allUnorderedEntriesMap.set(compoundEntry.id, compoundEntry)
|
|
521
|
+
|
|
522
|
+
// console.log(compound.indexName)
|
|
523
|
+
if (compound.innerCompounds !== undefined) {
|
|
524
|
+
if (this.workspace.options.debug) {
|
|
525
|
+
console.log(
|
|
526
|
+
compound.indexName,
|
|
527
|
+
Array.from(compound.innerCompounds.keys())
|
|
528
|
+
)
|
|
529
|
+
}
|
|
530
|
+
const conceptCompoundDef = compound.innerCompounds.get('innerConcepts')
|
|
531
|
+
if (conceptCompoundDef?.innerConcepts !== undefined) {
|
|
532
|
+
for (const innerConcept of conceptCompoundDef.innerConcepts) {
|
|
533
|
+
// console.log(innerConcept.refid)
|
|
534
|
+
const compoundConcept = this.workspace.viewModel.compoundsById.get(
|
|
535
|
+
innerConcept.refid
|
|
536
|
+
)
|
|
537
|
+
if (compoundConcept instanceof Concept) {
|
|
538
|
+
const conceptEntry = new NamespaceTreeEntry(
|
|
539
|
+
compoundConcept,
|
|
540
|
+
compound
|
|
541
|
+
)
|
|
542
|
+
allUnorderedEntriesMap.set(conceptEntry.id, conceptEntry)
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
const classCompoundDef = compound.innerCompounds.get('innerClasses')
|
|
547
|
+
if (classCompoundDef?.innerClasses !== undefined) {
|
|
548
|
+
for (const innerClass of classCompoundDef.innerClasses) {
|
|
549
|
+
// console.log(innerClass.refid)
|
|
550
|
+
const compoundClass = this.workspace.viewModel.compoundsById.get(
|
|
551
|
+
innerClass.refid
|
|
552
|
+
)
|
|
553
|
+
if (compoundClass instanceof Class) {
|
|
554
|
+
const classEntry = new NamespaceTreeEntry(compoundClass, compound)
|
|
555
|
+
allUnorderedEntriesMap.set(classEntry.id, classEntry)
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
for (const section of compound.sections) {
|
|
562
|
+
for (const member of section.definitionMembers) {
|
|
563
|
+
const memberEntry = new NamespaceTreeEntry(member, compound)
|
|
564
|
+
allUnorderedEntriesMap.set(memberEntry.id, memberEntry)
|
|
565
|
+
if (member.enumValues !== undefined) {
|
|
566
|
+
for (const enumValue of member.enumValues) {
|
|
567
|
+
const enumValueEntry = new NamespaceTreeEntry(enumValue, compound)
|
|
568
|
+
allUnorderedEntriesMap.set(enumValueEntry.id, enumValueEntry)
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// ------------------------------------------------------------------------
|
|
576
|
+
|
|
577
|
+
await this.generateIndexFile({
|
|
578
|
+
group: 'namespaces',
|
|
579
|
+
fileKind: 'all',
|
|
580
|
+
title: 'Namespaces Definitions Index',
|
|
581
|
+
description: 'The definitions part of the namespaces are:',
|
|
582
|
+
map: allUnorderedEntriesMap,
|
|
583
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
584
|
+
filter: (kind) => true,
|
|
585
|
+
})
|
|
586
|
+
|
|
587
|
+
await this.generateIndexFile({
|
|
588
|
+
group: 'namespaces',
|
|
589
|
+
fileKind: 'concepts',
|
|
590
|
+
title: 'Namespaces Concepts Index',
|
|
591
|
+
description: 'The concepts defined in the namespaces are:',
|
|
592
|
+
map: allUnorderedEntriesMap,
|
|
593
|
+
filter: (kind) => kind === 'concept',
|
|
594
|
+
})
|
|
595
|
+
|
|
596
|
+
await this.generateIndexFile({
|
|
597
|
+
group: 'namespaces',
|
|
598
|
+
fileKind: 'classes',
|
|
599
|
+
title: 'Namespaces Classes Index',
|
|
600
|
+
description:
|
|
601
|
+
'The classes, structs, unions defined in the namespaces are:',
|
|
602
|
+
map: allUnorderedEntriesMap,
|
|
603
|
+
filter: (kind) =>
|
|
604
|
+
kind === 'class' || kind === 'struct' || kind === 'union',
|
|
605
|
+
})
|
|
606
|
+
|
|
607
|
+
await this.generateIndexFile({
|
|
608
|
+
group: 'namespaces',
|
|
609
|
+
fileKind: 'functions',
|
|
610
|
+
title: 'Namespaces Functions Index',
|
|
611
|
+
description: 'The functions defined in the namespaces are:',
|
|
612
|
+
map: allUnorderedEntriesMap,
|
|
613
|
+
filter: (kind) => kind === 'function',
|
|
614
|
+
})
|
|
615
|
+
|
|
616
|
+
await this.generateIndexFile({
|
|
617
|
+
group: 'namespaces',
|
|
618
|
+
fileKind: 'variables',
|
|
619
|
+
title: 'Namespaces Variables Index',
|
|
620
|
+
description: 'The variables defined in the namespaces are:',
|
|
621
|
+
map: allUnorderedEntriesMap,
|
|
622
|
+
filter: (kind) => kind === 'variable',
|
|
623
|
+
})
|
|
624
|
+
|
|
625
|
+
await this.generateIndexFile({
|
|
626
|
+
group: 'namespaces',
|
|
627
|
+
fileKind: 'typedefs',
|
|
628
|
+
title: 'Namespaces Type Definitions Index',
|
|
629
|
+
description: 'The typedefs defined in the namespaces are:',
|
|
630
|
+
map: allUnorderedEntriesMap,
|
|
631
|
+
filter: (kind) => kind === 'typedef',
|
|
632
|
+
})
|
|
633
|
+
|
|
634
|
+
await this.generateIndexFile({
|
|
635
|
+
group: 'namespaces',
|
|
636
|
+
fileKind: 'enums',
|
|
637
|
+
title: 'Namespaces Enums Index',
|
|
638
|
+
description: 'The enums defined in the namespaces are:',
|
|
639
|
+
map: allUnorderedEntriesMap,
|
|
640
|
+
filter: (kind) => kind === 'enum',
|
|
641
|
+
})
|
|
642
|
+
|
|
643
|
+
await this.generateIndexFile({
|
|
644
|
+
group: 'namespaces',
|
|
645
|
+
fileKind: 'enumvalues',
|
|
646
|
+
title: 'Namespaces Enum Values Index',
|
|
647
|
+
description: 'The enum values defined in the namespaces are:',
|
|
648
|
+
map: allUnorderedEntriesMap,
|
|
649
|
+
filter: (kind) => kind === 'enumvalue',
|
|
650
|
+
})
|
|
651
|
+
|
|
652
|
+
// ------------------------------------------------------------------------
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// ============================================================================
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Represents a namespace compound for code organisation documentation.
|
|
660
|
+
*
|
|
661
|
+
* @remarks
|
|
662
|
+
* Namespaces provide logical code organisation beyond file boundaries,
|
|
663
|
+
* supporting complex software architectures with hierarchical structure.
|
|
664
|
+
* Handles both named and anonymous namespaces with appropriate documentation
|
|
665
|
+
* generation, including special handling for compiler-generated anonymous
|
|
666
|
+
* namespaces.
|
|
667
|
+
*
|
|
668
|
+
* @public
|
|
669
|
+
*/
|
|
670
|
+
export class Namespace extends CompoundBase {
|
|
671
|
+
/**
|
|
672
|
+
* The unqualified namespace name without scope.
|
|
673
|
+
*
|
|
674
|
+
* @remarks
|
|
675
|
+
* Contains the simple name of the namespace without parent scope
|
|
676
|
+
* qualifiers, used for display and navigation purposes.
|
|
677
|
+
*/
|
|
678
|
+
unqualifiedName = '???'
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Indicates if this is an anonymous namespace.
|
|
682
|
+
*
|
|
683
|
+
* @remarks
|
|
684
|
+
* True for anonymous namespaces that don't have explicit names,
|
|
685
|
+
* affecting how the namespace is displayed and documented.
|
|
686
|
+
*/
|
|
687
|
+
isAnonymous = false
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Array of concept compounds defined within this namespace.
|
|
691
|
+
*
|
|
692
|
+
* @remarks
|
|
693
|
+
* Contains all C++20 concept compounds whose fully qualified names are
|
|
694
|
+
* scoped to this namespace, populated during cross-collection hierarchy
|
|
695
|
+
* construction.
|
|
696
|
+
*/
|
|
697
|
+
concepts: Concept[] = []
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Initialises a new Namespace instance from compound definition data.
|
|
701
|
+
*
|
|
702
|
+
* @remarks
|
|
703
|
+
* Processes namespace metadata including nested namespace relationships,
|
|
704
|
+
* name extraction, and permalink generation. Handles special cases for
|
|
705
|
+
* anonymous namespaces and compiler-generated namespace structures.
|
|
706
|
+
* Sets up the namespace for integration into the documentation hierarchy.
|
|
707
|
+
*
|
|
708
|
+
* @param collection - The parent Namespaces collection
|
|
709
|
+
* @param compoundDef - The compound definition containing namespace metadata
|
|
710
|
+
*
|
|
711
|
+
* @public
|
|
712
|
+
*/
|
|
713
|
+
constructor(collection: Namespaces, compoundDef: CompoundDefDataModel) {
|
|
714
|
+
super(collection, compoundDef)
|
|
715
|
+
|
|
716
|
+
// console.log('Namespace.constructor', util.inspect(compoundDef))
|
|
717
|
+
|
|
718
|
+
if (Array.isArray(compoundDef.innerNamespaces)) {
|
|
719
|
+
for (const ref of compoundDef.innerNamespaces) {
|
|
720
|
+
// console.log('component', compoundDef.id, 'has child', ref.refid)
|
|
721
|
+
this.childrenIds.push(ref.refid)
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
// Tricky case: namespace { namespace CU { ... }}
|
|
726
|
+
// id: "namespace_0d341223050020306256025223146376054302122106363020_1_1CU"
|
|
727
|
+
// compoundname: "::CU"
|
|
728
|
+
// location: "[generated]"
|
|
729
|
+
|
|
730
|
+
if (/^namespace.*_0d\d{48}/.test(this.id)) {
|
|
731
|
+
let fileName = ''
|
|
732
|
+
if (compoundDef.location?.file !== undefined) {
|
|
733
|
+
fileName = path.basename(compoundDef.location.file)
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
if (this.compoundName.startsWith('::')) {
|
|
737
|
+
this.unqualifiedName = compoundDef.compoundName.replace(/.*::/, '')
|
|
738
|
+
|
|
739
|
+
this.indexName = `anonymous{${fileName}}${this.compoundName}`
|
|
740
|
+
|
|
741
|
+
const sanitizedPath = sanitizeHierarchicalPath(
|
|
742
|
+
this.indexName.replaceAll('::', '/')
|
|
743
|
+
)
|
|
744
|
+
|
|
745
|
+
this.pageTitle = `\`${this.indexName}\` Namespace`
|
|
746
|
+
|
|
747
|
+
this.relativePermalink = `namespaces/${sanitizedPath}`
|
|
748
|
+
this.sidebarId = `namespaces/${flattenPath(sanitizedPath)}`
|
|
749
|
+
const { unqualifiedName } = this
|
|
750
|
+
this.sidebarLabel = unqualifiedName
|
|
751
|
+
} else {
|
|
752
|
+
this.unqualifiedName = `anonymous{${fileName}}`
|
|
753
|
+
this.isAnonymous = true
|
|
754
|
+
|
|
755
|
+
if (this.compoundName.length > 0) {
|
|
756
|
+
this.indexName = `${this.compoundName}::${this.unqualifiedName}`
|
|
757
|
+
} else {
|
|
758
|
+
const { unqualifiedName } = this
|
|
759
|
+
this.indexName = unqualifiedName
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
const sanitizedPath = sanitizeHierarchicalPath(
|
|
763
|
+
this.indexName.replaceAll('::', '/')
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
// if (compoundDef.location?.file !== undefined) {
|
|
767
|
+
// sanitizedPath +=
|
|
768
|
+
// `-${crypto.hash('md5', compoundDef.location?.file)}`
|
|
769
|
+
// }
|
|
770
|
+
|
|
771
|
+
this.pageTitle = `\`${this.indexName}\` Namespace`
|
|
772
|
+
|
|
773
|
+
this.relativePermalink = `namespaces/${sanitizedPath}`
|
|
774
|
+
this.sidebarId = `namespaces/${flattenPath(sanitizedPath)}`
|
|
775
|
+
const { unqualifiedName } = this
|
|
776
|
+
this.sidebarLabel = unqualifiedName
|
|
777
|
+
}
|
|
778
|
+
} else {
|
|
779
|
+
// The compoundName is the fully qualified namespace name.
|
|
780
|
+
// Keep only the last name.
|
|
781
|
+
this.unqualifiedName = sanitizeAnonymousNamespace(
|
|
782
|
+
compoundDef.compoundName.replace(/.*::/, '')
|
|
783
|
+
)
|
|
784
|
+
|
|
785
|
+
this.indexName = sanitizeAnonymousNamespace(
|
|
786
|
+
this.compoundName.replace(/.*::/, '')
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
this.pageTitle = `\`${this.unqualifiedName}\` Namespace`
|
|
790
|
+
|
|
791
|
+
const sanitizedPath: string = sanitizeHierarchicalPath(
|
|
792
|
+
sanitizeAnonymousNamespace(this.compoundName.replaceAll('::', '/'))
|
|
793
|
+
)
|
|
794
|
+
|
|
795
|
+
if (compoundDef.compoundName.length > 0) {
|
|
796
|
+
// Skip un-named namespaces, and generated ones,
|
|
797
|
+
// since they can be duplicate.
|
|
798
|
+
this.relativePermalink = `namespaces/${sanitizedPath}`
|
|
799
|
+
this.sidebarId = `namespaces/${flattenPath(sanitizedPath)}`
|
|
800
|
+
const { unqualifiedName } = this
|
|
801
|
+
this.sidebarLabel = unqualifiedName
|
|
802
|
+
} else {
|
|
803
|
+
console.warn(
|
|
804
|
+
'Skipping unnamed namespace',
|
|
805
|
+
compoundDef.id,
|
|
806
|
+
compoundDef.location?.file
|
|
807
|
+
)
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
const { indexName } = this
|
|
812
|
+
this.treeEntryName = indexName
|
|
813
|
+
|
|
814
|
+
this.createSections()
|
|
815
|
+
|
|
816
|
+
// console.log('0 id', this.id)
|
|
817
|
+
// console.log('1 nm', this.compoundName)
|
|
818
|
+
// console.log('2 pl', this.relativePermalink)
|
|
819
|
+
// console.log('3 di', this.docusaurusId)
|
|
820
|
+
// console.log('4 sb', this.sidebarLabel)
|
|
821
|
+
// console.log('5 ix', this.indexName)
|
|
822
|
+
// console.log()
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Performs late initialisation for namespaces with content validation.
|
|
827
|
+
*
|
|
828
|
+
* @remarks
|
|
829
|
+
* Validates namespace content and conditionally disables sidebar generation
|
|
830
|
+
* for empty namespaces. This ensures that namespaces without meaningful
|
|
831
|
+
* documentation do not appear in the generated sidebar navigation.
|
|
832
|
+
*
|
|
833
|
+
* @public
|
|
834
|
+
*/
|
|
835
|
+
override initializeLate(): void {
|
|
836
|
+
super.initializeLate()
|
|
837
|
+
|
|
838
|
+
const { workspace } = this.collection
|
|
839
|
+
|
|
840
|
+
// console.log(this)
|
|
841
|
+
if (!this.hasAnyContent()) {
|
|
842
|
+
if (!workspace.options.suggestToDoDescriptions) {
|
|
843
|
+
console.log(this.kind, this.compoundName, 'has no content, not shown')
|
|
844
|
+
|
|
845
|
+
this.sidebarId = undefined
|
|
846
|
+
this.sidebarLabel = undefined
|
|
847
|
+
this.relativePermalink = undefined
|
|
848
|
+
|
|
849
|
+
return
|
|
850
|
+
} else {
|
|
851
|
+
if (workspace.options.verbose) {
|
|
852
|
+
console.log(
|
|
853
|
+
this.kind,
|
|
854
|
+
this.compoundName,
|
|
855
|
+
'has no content, see the TODO description'
|
|
856
|
+
)
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Determines if the namespace has any documentable content.
|
|
864
|
+
*
|
|
865
|
+
* @remarks
|
|
866
|
+
* Checks for child namespaces with content, inner compounds beyond just
|
|
867
|
+
* nested namespaces, and base class content to determine if the namespace
|
|
868
|
+
* should be included in documentation. This method helps filter empty
|
|
869
|
+
* namespaces from the generated output.
|
|
870
|
+
*
|
|
871
|
+
* @returns True if the namespace contains documentable content, false
|
|
872
|
+
* otherwise
|
|
873
|
+
*
|
|
874
|
+
* @public
|
|
875
|
+
*/
|
|
876
|
+
override hasAnyContent(): boolean {
|
|
877
|
+
// console.log('checking', this.compoundName)
|
|
878
|
+
for (const childNamespace of this.children) {
|
|
879
|
+
if (childNamespace.hasAnyContent()) {
|
|
880
|
+
// console.log('has content', this)
|
|
881
|
+
return true
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
if (this.innerCompounds !== undefined) {
|
|
886
|
+
if (this.innerCompounds.has('innerNamespaces')) {
|
|
887
|
+
if (this.innerCompounds.size > 1) {
|
|
888
|
+
// console.log('has content innerCompounds 1', this)
|
|
889
|
+
return true
|
|
890
|
+
}
|
|
891
|
+
} else {
|
|
892
|
+
if (this.innerCompounds.size > 0) {
|
|
893
|
+
// console.log('has content innerCompounds 2', this)
|
|
894
|
+
return true
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// if (!super.hasAnyContent()) {
|
|
900
|
+
// console.log('has no content', this)
|
|
901
|
+
// }
|
|
902
|
+
return super.hasAnyContent()
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Determines whether this namespace or any of its descendants contain
|
|
907
|
+
* C++20 concept compounds.
|
|
908
|
+
*
|
|
909
|
+
* @remarks
|
|
910
|
+
* Checks the namespace's own `concepts` array first, then recurses into
|
|
911
|
+
* child namespaces. Used to conditionally include concept index sections
|
|
912
|
+
* in namespace documentation pages.
|
|
913
|
+
*
|
|
914
|
+
* @returns `true` if at least one concept is present in this namespace
|
|
915
|
+
* or any nested namespace, `false` otherwise
|
|
916
|
+
*
|
|
917
|
+
* @public
|
|
918
|
+
*/
|
|
919
|
+
hasConceptsRecursively(): boolean {
|
|
920
|
+
if (this.concepts.length > 0) {
|
|
921
|
+
return true
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
for (const child of this.children) {
|
|
925
|
+
assert(child instanceof Namespace)
|
|
926
|
+
if (child.hasConceptsRecursively()) {
|
|
927
|
+
return true
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
return false
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Determines whether this namespace contains any C++20 concept compounds.
|
|
935
|
+
*
|
|
936
|
+
* @remarks
|
|
937
|
+
* Checks the namespace's own `concepts` array to determine if it contains
|
|
938
|
+
* any concepts. This method does not recurse into child namespaces.
|
|
939
|
+
*
|
|
940
|
+
* @returns `true` if at least one concept is present in this namespace,
|
|
941
|
+
* `false` otherwise
|
|
942
|
+
*
|
|
943
|
+
* @public
|
|
944
|
+
*/
|
|
945
|
+
hasConcepts(): boolean {
|
|
946
|
+
if (this.concepts.length > 0) {
|
|
947
|
+
return true
|
|
948
|
+
}
|
|
949
|
+
return false
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
// --------------------------------------------------------------------------
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Renders the namespace documentation to Markdown lines.
|
|
956
|
+
*
|
|
957
|
+
* @remarks
|
|
958
|
+
* Generates comprehensive namespace documentation including brief
|
|
959
|
+
* description, namespace definition syntax, inner compound indices, section
|
|
960
|
+
* indices, detailed description, and sections. The output follows Docusaurus
|
|
961
|
+
* conventions for namespace pages with proper navigation and content
|
|
962
|
+
* organisation.
|
|
963
|
+
*
|
|
964
|
+
* @param frontMatter - The front matter configuration for the page
|
|
965
|
+
* @returns Array of Markdown lines representing the namespace documentation
|
|
966
|
+
*
|
|
967
|
+
* @public
|
|
968
|
+
*/
|
|
969
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
970
|
+
override renderToLines(frontMatter: FrontMatter): string[] {
|
|
971
|
+
const lines: string[] = []
|
|
972
|
+
|
|
973
|
+
const { workspace } = this.collection
|
|
974
|
+
|
|
975
|
+
const descriptionTodo = `@namespace ${workspace.renderString(
|
|
976
|
+
this.compoundName,
|
|
977
|
+
'html'
|
|
978
|
+
)}`
|
|
979
|
+
|
|
980
|
+
const morePermalink =
|
|
981
|
+
this.detailedDescriptionHtmlLines !== undefined ? '#details' : undefined
|
|
982
|
+
|
|
983
|
+
lines.push(
|
|
984
|
+
this.renderBriefDescriptionToHtmlString({
|
|
985
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
986
|
+
todo: descriptionTodo,
|
|
987
|
+
morePermalink,
|
|
988
|
+
})
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
lines.push('')
|
|
992
|
+
lines.push('## Definition')
|
|
993
|
+
|
|
994
|
+
lines.push('')
|
|
995
|
+
lines.push('<div class="doxyDefinition">')
|
|
996
|
+
const dots = workspace.renderString('{ ... }', 'html')
|
|
997
|
+
if (this.compoundName.startsWith('anonymous_namespace{')) {
|
|
998
|
+
lines.push(`namespace ${dots}`)
|
|
999
|
+
} else {
|
|
1000
|
+
const compoundName = workspace.renderString(this.compoundName, 'html')
|
|
1001
|
+
lines.push(`namespace ${compoundName} ${dots}`)
|
|
1002
|
+
}
|
|
1003
|
+
lines.push('</div>')
|
|
1004
|
+
|
|
1005
|
+
lines.push(
|
|
1006
|
+
...this.renderInnerIndicesToLines({
|
|
1007
|
+
suffixes: ['Namespaces', 'Classes', 'Concepts'],
|
|
1008
|
+
})
|
|
1009
|
+
)
|
|
1010
|
+
|
|
1011
|
+
// This is a compatibility check for older Doxygen versions (pre 1.15)
|
|
1012
|
+
// that don't have innerConcepts.
|
|
1013
|
+
if (this.hasConcepts() && !this.innerCompounds?.has('innerConcepts')) {
|
|
1014
|
+
lines.push(...this.renderConceptsIndexToLines(this.concepts))
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
lines.push(...this.renderSectionIndicesToLines())
|
|
1018
|
+
|
|
1019
|
+
lines.push(
|
|
1020
|
+
...this.renderDetailedDescriptionToHtmlLines({
|
|
1021
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1022
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1023
|
+
todo: descriptionTodo,
|
|
1024
|
+
showHeader: true,
|
|
1025
|
+
showBrief: !this.hasSect1InDescription,
|
|
1026
|
+
})
|
|
1027
|
+
)
|
|
1028
|
+
|
|
1029
|
+
lines.push(...this.renderSectionsToLines())
|
|
1030
|
+
|
|
1031
|
+
lines.push(...this.renderGeneratedFromToLines())
|
|
1032
|
+
|
|
1033
|
+
return lines
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// ----------------------------------------------------------------------------
|