CppTools: Move DependencyTable to Snapshot

It logically depends on the Snapshot and has a related lifetime.
Keeping it in the Snapshot avoids some code compelxity.

Change-Id: I24ee4483b44d9b0d7f2e4d494ae7ea624b949f9c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
hjk
2014-09-11 13:15:44 +02:00
parent 0273757c93
commit 9a968b7417
13 changed files with 35 additions and 133 deletions

View File

@@ -44,15 +44,11 @@ class Snapshot;
class CPLUSPLUS_EXPORT DependencyTable
{
public:
bool isValidFor(const Snapshot &snapshot) const;
QStringList filesDependingOn(const QString &fileName) const;
QHash<QString, QStringList> dependencyTable() const;
void build(const Snapshot &snapshot);
private:
friend class Snapshot;
void build(const Snapshot &snapshot);
QStringList filesDependingOn(const QString &fileName) const;
QHash<QString, QStringList> includesPerFile;
QVector<QString> files;
QHash<QString, int> fileIndex;