@xpack/doxygen2docusaurus 1.0.2
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 +21 -0
- package/README.md +25 -0
- package/bin/doxygen2docusaurus.js +45 -0
- package/dist/cli/main.d.ts +10 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +66 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/docusaurus/cli-options.d.ts +98 -0
- package/dist/docusaurus/cli-options.d.ts.map +1 -0
- package/dist/docusaurus/cli-options.js +212 -0
- package/dist/docusaurus/cli-options.js.map +1 -0
- package/dist/docusaurus/generator.d.ts +22 -0
- package/dist/docusaurus/generator.d.ts.map +1 -0
- package/dist/docusaurus/generator.js +461 -0
- package/dist/docusaurus/generator.js.map +1 -0
- package/dist/docusaurus/renderers/descriptiontype.d.ts +63 -0
- package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/descriptiontype.js +674 -0
- package/dist/docusaurus/renderers/descriptiontype.js.map +1 -0
- package/dist/docusaurus/renderers/docinternalstype.d.ts +21 -0
- package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/docinternalstype.js +159 -0
- package/dist/docusaurus/renderers/docinternalstype.js.map +1 -0
- package/dist/docusaurus/renderers/doclisttype.d.ts +6 -0
- package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/doclisttype.js +86 -0
- package/dist/docusaurus/renderers/doclisttype.js.map +1 -0
- package/dist/docusaurus/renderers/doctabletype.d.ts +15 -0
- package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/doctabletype.js +98 -0
- package/dist/docusaurus/renderers/doctabletype.js.map +1 -0
- package/dist/docusaurus/renderers/doctitletype.d.ts +6 -0
- package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/doctitletype.js +38 -0
- package/dist/docusaurus/renderers/doctitletype.js.map +1 -0
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts +9 -0
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/docvariablelisttype.js +57 -0
- package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -0
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts +6 -0
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/docxrefsecttype.js +44 -0
- package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -0
- package/dist/docusaurus/renderers/element-renderer-base.d.ts +12 -0
- package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -0
- package/dist/docusaurus/renderers/element-renderer-base.js +25 -0
- package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -0
- package/dist/docusaurus/renderers/inctype.d.ts +6 -0
- package/dist/docusaurus/renderers/inctype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/inctype.js +42 -0
- package/dist/docusaurus/renderers/inctype.js.map +1 -0
- package/dist/docusaurus/renderers/linkedtexttype.d.ts +6 -0
- package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/linkedtexttype.js +32 -0
- package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -0
- package/dist/docusaurus/renderers/listingtype.d.ts +10 -0
- package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/listingtype.js +121 -0
- package/dist/docusaurus/renderers/listingtype.js.map +1 -0
- package/dist/docusaurus/renderers/paramtype.d.ts +6 -0
- package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/paramtype.js +63 -0
- package/dist/docusaurus/renderers/paramtype.js.map +1 -0
- package/dist/docusaurus/renderers/referencetype.d.ts +6 -0
- package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/referencetype.js +42 -0
- package/dist/docusaurus/renderers/referencetype.js.map +1 -0
- package/dist/docusaurus/renderers/reftexttype.d.ts +6 -0
- package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/reftexttype.js +41 -0
- package/dist/docusaurus/renderers/reftexttype.js.map +1 -0
- package/dist/docusaurus/renderers/reftype.d.ts +6 -0
- package/dist/docusaurus/renderers/reftype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/reftype.js +38 -0
- package/dist/docusaurus/renderers/reftype.js.map +1 -0
- package/dist/docusaurus/renderers/renderers.d.ts +33 -0
- package/dist/docusaurus/renderers/renderers.d.ts.map +1 -0
- package/dist/docusaurus/renderers/renderers.js +303 -0
- package/dist/docusaurus/renderers/renderers.js.map +1 -0
- package/dist/docusaurus/renderers/substringtype.d.ts +6 -0
- package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/substringtype.js +24 -0
- package/dist/docusaurus/renderers/substringtype.js.map +1 -0
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts +6 -0
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -0
- package/dist/docusaurus/renderers/tableofcontentstype.js +41 -0
- package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -0
- package/dist/docusaurus/types.d.ts +53 -0
- package/dist/docusaurus/types.d.ts.map +1 -0
- package/dist/docusaurus/types.js +13 -0
- package/dist/docusaurus/types.js.map +1 -0
- package/dist/docusaurus/utils.d.ts +16 -0
- package/dist/docusaurus/utils.d.ts.map +1 -0
- package/dist/docusaurus/utils.js +169 -0
- package/dist/docusaurus/utils.js.map +1 -0
- package/dist/docusaurus/view-model/classes-vm.d.ts +35 -0
- package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/classes-vm.js +707 -0
- package/dist/docusaurus/view-model/classes-vm.js.map +1 -0
- package/dist/docusaurus/view-model/collection-base.d.ts +28 -0
- package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -0
- package/dist/docusaurus/view-model/collection-base.js +155 -0
- package/dist/docusaurus/view-model/collection-base.js.map +1 -0
- package/dist/docusaurus/view-model/compound-base-vm.d.ts +112 -0
- package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/compound-base-vm.js +829 -0
- package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -0
- package/dist/docusaurus/view-model/description-anchors.d.ts +17 -0
- package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -0
- package/dist/docusaurus/view-model/description-anchors.js +37 -0
- package/dist/docusaurus/view-model/description-anchors.js.map +1 -0
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +45 -0
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/files-and-folders-vm.js +749 -0
- package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -0
- package/dist/docusaurus/view-model/groups-vm.d.ts +20 -0
- package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/groups-vm.js +297 -0
- package/dist/docusaurus/view-model/groups-vm.js.map +1 -0
- package/dist/docusaurus/view-model/members-vm.d.ts +81 -0
- package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/members-vm.js +1017 -0
- package/dist/docusaurus/view-model/members-vm.js.map +1 -0
- package/dist/docusaurus/view-model/namespaces-vm.d.ts +24 -0
- package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/namespaces-vm.js +527 -0
- package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -0
- package/dist/docusaurus/view-model/options.d.ts +8 -0
- package/dist/docusaurus/view-model/options.d.ts.map +1 -0
- package/dist/docusaurus/view-model/options.js +42 -0
- package/dist/docusaurus/view-model/options.js.map +1 -0
- package/dist/docusaurus/view-model/pages-vm.d.ts +18 -0
- package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/pages-vm.js +160 -0
- package/dist/docusaurus/view-model/pages-vm.js.map +1 -0
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts +44 -0
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/tree-entries-vm.js +139 -0
- package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -0
- package/dist/docusaurus/view-model/view-model.d.ts +34 -0
- package/dist/docusaurus/view-model/view-model.d.ts.map +1 -0
- package/dist/docusaurus/view-model/view-model.js +284 -0
- package/dist/docusaurus/view-model/view-model.js.map +1 -0
- package/dist/docusaurus/workspace.d.ts +65 -0
- package/dist/docusaurus/workspace.d.ts.map +1 -0
- package/dist/docusaurus/workspace.js +350 -0
- package/dist/docusaurus/workspace.js.map +1 -0
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +97 -0
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/compounddef-dm.js +498 -0
- package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +27 -0
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +91 -0
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +1214 -0
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +5995 -0
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts +22 -0
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +136 -0
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts +14 -0
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js +87 -0
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +23 -0
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +104 -0
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +24 -0
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/inctype-dm.js +84 -0
- package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +33 -0
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +102 -0
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +17 -0
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +69 -0
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +24 -0
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/locationtype-dm.js +109 -0
- package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +67 -0
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +253 -0
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +21 -0
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js +105 -0
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +17 -0
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/membertype-dm.js +87 -0
- package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +25 -0
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/paramtype-dm.js +115 -0
- package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +26 -0
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/referencetype-dm.js +93 -0
- package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts +15 -0
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js +80 -0
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +55 -0
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/reftype-dm.js +152 -0
- package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +20 -0
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +77 -0
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +34 -0
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +139 -0
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +46 -0
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +235 -0
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -0
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +17 -0
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +69 -0
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -0
- package/dist/doxygen/data-model/data-model.d.ts +91 -0
- package/dist/doxygen/data-model/data-model.d.ts.map +1 -0
- package/dist/doxygen/data-model/data-model.js +245 -0
- package/dist/doxygen/data-model/data-model.js.map +1 -0
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +21 -0
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +95 -0
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -0
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +20 -0
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +92 -0
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -0
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +261 -0
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -0
- package/dist/doxygen/data-model/doxygen-xml-parser.js +459 -0
- package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -0
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +21 -0
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +96 -0
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -0
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +20 -0
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +93 -0
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -0
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +19 -0
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/index/indexmembertype-dm.js +89 -0
- package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -0
- package/dist/doxygen/data-model/types.d.ts +44 -0
- package/dist/doxygen/data-model/types.d.ts.map +1 -0
- package/dist/doxygen/data-model/types.js +24 -0
- package/dist/doxygen/data-model/types.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +99 -0
- package/template/css/custom.css +908 -0
- package/template/img/README.md +3 -0
- package/template/img/document-svgrepo-com.svg +5 -0
- package/template/img/folder-svgrepo-com.svg +5 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
|
+
* Copyright (c) 2025 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
|
+
// import * as util from 'node:util'
|
|
13
|
+
import assert from 'node:assert';
|
|
14
|
+
import crypto from 'node:crypto';
|
|
15
|
+
import { CompoundBase } from './compound-base-vm.js';
|
|
16
|
+
import { CollectionBase } from './collection-base.js';
|
|
17
|
+
import { flattenPath, sanitizeAnonymousNamespace, sanitizeHierarchicalPath, } from '../utils.js';
|
|
18
|
+
import { ClassTreeEntry } from './tree-entries-vm.js';
|
|
19
|
+
// ----------------------------------------------------------------------------
|
|
20
|
+
const kindsPlurals = {
|
|
21
|
+
class: 'Classes',
|
|
22
|
+
struct: 'Structs',
|
|
23
|
+
union: 'Unions',
|
|
24
|
+
};
|
|
25
|
+
// ----------------------------------------------------------------------------
|
|
26
|
+
export class Classes extends CollectionBase {
|
|
27
|
+
// compoundsById: Map<string, Class>
|
|
28
|
+
topLevelClasses = [];
|
|
29
|
+
// --------------------------------------------------------------------------
|
|
30
|
+
// constructor (workspace: Workspace) {
|
|
31
|
+
// super(workspace)
|
|
32
|
+
// // this.compoundsById = new Map()
|
|
33
|
+
// }
|
|
34
|
+
// --------------------------------------------------------------------------
|
|
35
|
+
addChild(compoundDef) {
|
|
36
|
+
const classs = new Class(this, compoundDef);
|
|
37
|
+
this.collectionCompoundsById.set(classs.id, classs);
|
|
38
|
+
return classs;
|
|
39
|
+
}
|
|
40
|
+
// --------------------------------------------------------------------------
|
|
41
|
+
createCompoundsHierarchies() {
|
|
42
|
+
// Recreate classes hierarchies.
|
|
43
|
+
for (const [classId, classs] of this.collectionCompoundsById) {
|
|
44
|
+
if (!(classs instanceof Class)) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
for (const baseClassId of classs.baseClassIds) {
|
|
48
|
+
// console.log(classId, baseClassId)
|
|
49
|
+
const baseClass = this.collectionCompoundsById.get(baseClassId);
|
|
50
|
+
if (baseClass instanceof Class) {
|
|
51
|
+
// console.log('baseClassId', baseClassId, 'has child', classId)
|
|
52
|
+
baseClass.children.push(classs);
|
|
53
|
+
classs.baseClasses.push(baseClass);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (this.workspace.options.debug) {
|
|
57
|
+
console.log(baseClass);
|
|
58
|
+
}
|
|
59
|
+
console.warn(baseClassId, 'ignored as base class for', classId);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
for (const [classId, classs] of this.collectionCompoundsById) {
|
|
64
|
+
if (!(classs instanceof Class)) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (classs.baseClassIds.size === 0) {
|
|
68
|
+
if (this.workspace.options.debug) {
|
|
69
|
+
console.log('topLevelClassId:', classId);
|
|
70
|
+
}
|
|
71
|
+
this.topLevelClasses.push(classs);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// --------------------------------------------------------------------------
|
|
76
|
+
addSidebarItems(sidebarCategory) {
|
|
77
|
+
const indicesSet = this.workspace.indicesMaps.get('classes');
|
|
78
|
+
if (indicesSet === undefined) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
// Add classes to the sidebar.
|
|
82
|
+
// Top level classes are added below a Class category
|
|
83
|
+
const classesCategory = {
|
|
84
|
+
type: 'category',
|
|
85
|
+
label: 'Classes',
|
|
86
|
+
link: {
|
|
87
|
+
type: 'doc',
|
|
88
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/index`,
|
|
89
|
+
},
|
|
90
|
+
collapsed: true,
|
|
91
|
+
items: [
|
|
92
|
+
{
|
|
93
|
+
type: 'category',
|
|
94
|
+
label: 'Hierarchy',
|
|
95
|
+
collapsed: true,
|
|
96
|
+
items: [],
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
};
|
|
100
|
+
// Add the hierarchy.
|
|
101
|
+
for (const classs of this.topLevelClasses) {
|
|
102
|
+
const item = this.createSidebarItemRecursively(classs);
|
|
103
|
+
if (item !== undefined) {
|
|
104
|
+
;
|
|
105
|
+
classesCategory.items[0].items.push(item);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Add the rest of the entries.
|
|
109
|
+
if (indicesSet.has('classes')) {
|
|
110
|
+
classesCategory.items.push({
|
|
111
|
+
type: 'doc',
|
|
112
|
+
label: 'All',
|
|
113
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/all`,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (indicesSet.has('classes')) {
|
|
117
|
+
classesCategory.items.push({
|
|
118
|
+
type: 'doc',
|
|
119
|
+
label: 'Classes',
|
|
120
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/classes`,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (indicesSet.has('functions')) {
|
|
124
|
+
classesCategory.items.push({
|
|
125
|
+
type: 'doc',
|
|
126
|
+
label: 'Functions',
|
|
127
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/functions`,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (indicesSet.has('variables')) {
|
|
131
|
+
classesCategory.items.push({
|
|
132
|
+
type: 'doc',
|
|
133
|
+
label: 'Variables',
|
|
134
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/variables`,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (indicesSet.has('typedefs')) {
|
|
138
|
+
classesCategory.items.push({
|
|
139
|
+
type: 'doc',
|
|
140
|
+
label: 'Typedefs',
|
|
141
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/typedefs`,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
if (indicesSet.has('enums')) {
|
|
145
|
+
classesCategory.items.push({
|
|
146
|
+
type: 'doc',
|
|
147
|
+
label: 'Enums',
|
|
148
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/enums`,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
if (indicesSet.has('enumvalues')) {
|
|
152
|
+
classesCategory.items.push({
|
|
153
|
+
type: 'doc',
|
|
154
|
+
label: 'Enum Values',
|
|
155
|
+
id: `${this.workspace.sidebarBaseId}indices/classes/enumvalues`,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
sidebarCategory.items.push(classesCategory);
|
|
159
|
+
}
|
|
160
|
+
createSidebarItemRecursively(classs) {
|
|
161
|
+
if (classs.sidebarLabel === undefined || classs.sidebarId === undefined) {
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
if (classs.children.length === 0) {
|
|
165
|
+
const docItem = {
|
|
166
|
+
type: 'doc',
|
|
167
|
+
label: classs.sidebarLabel,
|
|
168
|
+
className: 'doxyEllipsis',
|
|
169
|
+
id: `${this.workspace.sidebarBaseId}${classs.sidebarId}`,
|
|
170
|
+
};
|
|
171
|
+
return docItem;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
const categoryItem = {
|
|
175
|
+
type: 'category',
|
|
176
|
+
label: classs.sidebarLabel,
|
|
177
|
+
link: {
|
|
178
|
+
type: 'doc',
|
|
179
|
+
id: `${this.workspace.sidebarBaseId}${classs.sidebarId}`,
|
|
180
|
+
},
|
|
181
|
+
className: 'doxyEllipsis',
|
|
182
|
+
collapsed: true,
|
|
183
|
+
items: [],
|
|
184
|
+
};
|
|
185
|
+
for (const child of classs.children) {
|
|
186
|
+
if (child instanceof Class) {
|
|
187
|
+
const item = this.createSidebarItemRecursively(child);
|
|
188
|
+
if (item !== undefined) {
|
|
189
|
+
categoryItem.items.push(item);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return categoryItem;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
// --------------------------------------------------------------------------
|
|
197
|
+
createMenuItems() {
|
|
198
|
+
const menuItem = {
|
|
199
|
+
label: 'Classes',
|
|
200
|
+
to: `${this.workspace.menuBaseUrl}classes/`,
|
|
201
|
+
};
|
|
202
|
+
return [menuItem];
|
|
203
|
+
}
|
|
204
|
+
// --------------------------------------------------------------------------
|
|
205
|
+
async generateIndexDotMdFile() {
|
|
206
|
+
if (this.topLevelClasses.length === 0) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const filePath = this.workspace.outputFolderPath + 'indices/classes/index.md';
|
|
210
|
+
const permalink = 'classes';
|
|
211
|
+
const frontMatter = {
|
|
212
|
+
title: 'Classes',
|
|
213
|
+
slug: `${this.workspace.slugBaseUrl}${permalink}`,
|
|
214
|
+
// description: '...', // TODO
|
|
215
|
+
custom_edit_url: null,
|
|
216
|
+
keywords: ['doxygen', 'classes', 'reference'],
|
|
217
|
+
};
|
|
218
|
+
const contentLines = [];
|
|
219
|
+
for (const classs of this.topLevelClasses) {
|
|
220
|
+
contentLines.push(...this.generateIndexMdFileRecursively(classs, 1));
|
|
221
|
+
}
|
|
222
|
+
if (contentLines.length === 0) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const lines = [];
|
|
226
|
+
lines.push('The classes, structs, union and interfaces used by this project are:');
|
|
227
|
+
lines.push(...this.workspace.renderTreeTableToHtmlLines({ contentLines }));
|
|
228
|
+
if (this.workspace.options.verbose) {
|
|
229
|
+
console.log(`Writing classes index file ${filePath}...`);
|
|
230
|
+
}
|
|
231
|
+
await this.workspace.writeOutputMdFile({
|
|
232
|
+
filePath,
|
|
233
|
+
frontMatter,
|
|
234
|
+
bodyLines: lines,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
generateIndexMdFileRecursively(classs, depth) {
|
|
238
|
+
// console.log(util.inspect(classs, { compact: false, depth: 999 }))
|
|
239
|
+
const lines = [];
|
|
240
|
+
const permalink = this.workspace.getPagePermalink(classs.id);
|
|
241
|
+
assert(permalink !== undefined && permalink.length > 0);
|
|
242
|
+
const iconLetters = {
|
|
243
|
+
class: 'C',
|
|
244
|
+
struct: 'S',
|
|
245
|
+
union: 'U',
|
|
246
|
+
};
|
|
247
|
+
let iconLetter = iconLetters[classs.kind];
|
|
248
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
249
|
+
if (iconLetter === undefined) {
|
|
250
|
+
console.error('Icon kind', classs.kind, 'not supported yet in', this.constructor.name, '(using ?)');
|
|
251
|
+
iconLetter = '?';
|
|
252
|
+
}
|
|
253
|
+
const label = this.workspace.renderString(classs.treeEntryName, 'html');
|
|
254
|
+
let description = '';
|
|
255
|
+
if (classs.briefDescriptionHtmlString !== undefined &&
|
|
256
|
+
classs.briefDescriptionHtmlString.length > 0) {
|
|
257
|
+
description = classs.briefDescriptionHtmlString.replace(/[.]$/, '');
|
|
258
|
+
}
|
|
259
|
+
lines.push('');
|
|
260
|
+
lines.push(...this.workspace.renderTreeTableRowToHtmlLines({
|
|
261
|
+
itemIconLetter: iconLetter,
|
|
262
|
+
itemLabel: label,
|
|
263
|
+
itemLink: permalink,
|
|
264
|
+
depth,
|
|
265
|
+
description,
|
|
266
|
+
}));
|
|
267
|
+
if (classs.children.length > 0) {
|
|
268
|
+
for (const childClass of classs.children) {
|
|
269
|
+
lines.push(...this.generateIndexMdFileRecursively(childClass, depth + 1));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return lines;
|
|
273
|
+
}
|
|
274
|
+
async generatePerInitialsIndexMdFiles() {
|
|
275
|
+
if (this.topLevelClasses.length === 0) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
const allUnorderedEntriesMap = new Map();
|
|
279
|
+
for (const [, compound] of this.collectionCompoundsById) {
|
|
280
|
+
if (!(compound instanceof Class)) {
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
const compoundEntry = new ClassTreeEntry(compound, compound);
|
|
284
|
+
allUnorderedEntriesMap.set(compoundEntry.id, compoundEntry);
|
|
285
|
+
for (const section of compound.sections) {
|
|
286
|
+
for (const member of section.definitionMembers) {
|
|
287
|
+
const memberEntry = new ClassTreeEntry(member, compound);
|
|
288
|
+
allUnorderedEntriesMap.set(memberEntry.id, memberEntry);
|
|
289
|
+
if (member.enumValues !== undefined) {
|
|
290
|
+
for (const enumValue of member.enumValues) {
|
|
291
|
+
const enumValueEntry = new ClassTreeEntry(enumValue, compound);
|
|
292
|
+
allUnorderedEntriesMap.set(enumValueEntry.id, enumValueEntry);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// ------------------------------------------------------------------------
|
|
299
|
+
await this.generateIndexFile({
|
|
300
|
+
group: 'classes',
|
|
301
|
+
fileKind: 'all',
|
|
302
|
+
title: 'Classes and Members Index',
|
|
303
|
+
description: 'The classes, structs, unions and their members are:',
|
|
304
|
+
map: allUnorderedEntriesMap,
|
|
305
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
306
|
+
filter: (kind) => true,
|
|
307
|
+
});
|
|
308
|
+
await this.generateIndexFile({
|
|
309
|
+
group: 'classes',
|
|
310
|
+
fileKind: 'classes',
|
|
311
|
+
title: 'Classes Index',
|
|
312
|
+
description: 'The classes, structs, unions defined in the project are:',
|
|
313
|
+
map: allUnorderedEntriesMap,
|
|
314
|
+
filter: (kind) => kind === 'class' || kind === 'struct' || kind === 'union',
|
|
315
|
+
});
|
|
316
|
+
await this.generateIndexFile({
|
|
317
|
+
group: 'classes',
|
|
318
|
+
fileKind: 'functions',
|
|
319
|
+
title: 'Class Functions Index',
|
|
320
|
+
description: 'The class member functions defined in the project are:',
|
|
321
|
+
map: allUnorderedEntriesMap,
|
|
322
|
+
filter: (kind) => kind === 'function',
|
|
323
|
+
});
|
|
324
|
+
await this.generateIndexFile({
|
|
325
|
+
group: 'classes',
|
|
326
|
+
fileKind: 'variables',
|
|
327
|
+
title: 'Class Variables Index',
|
|
328
|
+
description: 'The class member variables defined in the project are:',
|
|
329
|
+
map: allUnorderedEntriesMap,
|
|
330
|
+
filter: (kind) => kind === 'variable',
|
|
331
|
+
});
|
|
332
|
+
await this.generateIndexFile({
|
|
333
|
+
group: 'classes',
|
|
334
|
+
fileKind: 'typedefs',
|
|
335
|
+
title: 'Class Type Definitions Index',
|
|
336
|
+
description: 'The class member typedefs defined in the project are:',
|
|
337
|
+
map: allUnorderedEntriesMap,
|
|
338
|
+
filter: (kind) => kind === 'typedef',
|
|
339
|
+
});
|
|
340
|
+
await this.generateIndexFile({
|
|
341
|
+
group: 'classes',
|
|
342
|
+
fileKind: 'enums',
|
|
343
|
+
title: 'Class Enums Index',
|
|
344
|
+
description: 'The class member enums defined in the project are:',
|
|
345
|
+
map: allUnorderedEntriesMap,
|
|
346
|
+
filter: (kind) => kind === 'enum',
|
|
347
|
+
});
|
|
348
|
+
await this.generateIndexFile({
|
|
349
|
+
group: 'classes',
|
|
350
|
+
fileKind: 'enumvalues',
|
|
351
|
+
title: 'Class Enum Values Index',
|
|
352
|
+
description: 'The class member enum values defined in the project are:',
|
|
353
|
+
map: allUnorderedEntriesMap,
|
|
354
|
+
filter: (kind) => kind === 'enumvalue',
|
|
355
|
+
});
|
|
356
|
+
// ------------------------------------------------------------------------
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
// ============================================================================
|
|
360
|
+
export class Class extends CompoundBase {
|
|
361
|
+
// Due to multiple-inheritance, there can be multiple parents.
|
|
362
|
+
baseClassIds = new Set();
|
|
363
|
+
baseClasses = [];
|
|
364
|
+
fullyQualifiedName = '???';
|
|
365
|
+
unqualifiedName = '???';
|
|
366
|
+
templateParameters = '';
|
|
367
|
+
classFullName = '???';
|
|
368
|
+
template;
|
|
369
|
+
// Shortcuts, use data model objects.
|
|
370
|
+
// WARNING: May be duplicate.
|
|
371
|
+
baseCompoundRefs;
|
|
372
|
+
derivedCompoundRefs;
|
|
373
|
+
templateParamList;
|
|
374
|
+
// --------------------------------------------------------------------------
|
|
375
|
+
constructor(collection, compoundDef) {
|
|
376
|
+
super(collection, compoundDef);
|
|
377
|
+
// console.log('Class.constructor', util.inspect(compoundDef))
|
|
378
|
+
const { workspace } = this.collection;
|
|
379
|
+
if (Array.isArray(compoundDef.baseCompoundRefs)) {
|
|
380
|
+
for (const ref of compoundDef.baseCompoundRefs) {
|
|
381
|
+
// console.log('component', compoundDef.id, 'has base', ref.refid)
|
|
382
|
+
if (ref.refid !== undefined) {
|
|
383
|
+
this.baseClassIds.add(ref.refid);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
// Remove the template parameters.
|
|
388
|
+
this.fullyQualifiedName = sanitizeAnonymousNamespace(compoundDef.compoundName.replace(/<.*>/, ''));
|
|
389
|
+
// Remove the namespaces(s).
|
|
390
|
+
this.unqualifiedName = this.fullyQualifiedName.replace(/.*::/, '');
|
|
391
|
+
const index = compoundDef.compoundName.indexOf('<');
|
|
392
|
+
let indexNameTemplateParameters = '';
|
|
393
|
+
if (index >= 0) {
|
|
394
|
+
indexNameTemplateParameters = compoundDef.compoundName
|
|
395
|
+
.substring(index)
|
|
396
|
+
.replace(/^< /, '<')
|
|
397
|
+
.replace(/ >$/, '>');
|
|
398
|
+
this.templateParameters = indexNameTemplateParameters;
|
|
399
|
+
}
|
|
400
|
+
else if (compoundDef.templateParamList !== undefined) {
|
|
401
|
+
indexNameTemplateParameters = this.renderTemplateParameterNamesToString(compoundDef.templateParamList);
|
|
402
|
+
}
|
|
403
|
+
this.indexName = `${this.unqualifiedName}${indexNameTemplateParameters}`;
|
|
404
|
+
this.sidebarLabel = this.indexName;
|
|
405
|
+
if (this.indexName.length < 42) {
|
|
406
|
+
const { indexName } = this;
|
|
407
|
+
this.treeEntryName = indexName;
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
this.treeEntryName = `${this.unqualifiedName}<...>`;
|
|
411
|
+
}
|
|
412
|
+
const { kind } = compoundDef;
|
|
413
|
+
const kindCapitalised = kind.charAt(0).toUpperCase() + kind.slice(1).toLowerCase();
|
|
414
|
+
const nameHtml = workspace.renderString(this.unqualifiedName, 'html');
|
|
415
|
+
this.pageTitle = `\`${nameHtml}\` ${kindCapitalised}`;
|
|
416
|
+
if (compoundDef.templateParamList !== undefined) {
|
|
417
|
+
this.pageTitle += ' Template';
|
|
418
|
+
}
|
|
419
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
420
|
+
assert(kindsPlurals[kind] !== undefined);
|
|
421
|
+
const pluralKind = kindsPlurals[kind].toLowerCase();
|
|
422
|
+
// Turn the namespace into a hierarchical path. Keep the dot.
|
|
423
|
+
let sanitizedPath = sanitizeHierarchicalPath(this.fullyQualifiedName.replaceAll(/::/g, '/'));
|
|
424
|
+
if (this.templateParameters.length > 0) {
|
|
425
|
+
// sanitizedPath += sanitizeName(this.templateParameters)
|
|
426
|
+
sanitizedPath += `-${crypto.hash('md5', this.templateParameters)}`;
|
|
427
|
+
}
|
|
428
|
+
this.relativePermalink = `${pluralKind}/${sanitizedPath}`;
|
|
429
|
+
// Replace slash with dash.
|
|
430
|
+
this.sidebarId = `${pluralKind}/${flattenPath(sanitizedPath)}`;
|
|
431
|
+
this.createSections(this.unqualifiedName);
|
|
432
|
+
// console.log('0', compoundDef.id)
|
|
433
|
+
// console.log('1', compoundDef.compoundName)
|
|
434
|
+
// console.log('2', this.relativePermalink)
|
|
435
|
+
// console.log('3', this.docusaurusId)
|
|
436
|
+
// console.log('4', this.sidebarLabel)
|
|
437
|
+
// console.log('5', this.indexName)
|
|
438
|
+
// console.log('6', this.templateParameters)
|
|
439
|
+
// console.log()
|
|
440
|
+
}
|
|
441
|
+
initializeLate() {
|
|
442
|
+
super.initializeLate();
|
|
443
|
+
const compoundDef = this._private._compoundDef;
|
|
444
|
+
assert(compoundDef !== undefined);
|
|
445
|
+
const { workspace } = this.collection;
|
|
446
|
+
const { fullyQualifiedName } = this;
|
|
447
|
+
let classFullName = fullyQualifiedName;
|
|
448
|
+
if (this.templateParameters.length > 0) {
|
|
449
|
+
classFullName += workspace.renderString(this.templateParameters, 'html');
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
classFullName += workspace.renderString(this.renderTemplateParameterNamesToString(compoundDef.templateParamList), 'html');
|
|
453
|
+
}
|
|
454
|
+
this.classFullName = classFullName;
|
|
455
|
+
if (compoundDef.templateParamList?.params !== undefined) {
|
|
456
|
+
this.template = workspace.renderString(this.renderTemplateParametersToString({
|
|
457
|
+
templateParamList: compoundDef.templateParamList,
|
|
458
|
+
withDefaults: true,
|
|
459
|
+
}), 'html');
|
|
460
|
+
}
|
|
461
|
+
const { baseCompoundRefs, derivedCompoundRefs, templateParamList } = compoundDef;
|
|
462
|
+
this.baseCompoundRefs = baseCompoundRefs;
|
|
463
|
+
this.derivedCompoundRefs = derivedCompoundRefs;
|
|
464
|
+
this.templateParamList = templateParamList;
|
|
465
|
+
}
|
|
466
|
+
hasAnyContent() {
|
|
467
|
+
if (this.childrenIds.length > 0) {
|
|
468
|
+
return true;
|
|
469
|
+
}
|
|
470
|
+
if (this.children.length > 0) {
|
|
471
|
+
return true;
|
|
472
|
+
}
|
|
473
|
+
if (this.innerCompounds !== undefined) {
|
|
474
|
+
return true;
|
|
475
|
+
}
|
|
476
|
+
if (this.sections.length > 0) {
|
|
477
|
+
return true;
|
|
478
|
+
}
|
|
479
|
+
if (this.includes !== undefined) {
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
482
|
+
return super.hasAnyContent();
|
|
483
|
+
}
|
|
484
|
+
// --------------------------------------------------------------------------
|
|
485
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
486
|
+
renderToLines(frontMatter) {
|
|
487
|
+
const lines = [];
|
|
488
|
+
const { workspace } = this.collection;
|
|
489
|
+
const name = this.collection.workspace.renderString(this.compoundName, 'html');
|
|
490
|
+
const descriptionTodo = `@${this.kind} ${name}`;
|
|
491
|
+
// The Description header is always shown.
|
|
492
|
+
const morePermalink = '#details';
|
|
493
|
+
lines.push(this.renderBriefDescriptionToHtmlString({
|
|
494
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
495
|
+
todo: descriptionTodo,
|
|
496
|
+
morePermalink,
|
|
497
|
+
}));
|
|
498
|
+
lines.push('');
|
|
499
|
+
lines.push('## Declaration');
|
|
500
|
+
let classs = undefined;
|
|
501
|
+
if ('collectionCompoundsById' in this.collection) {
|
|
502
|
+
const candidate = this.collection.collectionCompoundsById.get(this.id);
|
|
503
|
+
if (candidate instanceof Class) {
|
|
504
|
+
classs = candidate;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
assert(classs !== undefined);
|
|
508
|
+
lines.push('');
|
|
509
|
+
lines.push('<div class="doxyDeclaration">');
|
|
510
|
+
if (this.template !== undefined) {
|
|
511
|
+
lines.push(`template ${this.template}`);
|
|
512
|
+
}
|
|
513
|
+
lines.push(`${this.kind} ${this.classFullName} { ... }`);
|
|
514
|
+
lines.push('</div>');
|
|
515
|
+
lines.push(...this.renderIncludesIndexToLines());
|
|
516
|
+
if (this.kind === 'class' || this.kind === 'struct') {
|
|
517
|
+
if (this.baseCompoundRefs !== undefined) {
|
|
518
|
+
const baseCompoundRefs = new Map();
|
|
519
|
+
for (const baseCompoundRef of this.baseCompoundRefs) {
|
|
520
|
+
if (!baseCompoundRefs.has(baseCompoundRef.text)) {
|
|
521
|
+
baseCompoundRefs.set(baseCompoundRef.text, baseCompoundRef);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
lines.push('');
|
|
525
|
+
if (baseCompoundRefs.size > 1) {
|
|
526
|
+
lines.push(`## Base ${kindsPlurals[this.kind].toLowerCase()}`);
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
lines.push(`## Base ${this.kind}`);
|
|
530
|
+
}
|
|
531
|
+
lines.push('');
|
|
532
|
+
lines.push('<table class="doxyMembersIndex">');
|
|
533
|
+
for (const baseCompoundRef of baseCompoundRefs.values()) {
|
|
534
|
+
// console.log(
|
|
535
|
+
// util.inspect(baseCompoundRef, { compact: false, depth: 999 })
|
|
536
|
+
// )
|
|
537
|
+
if (baseCompoundRef.refid !== undefined) {
|
|
538
|
+
const { collection } = this;
|
|
539
|
+
const baseClass = collection.collectionCompoundsById.get(baseCompoundRef.refid);
|
|
540
|
+
if (baseClass instanceof Class) {
|
|
541
|
+
lines.push(...baseClass.renderIndexToLines());
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
const itemName = workspace.renderString(baseCompoundRef.text, 'html');
|
|
546
|
+
lines.push('');
|
|
547
|
+
lines.push(...workspace.renderMembersIndexItemToHtmlLines({
|
|
548
|
+
type: this.kind,
|
|
549
|
+
name: itemName,
|
|
550
|
+
}));
|
|
551
|
+
}
|
|
552
|
+
lines.push('');
|
|
553
|
+
lines.push('</table>');
|
|
554
|
+
}
|
|
555
|
+
else if ('baseClassIds' in classs && classs.baseClassIds.size > 0) {
|
|
556
|
+
lines.push('');
|
|
557
|
+
if (classs.baseClassIds.size > 1) {
|
|
558
|
+
lines.push(`## Base ${kindsPlurals[this.kind].toLowerCase()}`);
|
|
559
|
+
}
|
|
560
|
+
else {
|
|
561
|
+
lines.push(`## Base ${this.kind}`);
|
|
562
|
+
}
|
|
563
|
+
lines.push('');
|
|
564
|
+
lines.push('<table class="doxyMembersIndex">');
|
|
565
|
+
for (const baseClassId of classs.baseClassIds) {
|
|
566
|
+
const { collection } = this;
|
|
567
|
+
if (collection instanceof Classes) {
|
|
568
|
+
const baseClass = collection.collectionCompoundsById.get(baseClassId);
|
|
569
|
+
if (baseClass instanceof Class) {
|
|
570
|
+
// console.log(
|
|
571
|
+
// util.inspect(
|
|
572
|
+
// derivedCompoundDef, { compact: false, depth: 999 }
|
|
573
|
+
// )
|
|
574
|
+
// )
|
|
575
|
+
lines.push(...baseClass.renderIndexToLines());
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
lines.push('');
|
|
580
|
+
lines.push('</table>');
|
|
581
|
+
}
|
|
582
|
+
if (this.derivedCompoundRefs !== undefined) {
|
|
583
|
+
lines.push('');
|
|
584
|
+
lines.push(`## Derived ${kindsPlurals[this.kind]}`);
|
|
585
|
+
lines.push('');
|
|
586
|
+
lines.push('<table class="doxyMembersIndex">');
|
|
587
|
+
for (const derivedCompoundRef of this.derivedCompoundRefs) {
|
|
588
|
+
// console.log(
|
|
589
|
+
// util.inspect(derivedCompoundRef, { compact: false, depth: 999 })
|
|
590
|
+
// )
|
|
591
|
+
if (derivedCompoundRef.refid !== undefined) {
|
|
592
|
+
let derivedClass = undefined;
|
|
593
|
+
if ('collectionCompoundsById' in this.collection &&
|
|
594
|
+
typeof derivedCompoundRef.refid === 'string') {
|
|
595
|
+
const collection = this.collection;
|
|
596
|
+
const candidate = collection.collectionCompoundsById.get(derivedCompoundRef.refid);
|
|
597
|
+
if (candidate instanceof Class) {
|
|
598
|
+
derivedClass = candidate;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
if (derivedClass !== undefined) {
|
|
602
|
+
lines.push(...derivedClass.renderIndexToLines());
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
if (this.collection.workspace.options.verbose) {
|
|
606
|
+
console.warn('Derived class id', derivedCompoundRef.refid, 'not a defined class');
|
|
607
|
+
}
|
|
608
|
+
const itemName = workspace.renderString(derivedCompoundRef.text.trim(), 'html');
|
|
609
|
+
lines.push('');
|
|
610
|
+
lines.push(...this.collection.workspace.renderMembersIndexItemToHtmlLines({
|
|
611
|
+
type: this.kind,
|
|
612
|
+
name: itemName,
|
|
613
|
+
}));
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
else {
|
|
617
|
+
const itemName = workspace.renderString(derivedCompoundRef.text.trim(), 'html');
|
|
618
|
+
lines.push('');
|
|
619
|
+
lines.push(...this.collection.workspace.renderMembersIndexItemToHtmlLines({
|
|
620
|
+
type: this.kind,
|
|
621
|
+
name: itemName,
|
|
622
|
+
}));
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
lines.push('');
|
|
626
|
+
lines.push('</table>');
|
|
627
|
+
}
|
|
628
|
+
else if ('derivedClassIds' in classs && classs.childrenIds.length > 0) {
|
|
629
|
+
lines.push('');
|
|
630
|
+
lines.push(`## Derived ${kindsPlurals[this.kind]}`);
|
|
631
|
+
lines.push('');
|
|
632
|
+
lines.push('<table class="doxyMembersIndex">');
|
|
633
|
+
for (const derivedClassId of classs.childrenIds) {
|
|
634
|
+
const { collection } = this;
|
|
635
|
+
const derivedClassCandidate = collection.collectionCompoundsById.get(derivedClassId);
|
|
636
|
+
if (derivedClassCandidate instanceof Class) {
|
|
637
|
+
// console.log(
|
|
638
|
+
// util.inspect(
|
|
639
|
+
// derivedCompoundDef,
|
|
640
|
+
// { compact: false, depth: 999 }
|
|
641
|
+
// )
|
|
642
|
+
// )
|
|
643
|
+
lines.push(...derivedClassCandidate.renderIndexToLines());
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
console.warn('Derived class id', derivedClassId, 'not a class');
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
lines.push('');
|
|
650
|
+
lines.push('</table>');
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
lines.push(...this.renderInnerIndicesToLines({
|
|
654
|
+
suffixes: [],
|
|
655
|
+
}));
|
|
656
|
+
lines.push(...this.renderSectionIndicesToLines());
|
|
657
|
+
lines.push(...this.renderDetailedDescriptionToHtmlLines({
|
|
658
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
659
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
660
|
+
todo: descriptionTodo,
|
|
661
|
+
showHeader: true,
|
|
662
|
+
showBrief: !this.hasSect1InDescription,
|
|
663
|
+
}));
|
|
664
|
+
if (this.locationLines !== undefined) {
|
|
665
|
+
lines.push(...this.locationLines);
|
|
666
|
+
}
|
|
667
|
+
lines.push(...this.renderSectionsToLines());
|
|
668
|
+
lines.push(...this.renderGeneratedFromToLines());
|
|
669
|
+
return lines;
|
|
670
|
+
}
|
|
671
|
+
renderIndexToLines() {
|
|
672
|
+
// console.log(util.inspect(this, { compact: false, depth: 999 }))
|
|
673
|
+
const lines = [];
|
|
674
|
+
const { workspace } = this.collection;
|
|
675
|
+
const permalink = workspace.getPagePermalink(this.id);
|
|
676
|
+
const indexName = this.collection.workspace.renderString(this.indexName, 'html');
|
|
677
|
+
const { kind: itemType } = this;
|
|
678
|
+
let itemName = '';
|
|
679
|
+
if (permalink !== undefined && permalink.length > 0) {
|
|
680
|
+
itemName = `<a href="${permalink}">${indexName}</a>`;
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
683
|
+
itemName = indexName;
|
|
684
|
+
}
|
|
685
|
+
lines.push('');
|
|
686
|
+
const childrenLines = [];
|
|
687
|
+
assert(permalink !== undefined);
|
|
688
|
+
const morePermalink = this.detailedDescriptionHtmlLines !== undefined
|
|
689
|
+
? `${permalink}/#details`
|
|
690
|
+
: undefined;
|
|
691
|
+
const briefDescriptionHtmlString = this.briefDescriptionHtmlString;
|
|
692
|
+
if ((briefDescriptionHtmlString ?? '').length > 0) {
|
|
693
|
+
childrenLines.push(this.renderBriefDescriptionToHtmlString({
|
|
694
|
+
briefDescriptionHtmlString,
|
|
695
|
+
morePermalink,
|
|
696
|
+
}));
|
|
697
|
+
}
|
|
698
|
+
lines.push(...this.collection.workspace.renderMembersIndexItemToHtmlLines({
|
|
699
|
+
type: itemType,
|
|
700
|
+
name: itemName,
|
|
701
|
+
childrenLines,
|
|
702
|
+
}));
|
|
703
|
+
return lines;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
// ----------------------------------------------------------------------------
|
|
707
|
+
//# sourceMappingURL=classes-vm.js.map
|