![]() |
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 45 of file templategenerator.h.
|
explicit |
Definition at line 67 of file templategenerator.cpp.
References TemplateGenerator(), OutputProducerRegistry::instance(), and OutputProducerRegistry::registerProducer().
Referenced by TemplateGenerator().
|
override |
Definition at line 76 of file templategenerator.cpp.
References OutputProducerRegistry::instance(), and OutputProducerRegistry::unregisterProducer().
Implements DocumentationHandler.
Definition at line 148 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 154 of file templategenerator.cpp.
|
nodiscard |
Definition at line 262 of file templategenerator.cpp.
Implements DocumentationHandler.
Definition at line 160 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 138 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 143 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 182 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 218 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 194 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 206 of file templategenerator.cpp.
References IR::Builder::buildPageIR(), and NodeExtractor::extractPageMetadata().
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 244 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 231 of file templategenerator.cpp.
|
overridevirtual |
Implements DocumentationHandler.
Definition at line 257 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 81 of file templategenerator.cpp.
|
overridevirtual |
Produces documentation output.
Called after prepare() to create the actual documentation files.
Implements OutputProducer.
Definition at line 130 of file templategenerator.cpp.
References QDocDatabase::primaryTreeRoot(), and DocumentationTraverser::traverse().
|
friend |
Definition at line 95 of file templategenerator.h.