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

#include <RegisterState.hh>

Inheritance diagram for NullRegisterState:
Inheritance graph
Collaboration diagram for NullRegisterState:
Collaboration graph

Public Member Functions

virtual ~NullRegisterState ()
 
virtual void setValue (const SimValue &value)
 
virtual const SimValuevalue () const
 
- Public Member Functions inherited from RegisterState
 RegisterState (int width, bool constantZero=false)
 
 RegisterState (SimValue &sharedRegister)
 
virtual ~RegisterState ()
 
- Public Member Functions inherited from StateData
 StateData ()
 
virtual ~StateData ()
 
- Public Member Functions inherited from WritableState
 WritableState ()
 
virtual ~WritableState ()
 
- Public Member Functions inherited from ReadableState
 ReadableState ()
 
virtual ~ReadableState ()
 

Static Public Member Functions

static NullRegisterStateinstance ()
 

Private Member Functions

 NullRegisterState ()
 
 NullRegisterState (const NullRegisterState &)
 Copying not allowed. More...
 
NullRegisterStateoperator= (const NullRegisterState &)
 Assignment not allowed. More...
 

Static Private Attributes

static NullRegisterStateinstance_ = NULL
 Unique instance of NullRegisterState. More...
 

Additional Inherited Members

- Protected Attributes inherited from RegisterState
SimValuevalue_
 Value of the RegisterState. More...
 

Detailed Description

Models non-existing RegisterState.

Definition at line 83 of file RegisterState.hh.

Constructor & Destructor Documentation

◆ ~NullRegisterState()

NullRegisterState::~NullRegisterState ( )
virtual

Destructor.

Definition at line 124 of file RegisterState.cc.

124  {
125 }

◆ NullRegisterState() [1/2]

NullRegisterState::NullRegisterState ( )
private

Constructor.

Definition at line 118 of file RegisterState.cc.

118  : RegisterState(0) {
119 }

Referenced by instance().

◆ NullRegisterState() [2/2]

NullRegisterState::NullRegisterState ( const NullRegisterState )
private

Copying not allowed.

Member Function Documentation

◆ instance()

NullRegisterState & NullRegisterState::instance ( )
static

Returns instance of NullRegisterState.

Returns
The instance of NullRegisterState.

Definition at line 108 of file RegisterState.cc.

108  {
109  if (instance_ == NULL) {
111  }
112  return *instance_;
113 }

References instance_, and NullRegisterState().

Referenced by NullRegisterFileState::registerState().

Here is the call graph for this function:

◆ operator=()

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

Assignment not allowed.

◆ setValue()

void NullRegisterState::setValue ( const SimValue value)
virtual

Aborts the program with error message.

Reimplemented from RegisterState.

Definition at line 131 of file RegisterState.cc.

131  {
132  Application::abortWithError("setValue()");
133 }

References abortWithError.

◆ value()

const SimValue & NullRegisterState::value ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from RegisterState.

Definition at line 141 of file RegisterState.cc.

141  {
142  Application::abortWithError("value()");
143  return NullSimValue::instance();
144 }

References abortWithError, and NullSimValue::instance().

Here is the call graph for this function:

Member Data Documentation

◆ instance_

NullRegisterState * NullRegisterState::instance_ = NULL
staticprivate

Unique instance of NullRegisterState.

Definition at line 100 of file RegisterState.hh.

Referenced by instance().


The documentation for this class was generated from the following files:
NullSimValue::instance
static SimValue & instance()
Definition: SimValue.cc:1642
RegisterState::RegisterState
RegisterState(int width, bool constantZero=false)
Definition: RegisterState.cc:50
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
NullRegisterState::instance_
static NullRegisterState * instance_
Unique instance of NullRegisterState.
Definition: RegisterState.hh:100
NullRegisterState::NullRegisterState
NullRegisterState()
Definition: RegisterState.cc:118