11#include <QtCore/qmap.h>
12#include <QtCore/qset.h>
13#include <QtCore/qstack.h>
14#include <QtCore/qstringlist.h>
24
25
26
27
35 ExpandVar(
int valueIndex,
int index, QString var,
const QChar &delim)
49 [[
nodiscard]] QString asString(
const QString defaultString = QString())
const;
57 ConfigVar(QString name,
const QStringList &values,
const QString &dir,
59 const QList<ExpandVar> &expandVars = QList<
ExpandVar>())
60 : m_name(std::move(name)), m_location(loc), m_expandVars(expandVars)
62 for (
const auto &v : values)
63 m_values << ConfigValue {v, dir};
71 QList<ConfigValue> m_values {};
73 QList<ExpandVar> m_expandVars {};
79
80
107 void init(
const QString &programName,
const QStringList &args);
114 void load(
const QString &fileName);
115 void setStringList(
const QString &var,
const QStringList &values);
116 void insertStringList(
const QString &var,
const QStringList &values);
118 void showHelp(
int exitCode = 0) { m_parser.showHelp(exitCode); }
126 auto it = m_configVars.constFind(var);
127 return (it != m_configVars.constEnd()) ? *it : empty;
129 [[
nodiscard]] QString getOutputDir(
const QString &format = QString(
"HTML"))
const;
131 [[
nodiscard]] QStringList getCanonicalPathList(
const QString &var,
133 [[
nodiscard]] QRegularExpression getRegExp(
const QString &var)
const;
134 [[
nodiscard]] QList<QRegularExpression> getRegExpList(
const QString &var)
const;
135 [[
nodiscard]] QSet<QString> subVars(
const QString &var)
const;
136 QStringList getAllFiles(
const QString &filesVar,
const QString &dirsVar,
137 const QSet<QString> &excludedDirs = QSet<QString>(),
138 const QSet<QString> &excludedFiles = QSet<QString>());
139 [[
nodiscard]] QString getIncludeFilePath(
const QString &fileName)
const;
141 const QSet<QString> &excludedFiles);
143 const QSet<QString> &excludedFiles);
144 QString getExampleProjectFile(
const QString &examplePath);
146 static QStringList loadMaster(
const QString &fileName);
147 static bool isFileExcluded(
const QString &fileName,
const QSet<QString> &excludedFiles);
148 static QStringList getFilesHere(
const QString &dir,
const QString &nameFilter,
150 const QSet<QString> &excludedDirs = QSet<QString>(),
151 const QSet<QString> &excludedFiles = QSet<QString>());
152 static QString findFile(
const Location &location,
const QStringList &files,
153 const QStringList &dirs,
const QString &fileName,
154 QString *userFriendlyFilePath =
nullptr);
155 static QString copyFile(
const Location &location,
const QString &sourceFilePath,
156 const QString &userFriendlySourceFilePath,
157 const QString &targetDirPath);
158 static int numParams(
const QString &value);
159 static void pushWorkingDir(
const QString &dir);
176 void setCurrentDir(
const QString &path) { m_currentDir = path; }
178 void setPreviousCurrentDir(
const QString &path) { m_previousCurrentDir = path; }
195 return std::tie(lhs.path, lhs.filename) <
std::tie(rhs.path, rhs.filename);
201 void processCommandLineOptions(
const QStringList &args);
202 void setIncludePaths();
204 void expandVariables();
206 QStringList m_dependModules {};
207 QStringList m_defines {};
208 QStringList m_includePaths {};
209 QStringList m_indexDirs {};
210 QStringList m_exampleFiles {};
211 QStringList m_exampleDirs {};
212 QString m_currentDir {};
213 QString m_previousCurrentDir {};
216 bool m_showInternal {
false };
223 static bool m_atomsDump;
225 static bool isMetaKeyChar(QChar ch);
226 void load(
Location location,
const QString &fileName);
232 static QMap<QString, QString> m_extractedDirs;
233 static QStack<QString> m_workingDirs;
234 static QMap<QString, QStringList> m_includeFilesMap;
324#define CONFIG_AUTOLINKERRORS ConfigStrings::AUTOLINKERRORS
325#define CONFIG_BUILDVERSION ConfigStrings::BUILDVERSION
326#define CONFIG_CODEINDENT ConfigStrings::CODEINDENT
327#define CONFIG_CODEPREFIX ConfigStrings::CODEPREFIX
328#define CONFIG_CODESUFFIX ConfigStrings::CODESUFFIX
329#define CONFIG_CPPCLASSESPAGE ConfigStrings::CPPCLASSESPAGE
330#define CONFIG_CPPCLASSESTITLE ConfigStrings::CPPCLASSESTITLE
331#define CONFIG_DEFINES ConfigStrings::DEFINES
332#define CONFIG_DEPENDS ConfigStrings::DEPENDS
333#define CONFIG_DESCRIPTION ConfigStrings::DESCRIPTION
334#define CONFIG_DOCBOOKEXTENSIONS ConfigStrings::DOCBOOKEXTENSIONS
335#define CONFIG_DOCUMENTATIONINHEADERS ConfigStrings::DOCUMENTATIONINHEADERS
336#define CONFIG_ENDHEADER ConfigStrings::ENDHEADER
337#define CONFIG_EXAMPLEDIRS ConfigStrings::EXAMPLEDIRS
338#define CONFIG_EXAMPLES ConfigStrings::EXAMPLES
339#define CONFIG_EXAMPLESINSTALLPATH ConfigStrings::EXAMPLESINSTALLPATH
340#define CONFIG_EXCLUDEDIRS ConfigStrings::EXCLUDEDIRS
341#define CONFIG_EXCLUDEFILES ConfigStrings::EXCLUDEFILES
342#define CONFIG_EXTRAIMAGES ConfigStrings::EXTRAIMAGES
343#define CONFIG_FALSEHOODS ConfigStrings::FALSEHOODS
344#define CONFIG_FORMATTING ConfigStrings::FORMATTING
345#define CONFIG_HEADERDIRS ConfigStrings::HEADERDIRS
346#define CONFIG_HEADERS ConfigStrings::HEADERS
347#define CONFIG_HEADERSCRIPTS ConfigStrings::HEADERSCRIPTS
348#define CONFIG_HEADERSTYLES ConfigStrings::HEADERSTYLES
349#define CONFIG_HOMEPAGE ConfigStrings::HOMEPAGE
350#define CONFIG_HOMETITLE ConfigStrings::HOMETITLE
351#define CONFIG_IGNOREDIRECTIVES ConfigStrings::IGNOREDIRECTIVES
352#define CONFIG_IGNORESINCE ConfigStrings::IGNORESINCE
353#define CONFIG_IGNORETOKENS ConfigStrings::IGNORETOKENS
354#define CONFIG_IGNOREWORDS ConfigStrings::IGNOREWORDS
355#define CONFIG_IMAGEDIRS ConfigStrings::IMAGEDIRS
356#define CONFIG_INCLUDEPATHS ConfigStrings::INCLUDEPATHS
357#define CONFIG_INCLUSIVE ConfigStrings::INCLUSIVE
358#define CONFIG_INDEXES ConfigStrings::INDEXES
359#define CONFIG_LANDINGPAGE ConfigStrings::LANDINGPAGE
360#define CONFIG_LANDINGTITLE ConfigStrings::LANDINGTITLE
361#define CONFIG_LANGUAGE ConfigStrings::LANGUAGE
362#define CONFIG_LOCATIONINFO ConfigStrings::LOCATIONINFO
363#define CONFIG_LOGPROGRESS ConfigStrings::LOGPROGRESS
364#define CONFIG_MACRO ConfigStrings::MACRO
365#define CONFIG_MANIFESTMETA ConfigStrings::MANIFESTMETA
366#define CONFIG_MODULEHEADER ConfigStrings::MODULEHEADER
367#define CONFIG_NATURALLANGUAGE ConfigStrings::NATURALLANGUAGE
368#define CONFIG_NAVIGATION ConfigStrings::NAVIGATION
369#define CONFIG_NOLINKERRORS ConfigStrings::NOLINKERRORS
370#define CONFIG_OUTPUTDIR ConfigStrings::OUTPUTDIR
371#define CONFIG_OUTPUTFORMATS ConfigStrings::OUTPUTFORMATS
372#define CONFIG_OUTPUTPREFIXES ConfigStrings::OUTPUTPREFIXES
373#define CONFIG_OUTPUTSUFFIXES ConfigStrings::OUTPUTSUFFIXES
374#define CONFIG_PRODUCTNAME ConfigStrings::PRODUCTNAME
375#define CONFIG_PROJECT ConfigStrings::PROJECT
376#define CONFIG_REDIRECTDOCUMENTATIONTODEVNULL ConfigStrings::REDIRECTDOCUMENTATIONTODEVNULL
377#define CONFIG_QHP ConfigStrings::QHP
378#define CONFIG_QUOTINGINFORMATION ConfigStrings::QUOTINGINFORMATION
379#define CONFIG_SCRIPTS ConfigStrings::SCRIPTS
380#define CONFIG_SHOWINTERNAL ConfigStrings::SHOWINTERNAL
381#define CONFIG_SINGLEEXEC ConfigStrings::SINGLEEXEC
382#define CONFIG_SOURCEDIRS ConfigStrings::SOURCEDIRS
383#define CONFIG_SOURCEENCODING ConfigStrings::SOURCEENCODING
384#define CONFIG_SOURCES ConfigStrings::SOURCES
385#define CONFIG_SPURIOUS ConfigStrings::SPURIOUS
386#define CONFIG_STYLESHEETS ConfigStrings::STYLESHEETS
387#define CONFIG_SYNTAXHIGHLIGHTING ConfigStrings::SYNTAXHIGHLIGHTING
388#define CONFIG_TABSIZE ConfigStrings::TABSIZE
389#define CONFIG_TAGFILE ConfigStrings::TAGFILE
390#define CONFIG_TIMESTAMPS ConfigStrings::TIMESTAMPS
391#define CONFIG_TOCTITLES ConfigStrings::TOCTITLES
392#define CONFIG_TRADEMARKSPAGE ConfigStrings::TRADEMARKSPAGE
393#define CONFIG_URL ConfigStrings::URL
394#define CONFIG_VERSION ConfigStrings::VERSION
395#define CONFIG_VERSIONSYM ConfigStrings::VERSIONSYM
396#define CONFIG_FILEEXTENSIONS ConfigStrings::FILEEXTENSIONS
397#define CONFIG_IMAGEEXTENSIONS ConfigStrings::IMAGEEXTENSIONS
398#define CONFIG_QMLTYPESPAGE ConfigStrings::QMLTYPESPAGE
399#define CONFIG_QMLTYPESTITLE ConfigStrings::QMLTYPESTITLE
400#define CONFIG_WARNABOUTMISSINGIMAGES ConfigStrings::WARNABOUTMISSINGIMAGES
401#define CONFIG_WARNABOUTMISSINGPROJECTFILES ConfigStrings::WARNABOUTMISSINGPROJECTFILES
402#define CONFIG_WARNINGLIMIT ConfigStrings::WARNINGLIMIT
int main(int argc, char *argv[])
[2]
std::optional< PCHFile > buildPCH(QDocDatabase *qdb, QString module_header, const std::set< Config::HeaderFilePath > &all_headers, const std::vector< QByteArray > &include_paths, const QList< QByteArray > &defines)
Building the PCH must be possible when there are no .cpp files, so it is moved here to its own member...
struct CXTranslationUnitImpl * CXTranslationUnit
ParsedCppFileIR parse_cpp_file(const QString &filePath)
Get ready to parse the C++ cpp file identified by filePath and add its parsed contents to the databas...
ClangCodeParser(QDocDatabase *qdb, Config &, const std::vector< QByteArray > &include_paths, const QList< QByteArray > &defines, std::optional< std::reference_wrapper< const PCHFile > > pch)
The ClassNode represents a C++ class.
static void initialize()
All the code markers in the static list are initialized here, after the qdoc configuration file has b...
static void terminate()
All the code markers in the static list are terminated here.
static const QSet< QString > common_meta_commands
virtual void initializeParser()=0
virtual void terminateParser()
Terminating a code parser is trivial.
CodeParser()
The constructor adds this code parser to the static list of code parsers.
static void setLink(Node *node, Node::LinkType linkType, const QString &arg)
virtual QString language()=0
virtual void parseSourceFile(const Location &location, const QString &filePath, CppCodeParser &cpp_code_parser)=0
static CodeParser * parserForLanguage(const QString &language)
static CodeParser * parserForSourceFile(const QString &filePath)
static bool isWorthWarningAbout(const Doc &doc)
Test for whether a doc comment warrants warnings.
virtual QStringList sourceFileNameFilter()=0
virtual ~CodeParser()
The destructor removes this code parser from the static list of code parsers.
static void extractPageLinkAndDesc(QStringView arg, QString *link, QString *desc)
static void initialize()
All the code parsers in the static list are initialized here, after the qdoc configuration variables ...
static void terminate()
All the code parsers in the static list are terminated here.
A class for holding the members of a collection of doc pages.
contains all the information for a single config variable in a .qdocconf file.
const Location & location() const
QStringList asStringList() const
Returns this config variable as a string list.
int asInt() const
Returns this configuration variable as an integer; iterates through the string list,...
bool asBool() const
Returns this config variable as a boolean.
QSet< QString > asStringSet() const
Returns this config variable as a string set.
The Config class contains the configuration variables for controlling how qdoc produces documentation...
QStringList & includePaths()
static QString installDir
std::set< HeaderFilePath > getHeaderFiles()
static bool generateExamples
const QString & programName() const
QStringList & indexDirs()
void reset()
Resets the Config instance - used by load()
bool getAtomsDump() const
void clear()
Clears the location and internal maps for config variables.
void showHelp(int exitCode=0)
QString currentDir() const
PathFlags
Flags used for retrieving canonicalized paths from Config.
const Location & location() const
const ExcludedPaths & getExcludedPaths()
QSet< QString > getOutputFormats() const
Function to return the correct outputformats.
static void popWorkingDir()
Pop the top entry from the stack of working directories.
static QSet< QString > overrideOutputFormats
static QString overrideOutputDir
QStringList & dependModules()
void setQDocPass(const QDocPass &pass)
bool showInternal() const
QStringList getExampleImageFiles(const QSet< QString > &excludedDirs, const QSet< QString > &excludedFiles)
QStringList qdocFiles() const
QString previousCurrentDir() const
QStringList getExampleQdocFiles(const QSet< QString > &excludedDirs, const QSet< QString > &excludedFiles)
CppCodeParser(FnCommandParser &&parser)
void processMetaCommands(const Doc &doc, Node *node)
The topic command has been processed, and now doc and node are passed to this function to get the met...
DocBookGenerator(FileResolver &file_resolver)
QSet< QString > parameterNames() const
Text legaleseText() const
QList< Text > alsoList() const
const Location & location() const
Returns the starting location of a qdoc comment.
Doc & operator=(const Doc &doc)
Doc(const Location &start_loc, const Location &end_loc, const QString &source, const QSet< QString > &metaCommandSet, const QSet< QString > &topics)
Parse the qdoc comment source.
const QList< Atom * > & tableOfContents() const
static void quoteFromFile(const Location &location, Quoter "er, ResolvedFile resolved_file)
bool isInternal() const
Returns true if the set of metacommands used in the doc comment contains {internal}...
bool hasTableOfContents() const
const QList< Atom * > & keywords() const
const Text & body() const
static void initialize(FileResolver &file_resolver)
QStringList omitEnumItemNames() const
const QList< Atom * > & targets() const
QMultiMap< ComparisonCategory, Text > * comparesWithMap() const
const QList< int > & tableOfContentsLevels() const
Text trimmedBriefText(const QString &className) const
ArgList metaCommandArgs(const QString &metaCommand) const
Text briefText(bool inclusive=false) const
const Location & startLocation() const
Returns the starting location of a qdoc comment.
bool isMarkedReimp() const
Returns true if the set of metacommands used in the doc comment contains {reimp}.
static void trimCStyleComment(Location &location, QString &str)
Trims the deadwood out of str.
static void terminate()
All the heap allocated variables are deleted.
TopicList topicsUsed() const
Returns a reference to the list of topic commands used in the current qdoc comment.
QStringMultiMap * metaTagMap() const
QSet< QString > metaCommandsUsed() const
void constructExtra() const
const QString & source() const
QStringList enumItemNames() const
Encapsulate the logic that QDoc uses to find files whose path is provided by the user and that are re...
std::optional< ResolvedFile > resolve(QString filename) const
Returns a ResolvedFile if query can be resolved or std::nullopt otherwise.
FileResolver(std::vector< DirectoryPath > &&search_directories)
Constructs an instance of FileResolver with the directories in search_directories as root directories...
const std::vector< DirectoryPath > & get_search_directories() const
Returns a const-reference to a collection of root search directories that this instance will use duri...
This node is used to represent any kind of function being documented.
HtmlGenerator(FileResolver &file_resolver)
The Location class provides a way to mark a location in a file.
QString fileName() const
Returns the file name part of the file path, ie the current file.
void fatal(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted error message and then exits the program.
QString fileSuffix() const
Returns the suffix of the file name.
const QString & filePath() const
Returns the current path and file name.
Location(const Location &other)
The copy constructor copies the contents of other into this Location using the assignment operator.
void error(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted error message.
int lineNo() const
Returns the current line number.
static int exitCode()
Returns the error code QDoc should exit with; EXIT_SUCCESS or the number of documentation warnings if...
void report(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted report message.
QString toString() const
Converts the location to a string to be prepended to error messages.
int columnNo() const
Returns the current column number.
static void initialize()
Gets several parameters from the config, including tab size, program name, and a regular expression t...
Location()
Constructs an empty location.
static void information(const QString &message)
Prints message to stdout followed by a {' '}.
void push(const QString &filePath)
Pushes filePath onto the file position stack.
static void internalError(const QString &hint)
Report a program bug, including the hint.
void start()
If the file position on top of the stack has a line number less than 1, set its line number to 1 and ...
void warning(const QString &message, const QString &details=QString()) const
Writes message and details to stderr as a formatted warning message.
void advance(QChar ch)
Advance the current file position, using ch to decide how to do that.
Location & operator=(const Location &other)
The assignment operator does a deep copy of the entire state of other into this Location.
bool isEmpty() const
Returns true if there is no file name set yet; returns false otherwise.
static void terminate()
Apparently, all this does is delete the regular expression used for intercepting certain error messag...
void pop()
Pops the top of the internal stack.
Location(const QString &filePath)
Constructs a location with (fileName, 1, 1) on its file position stack.
This class represents a C++ namespace.
Tree * tree() const override
Returns a pointer to the Tree that contains this NamespaceNode.
void markInternal()
Sets the node's access to Private and its status to Internal.
virtual void setLogicalModuleInfo(const QStringList &)
If this node is a CollectionNode, this function splits arg on the blank character to get a logical mo...
bool isGenericCollection() const
Returns true if the node type is Collection.
bool isExternalPage() const
Returns true if the node type is ExternalPage.
bool isDontDocument() const
Returns true if this node's status is DontDocument.
QString plainName() const
Returns this node's name member.
const Doc & doc() const
Returns a reference to the node's Doc data member.
virtual bool setTitle(const QString &)
Sets the node's title, which is used for the title of the documentation page, if one is generated for...
bool isQmlNode() const
Returns true if this node's Genus value is QML.
virtual void appendGroupName(const QString &)
virtual bool isStatic() const
Returns true if the FunctionNode represents a static function.
virtual QString logicalModuleIdentifier() const
If this is a CollectionNode, this function returns the logical module identifier.
void setUrl(const QString &url)
Sets the node's URL to url, which is the url to the page that the node represents.
virtual bool hasClasses() const
Returns true if this is a CollectionNode and its members list contains class nodes.
virtual bool hasNamespaces() const
Returns true if this is a CollectionNode and its members list contains namespace nodes.
bool isGroup() const
Returns true if the node type is Group.
const QString & reconstitutedBrief() const
virtual bool docMustBeGenerated() const
This function is called to perform a test to decide if the node must have documentation generated.
virtual bool isWrapper() const
Returns true if the node is a class node or a QML type node that is marked as being a wrapper class o...
bool isPrivate() const
Returns true if this node's access is Private.
virtual QString signature(Node::SignatureOptions) const
void Node::setGenus(Genus t) Sets this node's Genus to t.
bool isActive() const
Returns true if this node's status is Active.
void setAccess(Access t)
Sets the node's access type to t.
const Location & defLocation() const
Returns the Location where this node's dedefinition was seen.
void setIndexNodeFlag(bool isIndexNode=true)
Sets a flag in this Node that indicates the node was created for something in an index file.
QString fullName(const Node *relative=nullptr) const
Constructs and returns this node's full name.
virtual void setQmlModule(CollectionNode *)
If this is a QmlTypeNode, this function sets the QML type's QML module pointer to the CollectionNode ...
virtual QString qmlTypeName() const
If this is a QmlPropertyNode or a FunctionNode representing a QML method, this function returns the q...
virtual bool isAbstract() const
Returns true if the ClassNode or QmlTypeNode is marked abstract.
NodeType
An unsigned char value that identifies an object as a particular subclass of Node.
SharedCommentNode * sharedCommentNode()
bool isNamespace() const
Returns true if the node type is Namespace.
bool isTypedef() const
Returns true if the node type is Typedef.
bool isQmlBasicType() const
Returns true if the node type is QmlBasicType.
virtual QString logicalModuleVersion() const
If this is a CollectionNode, this function returns the logical module version number.
QString nodeTypeString() const
Returns this node's type as a string for use as an attribute value in XML or HTML.
ComparisonCategory comparisonCategory() const
virtual void addMember(Node *)
In a CollectionNode, this function adds node to the collection node's members list.
bool hasFileNameBase() const
Returns true if the node's file name base has been set.
bool isPage() const
Returns true if the node type is Page.
virtual QString qmlFullBaseName() const
If this is a QmlTypeNode, this function returns the QML full base name.
bool isFunction(Genus g=DontCare) const
Returns true if this is a FunctionNode and its Genus is set to g.
bool isQmlType() const
Returns true if the node type is QmlType or QmlValueType.
bool isSharedCommentNode() const
Returns true if the node type is SharedComment.
QString physicalModuleName() const
virtual void setCMakePackage(const QString &)
virtual void setDataType(const QString &)
If this node is a PropertyNode or a QmlPropertyNode, its data type data member is set to dataType.
virtual bool isInternal() const
Returns true if the node's status is Internal, or if its parent is a class with Internal status.
bool isHeader() const
Returns true if the node type is HeaderFile.
virtual bool isPageNode() const
Returns true if this node represents something that generates a documentation page.
void setFileNameBase(const QString &t)
Sets the node's file name base to t.
virtual bool isMacro() const
returns true if either FunctionNode::isMacroWithParams() or FunctionNode::isMacroWithoutParams() retu...
virtual bool isDefault() const
Returns true if the QML property node is marked as default.
bool isEnumType() const
Returns true if the node type is Enum.
bool isStruct() const
Returns true if the node type is Struct.
virtual bool isTextPageNode() const
Returns true if the node is a PageNode but not an Aggregate.
virtual bool isAttached() const
Returns true if the QML property or QML method node is marked as attached.
Aggregate * parent() const
Returns the node's parent pointer.
static bool fromFlagValue(FlagValue fv, bool defaultValue)
Converts the enum fv back to a boolean value.
bool isPublic() const
Returns true if this node's access is Public.
bool isVariable() const
Returns true if the node type is Variable.
void setLocation(const Location &t)
Sets the node's declaration location, its definition location, or both, depending on the suffix of th...
virtual void setClassNode(ClassNode *)
If this is a QmlTypeNode, this function sets the C++ class node to cn.
virtual ~Node()=default
The default destructor is virtual so any subclass of Node can be deleted by deleting a pointer to Nod...
QString plainFullName(const Node *relative=nullptr) const
Constructs and returns the node's fully qualified name by recursively ascending the parent links and ...
virtual bool isDeprecated() const
Returns true if this node's status is Deprecated.
virtual bool isAggregate() const
Returns true if this node is an aggregate, which means it inherits Aggregate and can therefore have c...
NodeType nodeType() const
Returns this node's type.
FlagValue
A value used in PropertyNode and QmlPropertyNode that can be -1, 0, or +1.
QString qualifyQmlName()
Returns the QML node's qualified name by prepending the logical module name.
void setSharedCommentNode(SharedCommentNode *t)
void setTemplateDecl(std::optional< RelaxedTemplateDeclaration > t)
virtual void setRelatedNonmember(bool b)
Sets a flag in the node indicating whether this node is a related nonmember of something.
virtual Node * clone(Aggregate *)
When reimplemented in a subclass, this function creates a clone of this node on the heap and makes th...
virtual void markReadOnly(bool)
If this node is a QmlPropertyNode, then the property's read-only flag is set to flag.
void setComparisonCategory(const ComparisonCategory &category)
static bool nodeNameLessThan(const Node *first, const Node *second)
Returns true if the node n1 is less than node n2.
QString qualifyCppName()
Returns the CPP node's qualified name by prepending the namespaces name + "::" if there isw a namespa...
ThreadSafeness inheritedThreadSafeness() const
If this node has a parent, the parent's thread safeness value is returned.
const Location & location() const
If this node's definition location is empty, this function returns this node's declaration location.
bool isProxyNode() const
Returns true if the node type is Proxy.
virtual bool wasSeen() const
Returns the seen flag data member of this node if it is a NamespaceNode or a CollectionNode.
const std::optional< RelaxedTemplateDeclaration > & templateDecl() const
Access access() const
Returns the node's Access setting, which can be Public, Protected, or Private.
virtual void setWrapper()
If this node is a ClassNode or a QmlTypeNode, the node's wrapper flag data member is set to true.
virtual QString cmakeComponent() const
virtual void markDefault()
If this node is a QmlPropertyNode, it is marked as the default property.
ThreadSafeness threadSafeness() const
Returns the thread safeness value for whatever this node represents.
virtual QString qtVariable() const
If this node is a CollectionNode, its QT variable is returned.
Genus
An unsigned char value that specifies whether the Node represents a C++ element, a QML element,...
virtual QString logicalModuleName() const
If this is a CollectionNode, this function returns the logical module name.
virtual bool isFirstClassAggregate() const
Returns true if this Node is an Aggregate but not a ProxyNode.
virtual bool isMarkedReimp() const
Returns true if the FunctionNode is marked as a reimplemented function.
bool isProperty() const
Returns true if the node type is Property.
virtual QString cmakePackage() const
QString fullDocumentName() const
Construct the full document name for this node and return it.
QString url() const
Returns the node's URL, which is the url of the documentation page created for the node or the url of...
bool isTypeAlias() const
Returns true if the node type is Typedef.
virtual Tree * tree() const
Returns a pointer to the Tree this node is in.
const Location & declLocation() const
Returns the Location where this node's declaration was seen.
void setDoc(const Doc &doc, bool replace=false)
Sets this Node's Doc to doc.
virtual QString title() const
Returns a string that can be used to print a title in the documentation for whatever this Node is.
virtual void setCMakeComponent(const QString &)
virtual bool setSubtitle(const QString &)
Sets the node's subtitle, which is used for the subtitle of the documentation page,...
bool isModule() const
Returns true if the node type is Module.
virtual bool isAlias() const
Returns true if this QML property is marked as an alias.
virtual QString element() const
If this node is a QmlPropertyNode or a FunctionNode, this function returns the name of the parent nod...
virtual QString subtitle() const
Returns a string that can be used to print a subtitle in the documentation for whatever this Node is.
Node(NodeType type, Aggregate *parent, QString name)
Construct a node with the given type and having the given parent and name.
virtual ClassNode * classNode()
If this is a QmlTypeNode, this function returns the pointer to the C++ ClassNode that this QML type r...
bool isClass() const
Returns true if the node type is Class.
const QString & fileNameBase() const
Returns the node's file name base string, which is built once, when Generator::fileBase() is called a...
virtual bool isPropertyGroup() const
Returns true if the node is a SharedCommentNode for documenting multiple C++ properties or multiple Q...
Genus genus() const
Returns this node's Genus.
ThreadSafeness
An unsigned char that specifies the degree of thread-safeness of the element.
virtual QString fullTitle() const
Returns a string that can be used as the full title for the documentation of this node.
static QString nodeTypeString(NodeType t)
Returns the node type t as a string for use as an attribute value in XML or HTML.
bool isSharingComment() const
This function returns true if the node is sharing a comment with other nodes.
virtual void setCMakeTargetItem(const QString &)
virtual CollectionNode * logicalModule() const
If this is a QmlTypeNode, a pointer to its QML module is returned, which is a pointer to a Collection...
QString since() const
Returns the node's since string, which can be empty.
virtual void setAbstract(bool)
If this node is a ClassNode or a QmlTypeNode, the node's abstract flag data member is set to b.
bool hasDoc() const
Returns true if this node is documented, or it represents a documented node read from the index ('had...
void setParent(Aggregate *n)
Sets the node's parent pointer to n.
bool isPreliminary() const
Returns true if this node's status is Preliminary.
static FlagValue toFlagValue(bool b)
Converts the boolean value b to an enum representation of the boolean type, which includes an enum va...
void setReconstitutedBrief(const QString &t)
When reading an index file, this function is called with the reconstituted brief clause t to set the ...
LinkType
An unsigned char value that probably should be moved out of the Node base class.
virtual bool hasTag(const QString &) const
If this node is a FunctionNode, the function returns true if the function has the tag t.
virtual QString cmakeTargetItem() const
bool isRelatedNonmember() const
Returns true if this is a related nonmember of something.
void setSince(const QString &since)
Sets the information about the project and version a node was introduced in, unless the version is lo...
virtual bool isClassNode() const
Returns true if this is an instance of ClassNode.
bool isCppNode() const
Returns true if this node's Genus value is CPP.
void setStatus(Status t)
Sets the node's status to t.
QString extractClassName(const QString &string) const
Extract a class name from the type string and return it.
void setDeprecated(const QString &sinceVersion)
Sets the Node status to Node::Deprecated, unless sinceVersion represents a future version.
virtual bool isRelatableType() const
Returns true if this node is something you can relate things to with the relates command.
virtual bool isCollectionNode() const
Returns true if this is an instance of CollectionNode.
static bool nodeSortKeyOrNameLessThan(const Node *n1, const Node *n2)
Returns true if node n1 is less than node n2 when comparing the sort keys, defined with.
void setThreadSafeness(ThreadSafeness t)
Sets the node's thread safeness to t.
void setPhysicalModuleName(const QString &name)
Sets the node's physical module name.
Status
An unsigned char that specifies the status of the documentation element in the documentation set.
bool isQmlModule() const
Returns true if the node type is QmlModule.
@ SignatureTemplateParams
bool isProtected() const
Returns true if this node's access is Protected.
bool isExample() const
Returns true if the node type is Example.
QString qualifyWithParentName()
Return the name of this node qualified with the parent name and "::" if there is a parent name.
bool isIndexNode() const
Returns true if this node was created from something in an index file.
QString plainSignature() const
Constructs and returns the node's fully qualified signature by recursively ascending the parent links...
Status status() const
Returns the node's status value.
bool isUnion() const
Returns true if the node type is Union.
const QString & deprecatedSince() const
bool isQmlProperty() const
Returns true if the node type is QmlProperty.
virtual void setQtVariable(const QString &)
If this node is a CollectionNode, its QT variable is set to v.
const QString & name() const
Returns the node's name data member.
static Genus getGenus(NodeType t)
Determines the appropriate Genus value for the NodeType value t and returns that Genus value.
A PageNode is a Node that generates a documentation page.
The Parameter class describes one function parameter.
const QString & type() const
void set(const QString &type, const QString &name, const QString &defaultValue=QString())
const QString & name() const
void setDefaultValue(const QString &t)
Parameter(QString type, QString name=QString(), QString defaultValue=QString())
QString signature(bool includeValue=false) const
Reconstructs the text signature for the parameter and returns it.
void setCanonicalType(const QString &t)
void setName(const QString &name)
const QString & canonicalType() const
const QString & defaultValue() const
A class for parsing and managing a function parameter list.
Parameter & operator[](int index)
const ParameterVector & parameters() const
void append(const QString &type)
QSet< QString > getNames() const
Insert all the parameter names into names.
bool match(const Parameters ¶meters) const
Returns true if parameters contains the same parameter signature as this.
Parameters(const QString &signature)
QString rawSignature(bool names=false, bool values=false) const
Returns the signature of all the parameters with all the spaces and commas removed.
QString generateTypeList() const
Construct a list of the parameter types and return it.
bool isPrivateSignal() const
const Parameter & at(int i) const
void append(const QString &type, const QString &name)
QString signature(bool includeValues=false) const
Returns the list of reconstructed parameters.
const Parameter & last() const
QString generateTypeAndNameList() const
Construct a list of the parameter type/name pairs and return it.
void append(const QString &type, const QString &name, const QString &value)
Append a Parameter constructed from type, name, and value to the parameter vector.
void set(const QString &signature)
Parse the parameter signature by splitting the string, and store the individual parameters in the par...
This class describes one instance of using the Q_PROPERTY macro.
PureDocParser(const Location &location)
This class provides exclusive access to the qdoc database, which consists of a forrest of trees and a...
static void destroyQdocDB()
Destroys the singleton.
static QDocDatabase * qdocDB()
Creates the singleton.
NamespaceNode * primaryTreeRoot()
Returns a pointer to the root node of the primary tree.
void processForest()
This function calls a set of functions for each tree in the forest that has not already been analyzed...
void resolveStuff()
Performs several housekeeping tasks prior to generating the documentation.
static void terminate()
Clear the static maps so that subsequent runs don't try to use contents from a previous run.
SourceFileParser(ClangCodeParser &clang_parser, PureDocParser &pure_parser)
static void terminate()
The heap allocated variables are freed here.
This class constructs and maintains a tree of instances of the subclasses of Node.
WebXMLGenerator(FileResolver &file_resolver)
#define COMMAND_QMLINHERITS
#define COMMAND_MODULESTATE
#define COMMAND_NONREENTRANT
#define COMMAND_DEPRECATED
#define COMMAND_PRELIMINARY
#define COMMAND_CMAKETARGETITEM
#define COMMAND_REENTRANT
#define COMMAND_STARTPAGE
#define COMMAND_QMLDEFAULT
#define COMMAND_QMLABSTRACT
#define COMMAND_QTVARIABLE
#define COMMAND_QTCMAKEPACKAGE
#define COMMAND_NOAUTOLIST
#define COMMAND_QTCMAKETARGETITEM
#define COMMAND_THREADSAFE
#define COMMAND_CMAKECOMPONENT
#define COMMAND_QMLREADONLY
#define COMMAND_QMLENUMERATORSFROM
#define COMMAND_INPUBLICGROUP
#define COMMAND_QMLREQUIRED
#define COMMAND_ATTRIBUTION
#define COMMAND_INQMLMODULE
#define COMMAND_CMAKEPACKAGE
static std::string comparisonCategoryAsString(ComparisonCategory category)
static ComparisonCategory comparisonCategoryFromString(const std::string &string)
#define CONFIG_SINGLEEXEC
#define CONFIG_EXAMPLEDIRS
QMap< QString, ConfigVar > ConfigVarMap
#define CONFIG_NOLINKERRORS
#define CONFIG_LOGPROGRESS
#define CONFIG_SOURCEDIRS
#define CONFIG_DOCUMENTATIONINHEADERS
#define CONFIG_NAVIGATION
#define CONFIG_LANDINGPAGE
#define CONFIG_OUTPUTFORMATS
#define CONFIG_LANDINGTITLE
#define CONFIG_MODULEHEADER
#define CONFIG_HEADERDIRS
#define CONFIG_INCLUDEPATHS
Q_DECLARE_TYPEINFO(Doc, Q_RELOCATABLE_TYPE)
std::pair< QString, QString > ArgPair
QMultiMap< QString, QString > QStringMultiMap
QHash< QString, Macro > QHash_QString_Macro
QT_BEGIN_NAMESPACE typedef QHash< QString, int > QHash_QString_int
Q_DECLARE_TYPEINFO(Location, Q_COMPLEX_TYPE)
Q_DECLARE_TYPEINFO(Location::StackEntry, Q_RELOCATABLE_TYPE)
Combined button and popup list for selecting options.
This namespace holds QDoc-internal utility methods.
QMultiMap< QString, CollectionNode * > CNMultiMap
QList< ClassNode * > ClassList
QList< Node * > NodeVector
QMap< QString, NodeMultiMap > NodeMultiMapMap
QMap< QString, Node * > NodeMap
QMap< QString, NodeMap > NodeMapMap
QMap< QString, CollectionNode * > CNMap
QMultiMap< QString, Node * > NodeMultiMap
QList< Parameter > ParameterVector
static void parseSourceFiles(std::vector< QString > &&sources, SourceFileParser &source_file_parser, CppCodeParser &cpp_code_parser)
static void singleExecutionMode()
void logStartEndMessage(const QLatin1String &startStop, Config &config)
static void processQdocconfFile(const QString &fileName)
Processes the qdoc config file fileName.
static void clearModuleDependenciesAndProcessQdocconfFile(const QStringList &qdocFiles)
static void dualExecutionMode()
bool creationTimeBefore(const QFileInfo &fi1, const QFileInfo &fi2)
static void loadIndexFiles(const QSet< QString > &formats)
Read some XML indexes containing definitions from other documentation sets.
#define QDOC_REFINED_TYPEDEF(_type, _name)
\macro QDOC_REFINED_TYPEDEF(_type, _name)
static QString AUTOLINKERRORS
static QString HEADERSTYLES
static QString IGNORESINCE
static QString CODESUFFIX
static QString EXAMPLEDIRS
static QString CODEINDENT
static QString HEADERDIRS
static QString NATURALLANGUAGE
static QString WARNABOUTMISSINGPROJECTFILES
static QString SINGLEEXEC
static QString SOURCEDIRS
static QString IGNOREDIRECTIVES
static QString EXCLUDEDIRS
static QString FILEEXTENSIONS
static QString OUTPUTFORMATS
static QString REDIRECTDOCUMENTATIONTODEVNULL
static QString LANDINGPAGE
static QString MODULEHEADER
static QString CPPCLASSESPAGE
static QString PRODUCTNAME
static QString BUILDVERSION
static QString DOCBOOKEXTENSIONS
static QString VERSIONSYM
static QString IMAGEEXTENSIONS
static QString EXAMPLESINSTALLPATH
static QString HEADERSCRIPTS
static QString SOURCEENCODING
static QString IGNORETOKENS
static QString NAVIGATION
static QString SYNTAXHIGHLIGHTING
static QString IGNOREWORDS
static QString INCLUDEPATHS
static QString WARNINGLIMIT
static QString STYLESHEETS
static QString LANDINGTITLE
static QString CODEPREFIX
static QString LOGPROGRESS
static QString FALSEHOODS
static QString TRADEMARKSPAGE
static QString QMLTYPESPAGE
static QString EXCLUDEFILES
static QString EXTRAIMAGES
static QString NOLINKERRORS
static QString LOCATIONINFO
static QString TIMESTAMPS
static QString WARNABOUTMISSINGIMAGES
static QString DOCUMENTATIONINHEADERS
static QString SHOWINTERNAL
static QString CPPCLASSESTITLE
static QString QUOTINGINFORMATION
static QString FORMATTING
static QString MANIFESTMETA
static QString OUTPUTPREFIXES
static QString DESCRIPTION
static QString OUTPUTSUFFIXES
static QString QMLTYPESTITLE
QSet< QString > excluded_directories
QSet< QString > excluded_files
QHash_QString_Macro macroHash
QHash_QString_int cmdHash
FnCommandParser(QDocDatabase *qdb, const std::set< Config::HeaderFilePath > &all_headers, const QList< QByteArray > &defines, std::optional< std::reference_wrapper< const PCHFile > > pch)
std::variant< Node *, FnMatchError > operator()(const Location &location, const QString &fnSignature, const QString &idTag, QStringList context)
Use clang to parse the function signature from a function command.
Encapsulates information about.
ImportRec(QString name, QString version, QString importUri, QStringView importId)
QString m_majorMinorVersion
Simple structure used by the Doc and DocParser classes.
Location m_defaultDefLocation
QMap< QString, QString > m_otherDefs
Processes parser errors and outputs warnings for them.
void operator()(const FnMatchError &e) const
Generates a warning specific to FnMatchError.
QString to_qstring() const
ValuedDeclaration valued_declaration
std::optional< TemplateDeclarationStorage > template_declaration
std::string to_std_string() const
@ NonTypeTemplateParameter
@ TemplateTemplateParameter
Represents a file that is reachable by QDoc based on its current configuration.
const QString & get_path() const
Returns a string representing the canonicalized path to the file that was resolved.
ResolvedFile(QString query, FilePath filepath)
Constructs an instance of this type from query and filepath.
const QString & get_query() const
Returns a string representing the user-inputted path that was used to resolve the file.
std::vector< RelaxedTemplateParameter > parameters
std::string to_std_string() const
Topic(QString &t, QString a)
std::string to_std_string(PrintingPolicy policy=default_printing_policy()) const
static PrintingPolicy default_printing_policy()
bool are_template_declarations_substitutable(const TemplateDeclarationStorage &left, const TemplateDeclarationStorage &right)