Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
5accc966
Commit
5accc966
authored
Aug 11, 2010
by
Roberto Raggi
Browse files
Forward the methods of Scope.
parent
b94af4e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Symbols.cpp
View file @
5accc966
...
...
@@ -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
)
{
}
...
...
src/shared/cplusplus/Symbols.h
View file @
5accc966
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment