diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 10:35:07 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 15:25:17 +0200 |
commit | 5accc9664ea247a5b9e1fa6097a04252fb57f01b (patch) | |
tree | 959ca55000e777c925f5514f923ae49eb994f473 /src/shared/cplusplus/Symbols.h | |
parent | b94af4e2e1edd6055e876f852c8fcdd75a4997e7 (diff) |
Forward the methods of Scope.
Diffstat (limited to 'src/shared/cplusplus/Symbols.h')
-rw-r--r-- | src/shared/cplusplus/Symbols.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Symbols.h b/src/shared/cplusplus/Symbols.h index edf2d8e573..4017b367a0 100644 --- a/src/shared/cplusplus/Symbols.h +++ b/src/shared/cplusplus/Symbols.h @@ -228,6 +228,62 @@ public: Scope *members() const; void addMember(Symbol *member); + /// Returns true if this scope's owner is a Namespace Symbol. + bool isNamespaceScope() const; + + /// Returns true if this scope's owner is a Class Symbol. + bool isClassScope() const; + + /// Returns true if this scope's owner is an Enum Symbol. + bool isEnumScope() const; + + /// Returns true if this scope's owner is a Block Symbol. + bool isBlockScope() const; + + /// Returns true if this scope's owner is a Prototype Symbol. + bool isPrototypeScope() const; + + /// Returns true if this scope's owner is an ObjCClass Symbol. + bool isObjCClassScope() const; + + /// Returns true if this scope's owner is an ObjCProtocol Symbol. + bool isObjCProtocolScope() const; + + /// Returns true if this scope's owner is an ObjCMethod symbol. + bool isObjCMethodScope() const; + + /// Adds a Symbol to this Scope. + void enterSymbol(Symbol *symbol); + + /// Returns true if this Scope is empty; otherwise returns false. + bool isEmpty() const; + + /// Returns the number of symbols is in the scope. + unsigned symbolCount() const; + + /// Returns the Symbol at the given position. + Symbol *symbolAt(unsigned index) const; + + typedef Symbol **iterator; + + /// Returns the first Symbol in the scope. + iterator firstSymbol() const; + + /// Returns the last Symbol in the scope. + iterator lastSymbol() const; + + Symbol *lookat(const Name *name) const; + Symbol *lookat(const Identifier *id) const; + Symbol *lookat(int operatorId) const; + + /// Set the start offset of the scope + unsigned startOffset() const; + void setStartOffset(unsigned offset); + + /// Set the end offset of the scope + unsigned endOffset() const; + void setEndOffset(unsigned offset); + virtual const ScopedSymbol *asScopedSymbol() const { return this; } |