Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
DocumentationTraverser Class Reference

Traverses the node tree and dispatches to a handler for documentation generation. More...

#include <documentationtraverser.h>

Collaboration diagram for DocumentationTraverser:

Public Member Functions

 DocumentationTraverser ()=default
void traverse (Node *root, DocumentationHandler &handler)

Detailed Description

Traverses the node tree and dispatches to a handler for documentation generation.

DocumentationTraverser encapsulates the tree traversal logic that was previously embedded in Generator::generateDocumentation(). It handles:

\list

  • Filtering nodes (URL nodes, index nodes, excluded by policy, external pages).
  • Looking up the appropriate CodeMarker for each node.
  • Dispatching by node type to the handler's generate* methods.
  • Recursively processing child nodes. \endlist

The actual content generation and file lifecycle are delegated to an DocumentationHandler, enabling different generators to share traversal logic while implementing their own output strategies.

MyDocumentationHandler handler(writer, resolver);
traverser.traverse(rootNode, handler);
void traverse(Node *root, DocumentationHandler &handler)
DocumentationTraverser()=default
See also
DocumentationHandler, Generator, TemplateGenerator

Definition at line 14 of file documentationtraverser.h.

Constructor & Destructor Documentation

◆ DocumentationTraverser()

DocumentationTraverser::DocumentationTraverser ( )
default

Member Function Documentation

◆ traverse()

void DocumentationTraverser::traverse ( Node * root,
DocumentationHandler & handler )

Traverses the node tree starting from root, dispatching to handler for each documentable node.

Definition at line 61 of file documentationtraverser.cpp.

Referenced by TemplateGenerator::produce().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: