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

#include <OperationState.hh>

Inheritance diagram for NullOperationState:
Inheritance graph
Collaboration diagram for NullOperationState:
Collaboration graph

Public Member Functions

virtual const char * name ()
 
virtual bool isAvailable (const OperationContext &context) const
 
virtual void advanceClock (OperationContext &context)
 
- Public Member Functions inherited from OperationState
 OperationState ()
 
virtual ~OperationState ()
 

Static Public Member Functions

static NullOperationStateinstance ()
 

Static Private Attributes

static NullOperationStateinstance_ = NULL
 

Detailed Description

Singleton class that is used to represent a null value for operation state.

Definition at line 63 of file OperationState.hh.

Member Function Documentation

◆ advanceClock()

void NullOperationState::advanceClock ( OperationContext context)
virtual

Prints an error message and aborts the program.

Returns
Never returns.

Reimplemented from OperationState.

Definition at line 114 of file OperationState.cc.

114  {
116 }

References abortWithError, and NULL_ERROR_MESSAGE.

◆ instance()

static NullOperationState* NullOperationState::instance ( )
static

◆ isAvailable()

bool NullOperationState::isAvailable ( const OperationContext context) const
virtual

Prints an error message and aborts the program.

Returns
Never returns.

Reimplemented from OperationState.

Definition at line 103 of file OperationState.cc.

103  {
105  return false;
106 }

References abortWithError, and NULL_ERROR_MESSAGE.

◆ name()

const char * NullOperationState::name ( )
virtual

Returns the name of the state instance, in this case an empty string.

Returns
Empty string.

Implements OperationState.

Definition at line 93 of file OperationState.cc.

93  {
94  return "";
95 }

Member Data Documentation

◆ instance_

NullOperationState * NullOperationState::instance_ = NULL
staticprivate

Definition at line 72 of file OperationState.hh.


The documentation for this class was generated from the following files:
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
NULL_ERROR_MESSAGE
const std::string NULL_ERROR_MESSAGE
Definition: OperationState.cc:85