summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/CppDocument.h
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-06-03 16:16:20 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2009-06-03 16:16:20 +0200
commitfd62025d633318d4ae1b76827d50def1e50c98ed (patch)
tree0b7783a9efadfc66a15999f22cbc820ba22fd849 /src/libs/cplusplus/CppDocument.h
parentd18b0195e527c25b5a0a8bd9d2c1f3b5ace61793 (diff)
downloadqt-creator-fd62025d633318d4ae1b76827d50def1e50c98ed.tar.gz
Say hello to Snapshot::documentFromSource(), Snapshot::preprocessedCode() and Snapshot::globalNamespaceBinding().
Diffstat (limited to 'src/libs/cplusplus/CppDocument.h')
-rw-r--r--src/libs/cplusplus/CppDocument.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libs/cplusplus/CppDocument.h b/src/libs/cplusplus/CppDocument.h
index 01da6b62d2..e5ead40141 100644
--- a/src/libs/cplusplus/CppDocument.h
+++ b/src/libs/cplusplus/CppDocument.h
@@ -45,6 +45,7 @@ namespace CPlusPlus {
class Macro;
class MacroArgumentReference;
+class NamespaceBinding;
class CPLUSPLUS_EXPORT Document
{
@@ -257,6 +258,8 @@ private:
QList<Block> _skippedBlocks;
QList<MacroUse> _macroUses;
QByteArray _source;
+
+ friend class Snapshot;
};
class CPLUSPLUS_EXPORT Snapshot: public QMap<QString, Document::Ptr>
@@ -267,6 +270,14 @@ public:
Snapshot();
~Snapshot();
+ QByteArray preprocessedCode(const QByteArray &source,
+ const QString &fileName) const;
+
+ Document::Ptr documentFromSource(const QByteArray &preprocessedCode,
+ const QString &fileName) const;
+
+ QSharedPointer<NamespaceBinding> globalNamespaceBinding(Document::Ptr doc) const;
+
void insert(Document::Ptr doc);
using _Base::insert;