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
LocationRules Struct Reference

Holds the configuration a format needs to name its published files. More...

#include <locationplan.h>

Collaboration diagram for LocationRules:

Public Member Functions

QString outputPrefix (const Node *node) const
 Returns the file name prefix for node.
QString outputSuffix (const Node *node) const
 Returns the file name suffix for node.

Static Public Member Functions

static LocationRules fromConfig (const Config &configconfig, const QString &fileExtension)
 Reads the naming configuration from config for pages that use fileExtension.

Public Attributes

QString fileExtension
QString project
QHash< QString, QString > outputPrefixes
QHash< QString, QString > outputSuffixes

Detailed Description

Holds the configuration a format needs to name its published files.

\inmodule QDoc

The rules are a value type captured once per format. They replace the generator statics that the legacy pipeline reads while rendering, so a location can be planned without a generator instance.

Definition at line 22 of file locationplan.h.

Member Function Documentation

◆ fromConfig()

LocationRules LocationRules::fromConfig ( const Config & config,
const QString & fileExtension )
staticnodiscard

Reads the naming configuration from config for pages that use fileExtension.

This mirrors the values Generator::initialize() stores in statics, so a plan built from these rules names files exactly as the legacy pipeline does.

Definition at line 219 of file locationplan.cpp.

Referenced by processQdocconfFile().

Here is the caller graph for this function:

◆ outputPrefix()

QString LocationRules::outputPrefix ( const Node * node) const
nodiscard

Returns the file name prefix for node.

Only non-collection pages carry a prefix, so module and group pages keep their bare names.

Definition at line 241 of file locationplan.cpp.

◆ outputSuffix()

QString LocationRules::outputSuffix ( const Node * node) const
nodiscard

Returns the file name suffix for node.

Only pages carry a suffix.

Definition at line 251 of file locationplan.cpp.

Member Data Documentation

◆ fileExtension

QString LocationRules::fileExtension

Definition at line 24 of file locationplan.h.

◆ outputPrefixes

QHash<QString, QString> LocationRules::outputPrefixes

Definition at line 26 of file locationplan.h.

◆ outputSuffixes

QHash<QString, QString> LocationRules::outputSuffixes

Definition at line 27 of file locationplan.h.

◆ project

QString LocationRules::project

Definition at line 25 of file locationplan.h.


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