![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Generates documentation using external templates and a pre-built IR. More...
#include <templategenerator.h>
Public Member Functions | |
| TemplateGenerator (FileResolver &fileResolver, QDocDatabase &qdb, const QString &format=QString()) | |
| ~TemplateGenerator () override | |
| void | prepare () override |
| Prepares the producer for an output run. | |
| void | produce () override |
| Produces documentation output. | |
| void | finalize () override |
| Finalizes output production. | |
| QString | format () const override |
| Returns the format identifier for this producer (e.g., "HTML", "DocBook", "template"). | |
| void | beginDocument (const QString &fileName) override |
| void | endDocument () override |
| QString | fileName (const Node *node) const override |
| void | generateCollectionNode (CollectionNode *cn, CodeMarker *marker) override |
| void | generateGenericCollectionPage (CollectionNode *cn, CodeMarker *marker) override |
| void | generatePageNode (PageNode *pn, CodeMarker *marker) override |
| void | generateCppReferencePage (Aggregate *aggregate, CodeMarker *marker) override |
| void | generateQmlTypePage (QmlTypeNode *qcn, CodeMarker *marker) override |
| void | generateProxyPage (Aggregate *aggregate, CodeMarker *marker) override |
| void | mergeCollections (CollectionNode *cn) override |
| QString | fileExtension () const |
| Public Member Functions inherited from OutputProducer | |
| virtual | ~OutputProducer ()=default |
| Public Member Functions inherited from DocumentationHandler | |
| virtual | ~DocumentationHandler ()=default |
Friends | |
| class | TemplateGeneratorTest |
Generates documentation using external templates and a pre-built IR.
TemplateGenerator implements OutputProducer and DocumentationHandler to generate documentation without inheriting from Generator. It uses DocumentationTraverser for tree traversal and delegates content generation to templates via the IR system.
The generator follows a composition-based design: \list
TemplateGenerator implements OutputProducer and DocumentationHandler to generate documentation without inheriting from Generator. It uses DocumentationTraverser for tree traversal and delegates content generation to templates via the IR system.
The generator follows a composition-based design: \list
Definition at line 47 of file templategenerator.h.
|
explicit |
Definition at line 73 of file templategenerator.cpp.
References TemplateGenerator(), OutputProducerRegistry::instance(), and OutputProducerRegistry::registerProducer().
Referenced by TemplateGenerator().
|
override |
Definition at line 82 of file templategenerator.cpp.
References OutputProducerRegistry::instance(), and OutputProducerRegistry::unregisterProducer().
Implements DocumentationHandler.
Definition at line 200 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 206 of file templategenerator.cpp.
|
nodiscard |
Definition at line 353 of file templategenerator.cpp.
Implements DocumentationHandler.
Definition at line 212 of file templategenerator.cpp.
References Node< _Tp >::isCollectionNode(), and Node< _Tp >::isTextPageNode().
|
overridevirtual |
Finalizes output production.
Called once per format at the end of the run.
Implements OutputProducer.
Definition at line 190 of file templategenerator.cpp.
|
nodiscardoverridevirtual |
Returns the format identifier for this producer (e.g., "HTML", "DocBook", "template").
Used for format selection and matching. The identifier is case-sensitive and must match the value used in configuration files.
Implements OutputProducer.
Definition at line 195 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 234 of file templategenerator.cpp.
References IR::Builder::buildPageIR(), and NodeExtractor::extractPageMetadata().
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 282 of file templategenerator.cpp.
References IR::Builder::buildPageIR(), NodeExtractor::extractAllMembersIR(), and NodeExtractor::extractPageMetadata().
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 250 of file templategenerator.cpp.
References IR::Builder::buildPageIR(), and NodeExtractor::extractPageMetadata().
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 266 of file templategenerator.cpp.
References IR::Builder::buildPageIR(), and NodeExtractor::extractPageMetadata().
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 335 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 312 of file templategenerator.cpp.
References IR::Builder::buildPageIR(), NodeExtractor::extractAllMembersIR(), and NodeExtractor::extractPageMetadata().
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 348 of file templategenerator.cpp.
References QDocDatabase::mergeCollections().
|
overridevirtual |
Prepares the producer for an output run.
Called once per format after configuration is loaded.
Implements OutputProducer.
Definition at line 87 of file templategenerator.cpp.
References Generator::autolinkErrors(), Config::createInclusionPolicy(), Generator::noLinkErrors(), and Generator::qmlTypeContext().
|
overridevirtual |
Produces documentation output.
Called after prepare() to create the actual documentation files.
Implements OutputProducer.
Definition at line 182 of file templategenerator.cpp.
References QDocDatabase::primaryTreeRoot(), and DocumentationTraverser::traverse().
|
friend |
Definition at line 107 of file templategenerator.h.