Commit d8eb5ddb authored by Sergey Shambir's avatar Sergey Shambir Committed by hjk
Browse files

CppTools: cleanup CppPreprocessor header, added short docs.

Change-Id: Ib61197da939165d24b99e40f29f9de13d109e044
Reviewed-by: default avatarLeena Miettinen <>
Reviewed-by: default avatarhjk <>
parent 2d68f9c8
......@@ -5,6 +5,18 @@
#include <QCoreApplication>
* \class CppTools::Internal::CppPreprocessor
* \brief The CppPreprocessor class updates set of indexed C++ files.
* Indexed file is truncated version of fully parsed document: copy of source
* code and full AST will be dropped when indexing is done. Working copy ensures
* that documents with most recent copy placed in memory will be parsed correctly.
* \sa CPlusPlus::Document
* \sa CppTools::CppModelManagerInterface::WorkingCopy
using namespace CPlusPlus;
using namespace CppTools;
using namespace CppTools::Internal;
......@@ -14,11 +14,14 @@ namespace Internal {
class CppModelManager;
// Documentation inside.
class CPPTOOLS_EXPORT CppPreprocessor: public CPlusPlus::Client
static QString cleanPath(const QString &path);
CppPreprocessor(QPointer<CppModelManager> modelManager, bool dumpFileNameWhileParsing = false);
virtual ~CppPreprocessor();
......@@ -26,15 +29,11 @@ public:
void setWorkingCopy(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy);
void setIncludePaths(const QStringList &includePaths);
void setFrameworkPaths(const QStringList &frameworkPaths);
void addFrameworkPath(const QString &frameworkPath);
void setProjectFiles(const QStringList &files);
void setTodo(const QStringList &files);
void run(const QString &fileName);
void removeFromCache(const QString &fileName);
void resetEnvironment();
static QString cleanPath(const QString &path);
const QSet<QString> &todo() const
{ return m_todo; }
......@@ -69,6 +68,8 @@ protected:
virtual void sourceNeeded(unsigned line, const QString &fileName, IncludeType type);
void addFrameworkPath(const QString &frameworkPath);
CPlusPlus::Snapshot m_snapshot;
QPointer<CppModelManager> m_modelManager;
bool m_dumpFileNameWhileParsing;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment