4#ifndef CLANGCODEPARSER_H
5#define CLANGCODEPARSER_H
11#include <QtCore/qtemporarydir.h>
12#include <QtCore/QStringList>
22struct ParsedCppFileIR {
23 std::vector<UntiedDocumentation> untied;
24 std::vector<TiedDocumentation> tied;
34 QString module_header,
35 const std::set<Config::HeaderFilePath>& all_headers,
36 const std::vector<QByteArray>& include_paths,
37 const QList<QByteArray>& defines
43 const std::set<Config::HeaderFilePath>& all_headers,
44 const QList<QByteArray>& defines,
55 const QString &fnSignature,
62 const std::set<Config::HeaderFilePath>& m_allHeaders;
63 QList<QByteArray> m_defines {};
64 std::vector<
const char *> m_args {};
74 const std::vector<QByteArray>& include_paths,
75 const QList<QByteArray>& defines,
83 std::set<Config::HeaderFilePath> m_allHeaders {};
84 const std::vector<QByteArray>& m_includePaths;
85 QList<QByteArray> m_defines {};
86 std::vector<
const char *> m_args {};
87 QStringList m_namespaceScope {};
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)
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 CodeParser * parserForSourceFile(const QString &filePath)
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.
bool asBool() const
Returns this config variable as a boolean.
The Config class contains the configuration variables for controlling how qdoc produces documentation...
const Location & location() const
const ExcludedPaths & getExcludedPaths()
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)
static void initialize(FileResolver &file_resolver)
static void terminate()
All the heap allocated variables are deleted.
Encapsulate the logic that QDoc uses to find files whose path is provided by the user and that are re...
HtmlGenerator(FileResolver &file_resolver)
The Location class provides a way to mark a location in a file.
static int exitCode()
Returns the error code QDoc should exit with; EXIT_SUCCESS or the number of documentation warnings if...
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 terminate()
Apparently, all this does is delete the regular expression used for intercepting certain error messag...
This class represents a C++ namespace.
Tree * tree() const override
Returns a pointer to the Tree that contains this NamespaceNode.
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.
WebXMLGenerator(FileResolver &file_resolver)
#define CONFIG_EXAMPLEDIRS
#define CONFIG_NOLINKERRORS
#define CONFIG_LOGPROGRESS
#define CONFIG_SOURCEDIRS
#define CONFIG_NAVIGATION
#define CONFIG_LANDINGPAGE
#define CONFIG_OUTPUTFORMATS
#define CONFIG_LANDINGTITLE
#define CONFIG_MODULEHEADER
#define CONFIG_INCLUDEPATHS
Combined button and popup list for selecting options.
This namespace holds QDoc-internal utility methods.
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.
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.
Processes parser errors and outputs warnings for them.