OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
TTAProgram::NullGlobalScope Class Reference

#include <NullGlobalScope.hh>

Inheritance diagram for TTAProgram::NullGlobalScope:
Inheritance graph
Collaboration diagram for TTAProgram::NullGlobalScope:
Collaboration graph

Public Member Functions

virtual ~NullGlobalScope ()
 
- Public Member Functions inherited from TTAProgram::GlobalScope
 GlobalScope ()
 
virtual ~GlobalScope ()
 
virtual bool isGlobal () const
 
int globalCodeLabelCount (Address address) const
 
const CodeLabel & globalCodeLabel (Address address, int index) const
 
int globalCodeLabelCount () const
 
const CodeLabel & globalCodeLabel (int index) const
 
int globalDataLabelCount (Address address) const
 
const DataLabel & globalDataLabel (Address address, int index) const
 
int globalDataLabelCount () const
 
const DataLabel & globalDataLabel (int index) const
 
virtual void removeCodeLabels (InstructionAddress address)
 
virtual Scope * copy () const
 
virtual Scope * copyAndRelocate (const TTAProgram::Program &program) const
 
virtual void setDataLabelAddressSpace (const TTAMachine::AddressSpace &space)
 
- Public Member Functions inherited from TTAProgram::Scope
 Scope ()
 
virtual ~Scope ()
 
virtual bool isUnit () const
 
virtual bool isProcedure () const
 
virtual bool isLocal () const
 
bool containsCodeLabel (const std::string &name) const
 
bool containsDataLabel (const std::string &name) const
 
const CodeLabel & codeLabel (const std::string &name) const
 
const DataLabel & dataLabel (const std::string &name) const
 
int codeLabelCount (Address address) const
 
const CodeLabel & codeLabel (Address address, int index) const
 
int dataLabelCount (Address address) const
 
const DataLabel & dataLabel (Address address, int index) const
 
virtual void addCodeLabel (const CodeLabel *codeLabel)
 
virtual void addDataLabel (const DataLabel *dataLabel)
 

Static Public Member Functions

static NullGlobalScope & instance ()
 

Protected Member Functions

 NullGlobalScope ()
 
- Protected Member Functions inherited from TTAProgram::GlobalScope
virtual void addGlobalCodeLabel (const CodeLabel &codeLabel, const Scope &owner)
 
virtual void addGlobalDataLabel (const DataLabel &codeLabel, const Scope &owner)
 
- Protected Member Functions inherited from TTAProgram::Scope
Scope & parent () const
 
void setParent (Scope &scope)
 
int childCount () const
 
void addChild (const Scope &scope)
 
const Scope & child (int index) const
 

Private Member Functions

 NullGlobalScope (const NullGlobalScope &)
 Copying not allowed.
 
NullGlobalScope & operator= (const NullGlobalScope &)
 Assignment not allowed.
 

Static Private Attributes

static NullGlobalScope instance_
 Unique instance of NullGlobalScope.
 

Additional Inherited Members

- Protected Types inherited from TTAProgram::Scope
typedef std::vector< const Scope * > ScopeList
 List for child scopes.
 
typedef std::vector< const DataLabel * > DataLabelList
 List of data labels.
 
typedef std::vector< const CodeLabel * > CodeLabelList
 List of code labels.
 
- Protected Attributes inherited from TTAProgram::Scope
ScopeList children_
 Child scopes.
 
DataLabelList dataLabels_
 Data labels contained by this scope.
 
CodeLabelList codeLabels_
 Code labels contained by this scope.
 

Detailed Description

A singleton class that represents a null global scope.

Definition at line 43 of file NullGlobalScope.hh.

Constructor & Destructor Documentation

◆ ~NullGlobalScope()

TTAProgram::NullGlobalScope::~NullGlobalScope ( )
virtual

The destructor.

Definition at line 55 of file NullGlobalScope.cc.

55 {
56}

◆ NullGlobalScope() [1/2]

TTAProgram::NullGlobalScope::NullGlobalScope ( )
protected

The constructor.

Definition at line 48 of file NullGlobalScope.cc.

48 :
49 GlobalScope() {
50}

◆ NullGlobalScope() [2/2]

TTAProgram::NullGlobalScope::NullGlobalScope ( const NullGlobalScope &  )
private

Copying not allowed.

Member Function Documentation

◆ instance()

NullGlobalScope & TTAProgram::NullGlobalScope::instance ( )
static

Returns an instance of NullGlobalScope class (singleton).

Returns
Singleton instance of NullGlobalScope class.

Definition at line 64 of file NullGlobalScope.cc.

64 {
65 return instance_;
66}
static NullGlobalScope instance_
Unique instance of NullGlobalScope.

References instance_.

Referenced by TTAProgram::NullProgram::globalScope(), and TTAProgram::NullProgram::globalScopeConst().

◆ operator=()

NullGlobalScope & TTAProgram::NullGlobalScope::operator= ( const NullGlobalScope &  )
private

Assignment not allowed.

Member Data Documentation

◆ instance_

NullGlobalScope TTAProgram::NullGlobalScope::instance_
staticprivate

Unique instance of NullGlobalScope.

Definition at line 58 of file NullGlobalScope.hh.

Referenced by instance().


The documentation for this class was generated from the following files: