Go to the documentation of this file.
55 for (
unsigned int i = 0; i <
dataLabels_.size(); i++) {
60 for (
unsigned int i = 0; i <
codeLabels_.size(); i++) {
135 __FILE__, __LINE__,
"Scope::parent()",
136 "Global scope cannot have parent scope.");
139 __FILE__, __LINE__,
"Scope::parent()",
"No parent set.");
157 __FILE__, __LINE__,
"Scope::parent()",
158 "Global scope cannot have parent scope.");
185 if (index >= 0 &&
static_cast<unsigned int>(index) <
children_.size()) {
200 for (
unsigned int i = 0; i <
codeLabels_.size(); i++) {
216 for (
unsigned int i = 0; i <
dataLabels_.size(); i++) {
234 for (
unsigned int i = 0; i <
codeLabels_.size(); i++) {
252 for (
unsigned int i = 0; i <
dataLabels_.size(); i++) {
271 for (
unsigned int i = 0; i <
codeLabels_.size(); i++) {
293 for (
unsigned int i = 0; i <
codeLabels_.size(); i++) {
301 if (found == index) {
325 for (
unsigned int i = 0; i <
dataLabels_.size(); i++) {
347 for (
unsigned int i = 0; i <
dataLabels_.size(); i++) {
355 if (found == index) {
379 __FILE__, __LINE__,
"Scope::addCodeLabel()",
380 "A code label already exists by this name.");
418 __FILE__, __LINE__,
"Scope::addDataLabel()",
419 "A data label already exists by this name.");
453 for (CodeLabelList::iterator i =
codeLabels_.begin();
455 CodeLabelList::iterator next = i;
457 if ((*i)->address().location() == address) {
const CodeLabel & codeLabel(const std::string &name) const
UInt32 InstructionAddress
int dataLabelCount(Address address) const
virtual void addDataLabel(const DataLabel *dataLabel)
CodeLabelList codeLabels_
Code labels contained by this scope.
Scope * parent_
The smallest outer scope that contains this scope.
const TTAMachine::AddressSpace & space() const
virtual bool isProcedure() const
DataLabelList dataLabels_
Data labels contained by this scope.
virtual bool isLocal() const
void addChild(const Scope &scope)
#define assert(condition)
virtual void addCodeLabel(const CodeLabel *codeLabel)
virtual void addGlobalDataLabel(const DataLabel &dataLabel, const Scope &owner)=0
Adds a data label and its owner to the global label bookkeeping.
virtual bool isUnit() const
virtual bool isGlobal() const
InstructionAddress location() const
void setParent(Scope &scope)
virtual void removeCodeLabels(InstructionAddress address)
const Scope & child(int index) const
virtual void addGlobalCodeLabel(const CodeLabel &codeLabel, const Scope &owner)=0
Adds a code label and its owner to the global label bookkeeping.
const DataLabel & dataLabel(const std::string &name) const
bool containsCodeLabel(const std::string &name) const
int codeLabelCount(Address address) const
bool containsDataLabel(const std::string &name) const
ScopeList children_
Child scopes.