summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qdocindexfiles.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-09-24 09:54:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-26 10:12:04 +0200
commit4b21631f595b80a692d30e3f8960ff8d6fcc5c4a (patch)
tree65e7add82fe800a14dc6847bce8bde58249eb640 /src/tools/qdoc/qdocindexfiles.h
parentd8cebcdf67ddebb3bce89a08c7ffab4cc9bf4107 (diff)
qdoc: retrying More refactoring of qdoc data structures
This commit is the second phase of a significant overhaul of qdoc. Two new classes, QDocIndexFiles, and QDocTagFiles, are added to encapsulate the creation and use of the qdoc index files, and the creation of the qdoc tag file. Change-Id: I94651b10628e535ea7b26bd8256037cd819ccea7 Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/qdocindexfiles.h')
-rw-r--r--src/tools/qdoc/qdocindexfiles.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/src/tools/qdoc/qdocindexfiles.h b/src/tools/qdoc/qdocindexfiles.h
new file mode 100644
index 0000000000..c53e62dddf
--- /dev/null
+++ b/src/tools/qdoc/qdocindexfiles.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDOCINDEXFILES_H
+#define QDOCINDEXFILES_H
+
+#include "node.h"
+
+QT_BEGIN_NAMESPACE
+
+class Atom;
+class Generator;
+class QStringList;
+class QDocDatabase;
+class QDomElement;
+class QXmlStreamWriter;
+
+class QDocIndexFiles
+{
+ friend class QDocDatabase;
+
+ private:
+ static QDocIndexFiles* qdocIndexFiles();
+ static void destroyQDocIndexFiles();
+
+ QDocIndexFiles();
+ ~QDocIndexFiles();
+
+ void readIndexes(const QStringList& indexFiles);
+ void generateIndex(const QString& fileName,
+ const QString& url,
+ const QString& title,
+ Generator* g,
+ bool generateInternalNodes = false);
+
+ void readIndexFile(const QString& path);
+ void readIndexSection(const QDomElement& element, InnerNode* parent, const QString& indexUrl);
+ void resolveIndex();
+ bool generateIndexSection(QXmlStreamWriter& writer, Node* node, bool generateInternalNodes = false);
+ void generateIndexSections(QXmlStreamWriter& writer, Node* node, bool generateInternalNodes = false);
+
+ private:
+ static QDocIndexFiles* qdocIndexFiles_;
+ QDocDatabase* qdb_;
+ Generator* gen_;
+ QList<QPair<ClassNode*,QString> > basesList_;
+ QList<QPair<FunctionNode*,QString> > relatedList_;
+
+};
+
+QT_END_NAMESPACE
+
+#endif