diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-02-16 15:43:24 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-02-16 18:20:46 +0100 |
commit | ba78e075da3919aafd2afdb8508952115f713c36 (patch) | |
tree | de94307448655b215342d82ec6f9fe5b728c4717 /src/shared/cplusplus/Control.cpp | |
parent | 2788d77229dbecdeae293f8e3edff70f39750e63 (diff) | |
download | qt-creator-ba78e075da3919aafd2afdb8508952115f713c36.tar.gz |
Introduced support for forward class declarations.
Diffstat (limited to 'src/shared/cplusplus/Control.cpp')
-rw-r--r-- | src/shared/cplusplus/Control.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Control.cpp b/src/shared/cplusplus/Control.cpp index 4d708f4340..7f5fd273ca 100644 --- a/src/shared/cplusplus/Control.cpp +++ b/src/shared/cplusplus/Control.cpp @@ -124,6 +124,7 @@ public: delete_array_entries(usingNamespaceDirectives); delete_array_entries(enums); delete_array_entries(usingDeclarations); + delete_array_entries(classForwardDeclarations); } NameId *findOrInsertNameId(Identifier *id) @@ -322,6 +323,14 @@ public: return u; } + ForwardClassDeclaration *newForwardClassDeclaration(unsigned sourceLocation, Name *name) + { + ForwardClassDeclaration *c = new ForwardClassDeclaration(translationUnit, + sourceLocation, name); + classForwardDeclarations.push_back(c); + return c; + } + Enum *newEnum(unsigned sourceLocation, Name *name) { Enum *e = new Enum(translationUnit, @@ -477,6 +486,7 @@ public: std::vector<UsingNamespaceDirective *> usingNamespaceDirectives; std::vector<Enum *> enums; std::vector<UsingDeclaration *> usingDeclarations; + std::vector<ForwardClassDeclaration *> classForwardDeclarations; }; Control::Control() @@ -632,4 +642,9 @@ UsingNamespaceDirective *Control::newUsingNamespaceDirective(unsigned sourceLoca UsingDeclaration *Control::newUsingDeclaration(unsigned sourceLocation, Name *name) { return d->newUsingDeclaration(sourceLocation, name); } +ForwardClassDeclaration *Control::newForwardClassDeclaration(unsigned sourceLocation, + Name *name) +{ return d->newForwardClassDeclaration(sourceLocation, name); } + + CPLUSPLUS_END_NAMESPACE |