Commit ea23948e authored by Tobias Hunger's avatar Tobias Hunger

CppTools: Use namespace CppTools consistently

There were quite a few classes using CPlusPlus namespace in the
CppTools plugin. Rename them and do some other small namespace
related coding style fixups.

Change-Id: I093fc1f3fc394fd9923e3f18d5f66522e288f21d
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent ff3bf324
......@@ -82,7 +82,7 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor()
const int pos = tc.position();
editorWidget->convertPosition(pos, &line, &column);
const CPlusPlus::Snapshot &snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
const CPlusPlus::Snapshot &snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
CPlusPlus::Document::Ptr doc = snapshot.document(editor->document()->fileName());
QTC_ASSERT(doc, return 0);
......
......@@ -406,8 +406,8 @@ QList<Node *> AutotoolsProject::nodes(FolderNode *parent) const
void AutotoolsProject::updateCppCodeModel()
{
CPlusPlus::CppModelManagerInterface *modelManager =
CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *modelManager =
CppTools::CppModelManagerInterface::instance();
if (!modelManager)
return;
......@@ -435,7 +435,7 @@ void AutotoolsProject::updateCppCodeModel()
}
}
CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
const bool update = (pinfo.includePaths() != allIncludePaths)
|| (pinfo.sourceFiles() != m_files)
......@@ -443,15 +443,15 @@ void AutotoolsProject::updateCppCodeModel()
|| (pinfo.frameworkPaths() != allFrameworkPaths);
if (update) {
pinfo.clearProjectParts();
CPlusPlus::ProjectPart::Ptr part(new CPlusPlus::ProjectPart);
CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->includePaths = allIncludePaths;
foreach (const QString &file, m_files)
part->files << CPlusPlus::ProjectFile(file, CPlusPlus::ProjectFile::CXXSource);
part->files << CppTools::ProjectFile(file, CppTools::ProjectFile::CXXSource);
part->defines = macros;
part->frameworkPaths = allFrameworkPaths;
part->cVersion = CPlusPlus::ProjectPart::C99;
part->cxxVersion = CPlusPlus::ProjectPart::CXX11;
part->cVersion = CppTools::ProjectPart::C99;
part->cxxVersion = CppTools::ProjectPart::CXX11;
pinfo.appendProjectPart(part);
modelManager->updateProjectInfo(pinfo);
......
......@@ -182,8 +182,8 @@ void Manager::initialize()
&d->parser, SLOT(setFlatMode(bool)), Qt::QueuedConnection);
// connect to the cpp model manager for signals about document updates
CPlusPlus::CppModelManagerInterface *codeModelManager
= CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *codeModelManager
= CppTools::CppModelManagerInterface::instance();
// when code manager signals that document is updated - handle it by ourselves
connect(codeModelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
......
......@@ -568,7 +568,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot)
void Parser::resetDataToCurrentState()
{
// get latest data
CPlusPlus::CppModelManagerInterface *codeModel = CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *codeModel = CppTools::CppModelManagerInterface::instance();
if (codeModel)
resetData(codeModel->snapshot());
}
......
......@@ -123,8 +123,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
CMakeProject::~CMakeProject()
{
// Remove CodeModel support
CPlusPlus::CppModelManagerInterface *modelManager
= CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *modelManager
= CppTools::CppModelManagerInterface::instance();
QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end;
it = m_uiCodeModelSupport.constBegin();
end = m_uiCodeModelSupport.constEnd();
......@@ -367,29 +367,29 @@ bool CMakeProject::parseCMakeLists()
allIncludePaths.append(headerPath.path());
}
CPlusPlus::CppModelManagerInterface *modelmanager =
CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *modelmanager =
CppTools::CppModelManagerInterface::instance();
if (modelmanager) {
CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
if (pinfo.includePaths() != allIncludePaths
|| pinfo.sourceFiles() != m_files
|| pinfo.defines() != allDefines
|| pinfo.frameworkPaths() != allFrameworkPaths) {
pinfo.clearProjectParts();
CPlusPlus::ProjectPart::Ptr part(new CPlusPlus::ProjectPart);
CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->includePaths = allIncludePaths;
CPlusPlus::ProjectFileAdder adder(part->files);
CppTools::ProjectFileAdder adder(part->files);
foreach (const QString &file, m_files)
adder.maybeAdd(file);
part->defines = allDefines;
part->frameworkPaths = allFrameworkPaths;
part->cVersion = CPlusPlus::ProjectPart::C99;
part->cVersion = CppTools::ProjectPart::C99;
if (tc)
part->cxxVersion = tc->compilerFlags(cxxflags) == ToolChain::STD_CXX11
? CPlusPlus::ProjectPart::CXX11
: CPlusPlus::ProjectPart::CXX98;
? CppTools::ProjectPart::CXX11
: CppTools::ProjectPart::CXX98;
else
part->cxxVersion = CPlusPlus::ProjectPart::CXX11;
part->cxxVersion = CppTools::ProjectPart::CXX11;
pinfo.appendProjectPart(part);
modelmanager->updateProjectInfo(pinfo);
m_codeModelFuture.cancel();
......@@ -787,8 +787,8 @@ void CMakeProject::updateRunConfigurations(Target *t)
void CMakeProject::createUiCodeModelSupport()
{
// qDebug()<<"creatUiCodeModelSupport()";
CPlusPlus::CppModelManagerInterface *modelManager
= CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *modelManager
= CppTools::CppModelManagerInterface::instance();
// First move all to
QMap<QString, CMakeUiCodeModelSupport *> oldCodeModelSupport;
......
......@@ -39,7 +39,7 @@
using namespace CMakeProjectManager;
using namespace Internal;
CMakeUiCodeModelSupport::CMakeUiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager,
CMakeUiCodeModelSupport::CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
CMakeProject *project,
const QString &source,
const QString &uiHeaderFile)
......
......@@ -43,7 +43,7 @@ class CMakeProject;
class CMakeUiCodeModelSupport : public CppTools::UiCodeModelSupport
{
public:
CMakeUiCodeModelSupport(CPlusPlus::CppModelManagerInterface *modelmanager,
CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
CMakeProject *project,
const QString &sourceFile,
const QString &uiHeaderFile);
......
......@@ -84,11 +84,11 @@ TestCase::TestCase(const QByteArray &input)
Utils::FileSaver srcSaver(fileName);
srcSaver.write(originalText);
srcSaver.finalize();
CPlusPlus::CppModelManagerInterface::instance()->updateSourceFiles(QStringList()<<fileName);
CppTools::CppModelManagerInterface::instance()->updateSourceFiles(QStringList()<<fileName);
// Wait for the parser in the future to give us the document
while (true) {
Snapshot s = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
Snapshot s = CppTools::CppModelManagerInterface::instance()->snapshot();
if (s.contains(fileName))
break;
QCoreApplication::processEvents();
......@@ -120,7 +120,7 @@ TestCase::~TestCase()
QCoreApplication::processEvents(); // process any pending events
// Remove the test file from the code-model
CppModelManagerInterface *mmi = CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *mmi = CppTools::CppModelManagerInterface::instance();
mmi->GC();
QCOMPARE(mmi->snapshot().size(), 0);
}
......
......@@ -1282,7 +1282,7 @@ void CPPEditorWidget::finishHighlightSymbolUsages()
if (m_modelManager)
m_modelManager->setExtraDiagnostics(m_lastSemanticInfo.doc->fileName(),
CPlusPlus::CppModelManagerInterface::CppSemanticsDiagnostic,
CppTools::CppModelManagerInterface::CppSemanticsDiagnostic,
m_lastSemanticInfo.doc->diagnosticMessages());
}
......
......@@ -59,17 +59,15 @@ QT_END_NAMESPACE
namespace CPlusPlus {
class OverviewModel;
class Symbol;
class CppModelManagerInterface;
}
namespace CppTools {
class CppCodeStyleSettings;
class CppModelManagerInterface;
class CppRefactoringFile;
}
namespace TextEditor {
class FontSettings;
}
namespace TextEditor { class FontSettings; }
namespace CppEditor {
namespace Internal {
......@@ -185,7 +183,7 @@ public:
virtual void cut(); // reimplemented from BaseTextEditorWidget
virtual void selectAll(); // reimplemented from BaseTextEditorWidget
CPlusPlus::CppModelManagerInterface *modelManager() const;
CppTools::CppModelManagerInterface *modelManager() const;
virtual void setMimeType(const QString &mt);
......@@ -293,7 +291,7 @@ private:
bool handleDocumentationComment(QKeyEvent *e);
bool isStartOfDoxygenComment(const QTextCursor &cursor) const;
CPlusPlus::CppModelManagerInterface *m_modelManager;
CppTools::CppModelManagerInterface *m_modelManager;
QComboBox *m_outlineCombo;
CPlusPlus::OverviewModel *m_outlineModel;
......
......@@ -73,7 +73,7 @@ namespace {
CppElementEvaluator::CppElementEvaluator(CPPEditorWidget *editor) :
m_editor(editor),
m_modelManager(CppModelManagerInterface::instance()),
m_modelManager(CppTools::CppModelManagerInterface::instance()),
m_tc(editor->textCursor()),
m_lookupBaseClasses(false),
m_lookupDerivedClasses(false)
......@@ -348,18 +348,18 @@ void CppClass::lookupBases(Symbol *declaration, const CPlusPlus::LookupContext &
void CppClass::lookupDerived(CPlusPlus::Symbol *declaration, const CPlusPlus::Snapshot &snapshot)
{
typedef QPair<CppClass *, TypeHierarchy> Data;
typedef QPair<CppClass *, CppTools::TypeHierarchy> Data;
TypeHierarchyBuilder builder(declaration, snapshot);
const TypeHierarchy &completeHierarchy = builder.buildDerivedTypeHierarchy();
CppTools::TypeHierarchyBuilder builder(declaration, snapshot);
const CppTools::TypeHierarchy &completeHierarchy = builder.buildDerivedTypeHierarchy();
QQueue<Data> q;
q.enqueue(qMakePair(this, completeHierarchy));
while (!q.isEmpty()) {
const Data &current = q.dequeue();
CppClass *clazz = current.first;
const TypeHierarchy &classHierarchy = current.second;
foreach (const TypeHierarchy &derivedHierarchy, classHierarchy.hierarchy()) {
const CppTools::TypeHierarchy &classHierarchy = current.second;
foreach (const CppTools::TypeHierarchy &derivedHierarchy, classHierarchy.hierarchy()) {
clazz->derived.append(CppClass(derivedHierarchy.symbol()));
q.enqueue(qMakePair(&clazz->derived.last(), derivedHierarchy));
}
......
......@@ -49,9 +49,7 @@ class LookupItem;
class LookupContext;
}
namespace CppTools {
class CppModelManagerInterface;
}
namespace CppTools { class CppModelManagerInterface; }
namespace CppEditor {
namespace Internal {
......@@ -84,7 +82,7 @@ private:
const CPlusPlus::LookupContext &lookupContext);
CPPEditorWidget *m_editor;
CPlusPlus::CppModelManagerInterface *m_modelManager;
CppTools::CppModelManagerInterface *m_modelManager;
QTextCursor m_tc;
bool m_lookupBaseClasses;
bool m_lookupDerivedClasses;
......
......@@ -283,7 +283,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
cppToolsMenu->addSeparator(globalContext);
m_updateCodeModelAction = new QAction(tr("Update Code Model"), this);
cmd = Core::ActionManager::registerAction(m_updateCodeModelAction, Core::Id(Constants::UPDATE_CODEMODEL), globalContext);
CPlusPlus::CppModelManagerInterface *cppModelManager = CPlusPlus::CppModelManagerInterface::instance();
CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance();
connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
cppToolsMenu->addAction(cmd);
......
......@@ -34,10 +34,7 @@
#include <texteditor/quickfix.h>
namespace CPlusPlus {
class CppModelManagerInterface;
class Snapshot;
}
namespace CPlusPlus { class Snapshot; }
namespace CppEditor {
namespace Internal { class CppQuickFixAssistInterface; }
......
......@@ -207,12 +207,12 @@ void TestCase::init()
QStringList filePaths;
foreach (const TestDocumentPtr &testFile, testFiles)
filePaths << testFile->filePath();
CPlusPlus::CppModelManagerInterface::instance()->updateSourceFiles(filePaths);
CppTools::CppModelManagerInterface::instance()->updateSourceFiles(filePaths);
// Wait for the parser in the future to give us the document
QStringList filePathsNotYetInSnapshot(filePaths);
forever {
Snapshot snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
Snapshot snapshot = CppTools::CppModelManagerInterface::instance()->snapshot();
foreach (const QString &filePath, filePathsNotYetInSnapshot) {
if (snapshot.contains(filePath))
filePathsNotYetInSnapshot.removeOne(filePath);
......@@ -267,7 +267,7 @@ TestCase::~TestCase()
QCoreApplication::processEvents(); // process any pending events
// Remove the test files from the code-model
CppModelManagerInterface *mmi = CPlusPlus::CppModelManagerInterface::instance();
CppModelManagerInterface *mmi = CppTools::CppModelManagerInterface::instance();
mmi->GC();
QCOMPARE(mmi->snapshot().size(), 0);
}
......
......@@ -101,7 +101,7 @@ CppQuickFixAssistInterface::CppQuickFixAssistInterface(CPPEditorWidget *editor,
editor->editorDocument()->fileName(), reason)
, m_editor(editor)
, m_semanticInfo(editor->semanticInfo())
, m_snapshot(CPlusPlus::CppModelManagerInterface::instance()->snapshot())
, m_snapshot(CppTools::CppModelManagerInterface::instance()->snapshot())
, m_currentFile(CppRefactoringChanges::file(editor, m_semanticInfo.doc))
, m_context(m_semanticInfo.doc, m_snapshot)
{
......
......@@ -34,7 +34,7 @@
#include <QtCore/QSet>
/*!
\enum CPlusPlus::CppModelManagerInterface::QtVersion
\enum CppTools::CppModelManagerInterface::QtVersion
Allows C++ parser engine to inject headers or change inner settings as
needed to parse Qt language extensions for concrete major Qt version
\value UnknownQt
......@@ -47,12 +47,12 @@
Parser may enable tricks for Qt v5.x
*/
using namespace CPlusPlus;
using namespace CppTools;
static CppModelManagerInterface *g_instance = 0;
const QString CppModelManagerInterface::configurationFileName()
{ return Preprocessor::configurationFileName; }
{ return CPlusPlus::Preprocessor::configurationFileName; }
CppModelManagerInterface::CppModelManagerInterface(QObject *parent)
: QObject(parent)
......
......@@ -42,28 +42,17 @@
#include <QStringList>
#include <QFuture>
namespace Core {
class IEditor;
}
namespace CPlusPlus {
class LookupContext;
}
namespace ProjectExplorer {
class Project;
}
namespace Core { class IEditor; }
namespace CPlusPlus { class LookupContext; }
namespace ProjectExplorer { class Project; }
namespace CppTools {
class AbstractEditorSupport;
class CppCompletionSupport;
class CppCompletionAssistProvider;
class CppHighlightingSupport;
class CppHighlightingSupportFactory;
class CppIndexingSupport;
}
namespace CPlusPlus {
class AbstractEditorSupport;
class CppCompletionSupport;
class CppCompletionAssistProvider;
class CppHighlightingSupport;
class CppHighlightingSupportFactory;
class CppIndexingSupport;
class CPPTOOLS_EXPORT ProjectPart
{
......@@ -268,6 +257,6 @@ public Q_SLOTS:
virtual void GC() = 0;
};
} // namespace CPlusPlus
} // namespace CppTools
#endif // CPPMODELMANAGERINTERFACE_H
......@@ -38,7 +38,7 @@
#include <cplusplus/Symbols.h>
#include <cplusplus/TranslationUnit.h>
using namespace CPlusPlus;
using namespace CppTools;
namespace {
......@@ -50,7 +50,7 @@ QString unqualifyName(const QString &qualifiedName)
return qualifiedName.right(qualifiedName.length() - index - 2);
}
class DerivedHierarchyVisitor : public SymbolVisitor
class DerivedHierarchyVisitor : public CPlusPlus::SymbolVisitor
{
public:
DerivedHierarchyVisitor(const QString &qualifiedName)
......@@ -58,47 +58,48 @@ public:
, _unqualifiedName(unqualifyName(qualifiedName))
{}
void execute(const Document::Ptr &doc, const Snapshot &snapshot);
void execute(const CPlusPlus::Document::Ptr &doc, const CPlusPlus::Snapshot &snapshot);
virtual bool visit(Class *);
virtual bool visit(CPlusPlus::Class *);
const QList<Symbol *> &derived() { return _derived; }
const QList<CPlusPlus::Symbol *> &derived() { return _derived; }
const QStringList otherBases() { return _otherBases; }
private:
LookupContext _context;
CPlusPlus::LookupContext _context;
QString _qualifiedName;
QString _unqualifiedName;
Overview _overview;
QHash<Symbol *, QString> _actualBases;
CPlusPlus::Overview _overview;
QHash<CPlusPlus::Symbol *, QString> _actualBases;
QStringList _otherBases;
QList<Symbol *> _derived;
QList<CPlusPlus::Symbol *> _derived;
};
void DerivedHierarchyVisitor::execute(const Document::Ptr &doc, const Snapshot &snapshot)
void DerivedHierarchyVisitor::execute(const CPlusPlus::Document::Ptr &doc,
const CPlusPlus::Snapshot &snapshot)
{
_derived.clear();
_otherBases.clear();
_context = LookupContext(doc, snapshot);
_context = CPlusPlus::LookupContext(doc, snapshot);
for (unsigned i = 0; i < doc->globalSymbolCount(); ++i)
accept(doc->globalSymbolAt(i));
}
bool DerivedHierarchyVisitor::visit(Class *symbol)
bool DerivedHierarchyVisitor::visit(CPlusPlus::Class *symbol)
{
for (unsigned i = 0; i < symbol->baseClassCount(); ++i) {
BaseClass *baseSymbol = symbol->baseClassAt(i);
CPlusPlus::BaseClass *baseSymbol = symbol->baseClassAt(i);
QString baseName = _actualBases.value(baseSymbol);
if (baseName.isEmpty()) {
QList<LookupItem> items = _context.lookup(baseSymbol->name(), symbol->enclosingScope());
QList<CPlusPlus::LookupItem> items = _context.lookup(baseSymbol->name(), symbol->enclosingScope());
if (items.isEmpty() || !items.first().declaration())
continue;
Symbol *actualBaseSymbol = items.first().declaration();
CPlusPlus::Symbol *actualBaseSymbol = items.first().declaration();
if (actualBaseSymbol->isTypedef()) {
NamedType *namedType = actualBaseSymbol->type()->asNamedType();
CPlusPlus::NamedType *namedType = actualBaseSymbol->type()->asNamedType();
if (!namedType) {
// Anonymous aggregate such as: typedef struct {} Empty;
continue;
......@@ -112,7 +113,8 @@ bool DerivedHierarchyVisitor::visit(Class *symbol)
}
}
const QList<const Name *> &full = LookupContext::fullyQualifiedName(actualBaseSymbol);
const QList<const CPlusPlus::Name *> &full
= CPlusPlus::LookupContext::fullyQualifiedName(actualBaseSymbol);
baseName = _overview.prettyName(full);
_actualBases.insert(baseSymbol, baseName);
}
......@@ -126,15 +128,15 @@ bool DerivedHierarchyVisitor::visit(Class *symbol)
return true;
}
}
} // namespace
TypeHierarchy::TypeHierarchy() : _symbol(0)
{}
TypeHierarchy::TypeHierarchy(Symbol *symbol) : _symbol(symbol)
TypeHierarchy::TypeHierarchy(CPlusPlus::Symbol *symbol) : _symbol(symbol)
{}
Symbol *TypeHierarchy::symbol() const
CPlusPlus::Symbol *TypeHierarchy::symbol() const
{
return _symbol;
}
......@@ -144,12 +146,12 @@ const QList<TypeHierarchy> &TypeHierarchy::hierarchy() const
return _hierarchy;
}
TypeHierarchyBuilder::TypeHierarchyBuilder(Symbol *symbol, const Snapshot &snapshot)
TypeHierarchyBuilder::TypeHierarchyBuilder(CPlusPlus::Symbol *symbol, const CPlusPlus::Snapshot &snapshot)
: _symbol(symbol)
, _snapshot(snapshot)
, _dependencies(QString::fromUtf8(symbol->fileName(), symbol->fileNameLength()))
{
DependencyTable dependencyTable;
CPlusPlus::DependencyTable dependencyTable;
dependencyTable.build(_snapshot);
_dependencies.append(dependencyTable.filesDependingOn(_dependencies.first()));
}
......@@ -170,17 +172,17 @@ TypeHierarchy TypeHierarchyBuilder::buildDerivedTypeHierarchy()
void TypeHierarchyBuilder::buildDerived(TypeHierarchy *typeHierarchy)
{
Symbol *symbol = typeHierarchy->_symbol;
CPlusPlus::Symbol *symbol = typeHierarchy->_symbol;
if (_visited.contains(symbol))
return;
_visited.insert(symbol);
const QString &symbolName = _overview.prettyName(LookupContext::fullyQualifiedName(symbol));
const QString &symbolName = _overview.prettyName(CPlusPlus::LookupContext::fullyQualifiedName(symbol));
DerivedHierarchyVisitor visitor(symbolName);
foreach (const QString &fileName, _dependencies) {
Document::Ptr doc = _snapshot.document(fileName);
CPlusPlus::Document::Ptr doc = _snapshot.document(fileName);
if ((_candidates.contains(fileName) && !_candidates.value(fileName).contains(symbolName))
|| !doc->control()->findIdentifier(symbol->identifier()->chars(),
symbol->identifier()->size())) {
......@@ -193,7 +195,7 @@ void TypeHierarchyBuilder::buildDerived(TypeHierarchy *typeHierarchy)
foreach (const QString &candidate, visitor.otherBases())
_candidates[fileName].insert(candidate);
foreach (Symbol *s, visitor.derived()) {
foreach (CPlusPlus::Symbol *s, visitor.derived()) {
TypeHierarchy derivedHierarchy(s);
buildDerived(&derivedHierarchy);
typeHierarchy->_hierarchy.append(derivedHierarchy);
......
......@@ -27,8 +27,8 @@
**
****************************************************************************/
#ifndef TYPEHIERARCHYBUILDER_H
#define TYPEHIERARCHYBUILDER_H
#ifndef CPPTOOLS_TYPEHIERARCHYBUILDER_H
#define CPPTOOLS_TYPEHIERARCHYBUILDER_H
#include "cpptools_global.h"
#include "ModelManagerInterface.h"
......@@ -40,7 +40,7 @@
#include <QStringList>
#include <QSet>
namespace CPlusPlus {
namespace CppTools {
class CPPTOOLS_EXPORT TypeHierarchy
{
......@@ -48,20 +48,20 @@ class CPPTOOLS_EXPORT TypeHierarchy
public:
TypeHierarchy();
TypeHierarchy(Symbol *symbol);
TypeHierarchy(CPlusPlus::Symbol *symbol);
Symbol *symbol() const;
CPlusPlus::Symbol *symbol() const;
const QList<TypeHierarchy> &hierarchy() const;
private:
Symbol *_symbol;
CPlusPlus::Symbol *_symbol;
QList<TypeHierarchy> _hierarchy;
};
class CPPTOOLS_EXPORT TypeHierarchyBuilder
{
public:
TypeHierarchyBuilder(Symbol *symbol, const Snapshot &snapshot);
TypeHierarchyBuilder(CPlusPlus::Symbol *symbol, const CPlusPlus::Snapshot &snapshot);
TypeHierarchy buildDerivedTypeHierarchy();
......@@ -69,14 +69,14 @@ private:
void reset();
void buildDerived(TypeHierarchy *typeHierarchy);