C++: make InsertionPointLocator ready for re-use.

(cherry picked from commit 519f1d11947ff3109850e559fae868c4a55deb43)
This commit is contained in:
Erik Verbruggen
2010-09-27 18:01:04 +02:00
committed by Robert Loehning
parent 91208c827f
commit f39494e4c2
6 changed files with 345 additions and 93 deletions

View File

@@ -30,6 +30,7 @@
#ifndef INSERTIONPOINTLOCATOR_H
#define INSERTIONPOINTLOCATOR_H
#include <ASTfwd.h>
#include <CPlusPlusForwardDeclarations.h>
#include <Symbols.h>
@@ -82,19 +83,24 @@ public:
SlotBit = 1 << 2,
PublicSlot = Public | SlotBit,
PublicSlot = Public | SlotBit,
ProtectedSlot = Protected | SlotBit,
PrivateSlot = Private | SlotBit,
PrivateSlot = Private | SlotBit,
};
public:
InsertionPointLocator(const Document::Ptr &doc);
InsertionPointLocator(const Snapshot &snapshot);
InsertionLocation methodDeclarationInClass(const Class *clazz,
InsertionLocation methodDeclarationInClass(const QString &fileName,
const Class *clazz,
AccessSpec xsSpec) const;
QList<InsertionLocation> methodDefinition(const QString &fileName,
CPlusPlus::DeclarationAST *prevDecl,
CPlusPlus::DeclarationAST *nextDecl) const;
private:
Document::Ptr m_doc;
Snapshot m_snapshot;
};
} // namespace CPlusPlus