diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 13:46:32 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 15:25:19 +0200 |
commit | f74ba9daef50a0b267056c8753819d59621fc000 (patch) | |
tree | b8400aa8bd8248b6b42552f79d56294ed04d8657 /src/shared/cplusplus/Symbols.h | |
parent | 6618a3cd679bf76f8325ca38b934545b0d8f4c60 (diff) |
Introduced CPlusPlus::Template and process the template declarations.
Diffstat (limited to 'src/shared/cplusplus/Symbols.h')
-rw-r--r-- | src/shared/cplusplus/Symbols.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Symbols.h b/src/shared/cplusplus/Symbols.h index bc2b6b8330..b3f388f977 100644 --- a/src/shared/cplusplus/Symbols.h +++ b/src/shared/cplusplus/Symbols.h @@ -376,6 +376,41 @@ private: }; }; +class CPLUSPLUS_EXPORT Template: public Scope, public Type +{ +public: + Template(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name); + virtual ~Template(); + + unsigned templateParameterCount() const; + Symbol *templateParameterAt(unsigned index) const; + Symbol *declaration() const; + + // Symbol's interface + virtual FullySpecifiedType type() const; + + // Type's interface + virtual bool isEqualTo(const Type *other) const; + + virtual const Template *asTemplate() const + { return this; } + + virtual Template *asTemplate() + { return this; } + + virtual const Template *asTemplateType() const + { return this; } + + virtual Template *asTemplateType() + { return this; } + +protected: + virtual void visitSymbol0(SymbolVisitor *visitor); + virtual void accept0(TypeVisitor *visitor); + virtual bool matchType0(const Type *otherType, TypeMatcher *matcher) const; +}; + + class CPLUSPLUS_EXPORT Namespace: public Scope, public Type { public: |