OpenASIP  2.0
Public Member Functions | List of all members
OperationState Class Referenceabstract

#include <OperationState.hh>

Inheritance diagram for OperationState:
Inheritance graph
Collaboration diagram for OperationState:
Collaboration graph

Public Member Functions

 OperationState ()
 
virtual ~OperationState ()
 
virtual const char * name ()=0
 
virtual bool isAvailable (const OperationContext &context) const
 
virtual void advanceClock (OperationContext &context)
 

Detailed Description

OperationState is the base class of all operation state classes.

Operation state classes store state information specific to a family of operations.

Definition at line 46 of file OperationState.hh.

Constructor & Destructor Documentation

◆ OperationState()

OperationState::OperationState ( )

Constructor.

Definition at line 43 of file OperationState.cc.

43  {
44 }

◆ ~OperationState()

OperationState::~OperationState ( )
virtual

Destructor.

Definition at line 49 of file OperationState.cc.

49  {
50 }

Member Function Documentation

◆ advanceClock()

void OperationState::advanceClock ( OperationContext context)
virtual

This method should be invoced in every clock cycle.

If this method is not invoced on every clock cycle, some pending results may get lost.

Parameters
contextThe operation context which should be used for calculating the pending results.

Reimplemented in NullOperationState.

Definition at line 77 of file OperationState.cc.

77  {
78 }

◆ isAvailable()

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

Returns true if operation state is in "available" state.

If operation state is available, it means that new operations can be started. If it's not avaiable, no further operations should be invoked.

Parameters
contextThe operation context of which availability to check.
Returns
True if operation state is in available state. By default, operation state is available.

Reimplemented in NullOperationState.

Definition at line 63 of file OperationState.cc.

63  {
64  return true;
65 }

◆ name()

virtual const char* OperationState::name ( )
pure virtual

The documentation for this class was generated from the following files: