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::NullAddress Class Reference

#include <NullAddress.hh>

Inheritance diagram for TTAProgram::NullAddress:
Inheritance graph
Collaboration diagram for TTAProgram::NullAddress:
Collaboration graph

Public Member Functions

virtual ~NullAddress ()
 
UIntWord location () const
 
const TTAMachine::AddressSpacespace () const
 
- Public Member Functions inherited from TTAProgram::Address
 Address (InstructionAddress location, const TTAMachine::AddressSpace &space)
 
 ~Address ()
 
InstructionAddress location () const
 
const TTAMachine::AddressSpacespace () const
 
bool operator== (const Address &other) const
 
bool operator!= (const Address &other) const
 
bool operator< (const Address &addr) const
 

Static Public Member Functions

static NullAddressinstance ()
 

Protected Member Functions

 NullAddress ()
 

Private Member Functions

 NullAddress (const NullAddress &)
 Copying not allowed.
 
NullAddressoperator= (const NullAddress &)
 Assignment not allowed.
 

Static Private Attributes

static NullAddress instance_
 

Detailed Description

A singleton class that represents a null address.

Calling any method causes the program to abort.

Definition at line 45 of file NullAddress.hh.

Constructor & Destructor Documentation

◆ ~NullAddress()

TTAProgram::NullAddress::~NullAddress ( )
virtual

The destructor.

Definition at line 56 of file NullAddress.cc.

56 {
57}

◆ NullAddress() [1/2]

TTAProgram::NullAddress::NullAddress ( )
protected

The constructor.

Definition at line 49 of file NullAddress.cc.

49 :
51}
static NullAddressSpace & instance()
Address(InstructionAddress location, const TTAMachine::AddressSpace &space)

◆ NullAddress() [2/2]

TTAProgram::NullAddress::NullAddress ( const NullAddress )
private

Copying not allowed.

Member Function Documentation

◆ instance()

NullAddress & TTAProgram::NullAddress::instance ( )
static

◆ location()

UIntWord TTAProgram::NullAddress::location ( ) const

Aborts program with error log message.

Returns
0.

Definition at line 75 of file NullAddress.cc.

75 {
76 abortWithError("location()");
77 return 0;
78}
#define abortWithError(message)

References abortWithError.

◆ operator=()

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

Assignment not allowed.

◆ space()

const AddressSpace & TTAProgram::NullAddress::space ( ) const

Aborts program with error log message.

Returns
A null address space.

Definition at line 86 of file NullAddress.cc.

86 {
87 abortWithError("space()");
89}

References abortWithError, and TTAMachine::NullAddressSpace::instance().

Here is the call graph for this function:

Member Data Documentation

◆ instance_

NullAddress TTAProgram::NullAddress::instance_
staticprivate

Definition at line 62 of file NullAddress.hh.

Referenced by instance().


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