OpenASIP  2.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
NullRegisterFileState Class Reference

#include <RegisterFileState.hh>

Inheritance diagram for NullRegisterFileState:
Inheritance graph
Collaboration diagram for NullRegisterFileState:
Collaboration graph

Public Member Functions

virtual ~NullRegisterFileState ()
 
virtual RegisterStateregisterState (int index)
 
- Public Member Functions inherited from RegisterFileState
 RegisterFileState (int size, int width, bool zeroRegister=false)
 
virtual ~RegisterFileState ()
 
virtual std::size_t registerCount () const
 

Static Public Member Functions

static NullRegisterFileStateinstance ()
 

Private Member Functions

 NullRegisterFileState ()
 
 NullRegisterFileState (const NullRegisterFileState &)
 Copying not allowed. More...
 
NullRegisterFileStateoperator= (const NullRegisterFileState &)
 Assignment not allowed. More...
 

Static Private Attributes

static NullRegisterFileStateinstance_ = NULL
 Unique instance of NullRegisterFileState. More...
 

Detailed Description

Models non-existing RegisterFileState.

Definition at line 78 of file RegisterFileState.hh.

Constructor & Destructor Documentation

◆ ~NullRegisterFileState()

NullRegisterFileState::~NullRegisterFileState ( )
virtual

Destructor.

Definition at line 127 of file RegisterFileState.cc.

127  {
128 }

◆ NullRegisterFileState() [1/2]

NullRegisterFileState::NullRegisterFileState ( )
private

Constructor.

Definition at line 121 of file RegisterFileState.cc.

121  : RegisterFileState(0, 0) {
122 }

Referenced by instance().

◆ NullRegisterFileState() [2/2]

NullRegisterFileState::NullRegisterFileState ( const NullRegisterFileState )
private

Copying not allowed.

Member Function Documentation

◆ instance()

NullRegisterFileState & NullRegisterFileState::instance ( )
static

Returns the instance of NullRegisterFileState.

Returns
The instance of NullRegisterFileState.

Definition at line 111 of file RegisterFileState.cc.

111  {
112  if (instance_ == NULL) {
114  }
115  return *instance_;
116 }

References instance_, and NullRegisterFileState().

Referenced by MachineStateBuilder::buildMachineState(), RFTestbenchGenerator::createStimulus(), SimProgramBuilder::processBidirTerminal(), and MachineState::registerFileState().

Here is the call graph for this function:

◆ operator=()

NullRegisterFileState& NullRegisterFileState::operator= ( const NullRegisterFileState )
private

Assignment not allowed.

◆ registerState()

RegisterState & NullRegisterFileState::registerState ( int  index)
virtual

Aborts the program with error message.

Returns
Never returns.
Exceptions
OutOfRangeNever throws.

Reimplemented from RegisterFileState.

Definition at line 137 of file RegisterFileState.cc.

137  {
138  Application::abortWithError("registerState()");
140 }

References abortWithError, and NullRegisterState::instance().

Here is the call graph for this function:

Member Data Documentation

◆ instance_

NullRegisterFileState * NullRegisterFileState::instance_ = NULL
staticprivate

Unique instance of NullRegisterFileState.

Definition at line 94 of file RegisterFileState.hh.

Referenced by instance().


The documentation for this class was generated from the following files:
RegisterFileState::RegisterFileState
RegisterFileState(int size, int width, bool zeroRegister=false)
Definition: RegisterFileState.cc:54
NullRegisterFileState::instance_
static NullRegisterFileState * instance_
Unique instance of NullRegisterFileState.
Definition: RegisterFileState.hh:94
NullRegisterState::instance
static NullRegisterState & instance()
Definition: RegisterState.cc:108
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
NullRegisterFileState::NullRegisterFileState
NullRegisterFileState()
Definition: RegisterFileState.cc:121