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

#include <BusState.hh>

Inheritance diagram for NullBusState:
Inheritance graph
Collaboration diagram for NullBusState:
Collaboration graph

Public Member Functions

virtual ~NullBusState ()
 
virtual void setValue (const SimValue &value)
 
virtual const SimValuevalue () const
 
- Public Member Functions inherited from BusState
 BusState (int width)
 
virtual ~BusState ()
 
void setValueInlined (const SimValue &value)
 
void clear ()
 
void setSquashed (bool isSquashed)
 
bool isSquashed () const
 
int width () 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 NullBusStateinstance ()
 

Private Member Functions

 NullBusState ()
 
 NullBusState (const NullBusState &)
 Copying not allowed. More...
 
NullBusStateoperator= (const NullBusState &)
 Assignment not allowed. More...
 

Static Private Attributes

static NullBusStateinstance_ = NULL
 Unique instance of NullBusState. More...
 

Additional Inherited Members

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

Detailed Description

Models null BusState object.

Definition at line 85 of file BusState.hh.

Constructor & Destructor Documentation

◆ ~NullBusState()

NullBusState::~NullBusState ( )
virtual

Destructor.

Definition at line 128 of file BusState.cc.

128  {
129 }

◆ NullBusState() [1/2]

NullBusState::NullBusState ( )
private

Constructor.

Definition at line 122 of file BusState.cc.

122  : BusState(0) {
123 }

Referenced by instance().

◆ NullBusState() [2/2]

NullBusState::NullBusState ( const NullBusState )
private

Copying not allowed.

Member Function Documentation

◆ instance()

NullBusState & NullBusState::instance ( )
static

Returns the instance of NullBusState.

Returns
The instance of NullBusState.

Definition at line 112 of file BusState.cc.

112  {
113  if (instance_ == NULL) {
114  instance_ = new NullBusState();
115  }
116  return *instance_;
117 }

References instance_, and NullBusState().

Referenced by MachineState::busState(), and SimProgramBuilder::processMove().

Here is the call graph for this function:

◆ operator=()

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

Assignment not allowed.

◆ setValue()

void NullBusState::setValue ( const SimValue value)
virtual

Aborts the program with error message.

Reimplemented from BusState.

Definition at line 135 of file BusState.cc.

135  {
136  Application::abortWithError("setValue()");
137 }

References abortWithError.

◆ value()

const SimValue & NullBusState::value ( ) const
virtual

Aborts the program with error message.

Returns
Never returns.

Reimplemented from RegisterState.

Definition at line 145 of file BusState.cc.

145  {
146  Application::abortWithError("value()");
147  return NullSimValue::instance();
148 }

References abortWithError, and NullSimValue::instance().

Here is the call graph for this function:

Member Data Documentation

◆ instance_

NullBusState * NullBusState::instance_ = NULL
staticprivate

Unique instance of NullBusState.

Definition at line 102 of file BusState.hh.

Referenced by instance().


The documentation for this class was generated from the following files:
NullSimValue::instance
static SimValue & instance()
Definition: SimValue.cc:1642
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
NullBusState::instance_
static NullBusState * instance_
Unique instance of NullBusState.
Definition: BusState.hh:102
NullBusState::NullBusState
NullBusState()
Definition: BusState.cc:122
BusState::BusState
BusState(int width)
Definition: BusState.cc:50