OpenASIP  2.0
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. More...
 
NullAddressoperator= (const NullAddress &)
 Assignment not allowed. More...
 

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  :
50  Address(0, NullAddressSpace::instance()) {
51 }

◆ 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 }

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()");
88  return NullAddressSpace::instance();
89 }

References abortWithError.

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:
TTAProgram::NullAddress::instance_
static NullAddress instance_
Definition: NullAddress.hh:62
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
TTAProgram::Address::Address
Address(InstructionAddress location, const TTAMachine::AddressSpace &space)