diff options
| author | Martin Smith <martin.smith@nokia.com> | 2012-09-13 11:38:45 +0200 |
|---|---|---|
| committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-14 15:23:15 +0200 |
| commit | 14f7eb86ca2275d91f284279af5f77205d4ae3c0 (patch) | |
| tree | ed4e91d6422dd814ac3e81739ad4a3b55bf050c7 /src/tools/qdoc/cppcodeparser.h | |
| parent | 817a4474676b30a964de476d26bd70ddba3d379a (diff) | |
qdoc: Refactoring of qdoc data structures
This commit is the beginning of a significant
overhaul of qdoc. A new class, QDocDatabase, is
added, which will eventually encapsulate all the
data structures used by qdoc. In this commit, the
Tree class is made private and only accessible
from QDocDatabase. Several maps structures are
also moved into QDocDatabase from other classes.
Much dead code and unused parameters were removed.
Further simplification will follow.
Change-Id: I237411c50f3ced0d2fc8d3b0fbfdf4e55880f8e9
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodeparser.h')
| -rw-r--r-- | src/tools/qdoc/cppcodeparser.h | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/src/tools/qdoc/cppcodeparser.h b/src/tools/qdoc/cppcodeparser.h index e67abb7b533..a6e78af5a1d 100644 --- a/src/tools/qdoc/cppcodeparser.h +++ b/src/tools/qdoc/cppcodeparser.h @@ -39,10 +39,6 @@ ** ****************************************************************************/ -/* - cppcodeparser.h -*/ - #ifndef CPPCODEPARSER_H #define CPPCODEPARSER_H @@ -70,19 +66,10 @@ public: virtual QString language(); virtual QStringList headerFileNameFilter(); virtual QStringList sourceFileNameFilter(); - virtual void parseHeaderFile(const Location& location, - const QString& filePath, - Tree *tree); - virtual void parseSourceFile(const Location& location, - const QString& filePath, - Tree *tree); - virtual void doneParsingHeaderFiles(Tree *tree); - virtual void doneParsingSourceFiles(Tree *tree); - - const FunctionNode *findFunctionNode(const QString& synopsis, - Tree *tree, - Node *relative = 0, - bool fuzzy = false); + virtual void parseHeaderFile(const Location& location, const QString& filePath); + virtual void parseSourceFile(const Location& location, const QString& filePath); + virtual void doneParsingHeaderFiles(); + virtual void doneParsingSourceFiles(); protected: virtual QSet<QString> topicCommands(); @@ -109,7 +96,7 @@ protected: void processOtherMetaCommands(const Doc& doc, Node *node); protected: - void reset(Tree *tree); + void reset(); void readToken(); const Location& location(); QString previousLexeme(); @@ -157,19 +144,17 @@ protected: void parseQiteratorDotH(const Location &location, const QString &filePath); void instantiateIteratorMacro(const QString &container, const QString &includeFile, - const QString ¯oDef, - Tree *tree); + const QString ¯oDef); void createExampleFileNodes(DocNode *dn); protected: QMap<QString, Node::Type> nodeTypeMap; - Tree* tree_; Tokenizer *tokenizer; int tok; Node::Access access; FunctionNode::Metaness metaness; QString moduleName; - QStringList lastPath; + QStringList lastPath_; QRegExp varComment; QRegExp sep; QSet<QString> activeNamespaces_; |
