C++: Remember the class a ClassOrNamespace is based on

Change-Id: I0d333ff9489e46c4fa1923d70ca950f67ffa3f44
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-11-01 14:43:24 +01:00
parent 03270ad301
commit 0c16757085
2 changed files with 22 additions and 8 deletions

View File

@@ -87,6 +87,9 @@ public:
Symbol *lookupInScope(const QList<const Name *> &fullName);
/// The class this ClassOrNamespace is based on.
Class *rootClass() const { return _rootClass; }
private:
typedef std::map<const Name *, ClassOrNamespace *, Name::Compare> Table;
typedef std::map<const TemplateNameId *, ClassOrNamespace *, TemplateNameId::Compare> TemplateNameIdTable;
@@ -95,7 +98,8 @@ private:
void flush();
/// \internal
ClassOrNamespace *findOrCreateType(const Name *name, ClassOrNamespace *origin = 0);
ClassOrNamespace *findOrCreateType(const Name *name, ClassOrNamespace *origin = 0,
Class *clazz = 0);
void addTodo(Symbol *symbol);
void addSymbol(Symbol *symbol);
@@ -145,6 +149,8 @@ private:
AlreadyConsideredClassContainer<Class> _alreadyConsideredClasses;
AlreadyConsideredClassContainer<TemplateNameId> _alreadyConsideredTemplates;
Class *_rootClass;
class NestedClassInstantiator
{
public: