summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Symbols.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-11 10:35:07 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-11 15:25:17 +0200
commit5accc9664ea247a5b9e1fa6097a04252fb57f01b (patch)
tree959ca55000e777c925f5514f923ae49eb994f473 /src/shared/cplusplus/Symbols.cpp
parentb94af4e2e1edd6055e876f852c8fcdd75a4997e7 (diff)
downloadqt-creator-5accc9664ea247a5b9e1fa6097a04252fb57f01b.tar.gz
Forward the methods of Scope.
Diffstat (limited to 'src/shared/cplusplus/Symbols.cpp')
-rw-r--r--src/shared/cplusplus/Symbols.cpp79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Symbols.cpp b/src/shared/cplusplus/Symbols.cpp
index 2016d565ca..62d068063d 100644
--- a/src/shared/cplusplus/Symbols.cpp
+++ b/src/shared/cplusplus/Symbols.cpp
@@ -441,6 +441,85 @@ Scope *ScopedSymbol::members() const
void ScopedSymbol::addMember(Symbol *member)
{ _members->enterSymbol(member); }
+/// Returns true if this scope's owner is a Namespace Symbol.
+bool ScopedSymbol::isNamespaceScope() const
+{ return _members->isNamespaceScope(); }
+
+/// Returns true if this scope's owner is a Class Symbol.
+bool ScopedSymbol::isClassScope() const
+{ return _members->isClassScope(); }
+
+/// Returns true if this scope's owner is an Enum Symbol.
+bool ScopedSymbol::isEnumScope() const
+{ return _members->isEnumScope(); }
+
+/// Returns true if this scope's owner is a Block Symbol.
+bool ScopedSymbol::isBlockScope() const
+{ return _members->isBlockScope(); }
+
+/// Returns true if this scope's owner is a Prototype Symbol.
+bool ScopedSymbol::isPrototypeScope() const
+{ return _members->isPrototypeScope(); }
+
+/// Returns true if this scope's owner is an ObjCClass Symbol.
+bool ScopedSymbol::isObjCClassScope() const
+{ return _members->isObjCClassScope(); }
+
+/// Returns true if this scope's owner is an ObjCProtocol Symbol.
+bool ScopedSymbol::isObjCProtocolScope() const
+{ return _members->isObjCProtocolScope(); }
+
+/// Returns true if this scope's owner is an ObjCMethod symbol.
+bool ScopedSymbol::isObjCMethodScope() const
+{ return _members->isObjCMethodScope(); }
+
+/// Adds a Symbol to this Scope.
+void ScopedSymbol::enterSymbol(Symbol *symbol)
+{ _members->enterSymbol(symbol); }
+
+/// Returns true if this Scope is empty; otherwise returns false.
+bool ScopedSymbol::isEmpty() const
+{ return _members->isEmpty(); }
+
+/// Returns the number of symbols is in the scope.
+unsigned ScopedSymbol::symbolCount() const
+{ return _members->symbolCount(); }
+
+/// Returns the Symbol at the given position.
+Symbol *ScopedSymbol::symbolAt(unsigned index) const
+{ return _members->symbolAt(index); }
+
+/// Returns the first Symbol in the scope.
+ScopedSymbol::iterator ScopedSymbol::firstSymbol() const
+{ return _members->firstSymbol(); }
+
+/// Returns the last Symbol in the scope.
+Scope::iterator ScopedSymbol::lastSymbol() const
+{ return _members->lastSymbol(); }
+
+Symbol *ScopedSymbol::lookat(const Name *name) const
+{ return _members->lookat(name); }
+
+Symbol *ScopedSymbol::lookat(const Identifier *id) const
+{ return _members->lookat(id); }
+
+Symbol *ScopedSymbol::lookat(int operatorId) const
+{ return _members->lookat(operatorId); }
+
+/// Set the start offset of the scope
+unsigned ScopedSymbol::startOffset() const
+{ return _members->startOffset(); }
+
+void ScopedSymbol::setStartOffset(unsigned offset)
+{ _members->setStartOffset(offset); }
+
+/// Set the end offset of the scope
+unsigned ScopedSymbol::endOffset() const
+{ return _members->endOffset(); }
+
+void ScopedSymbol::setEndOffset(unsigned offset)
+{ _members->setEndOffset(offset); }
+
Block::Block(TranslationUnit *translationUnit, unsigned sourceLocation)
: ScopedSymbol(translationUnit, sourceLocation, /*name = */ 0)
{ }