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

#include <OperationBehavior.hh>

Inheritance diagram for NullOperationBehavior:
Inheritance graph
Collaboration diagram for NullOperationBehavior:
Collaboration graph

Public Member Functions

virtual bool simulateTrigger (SimValue **, OperationContext &context) const
 
virtual bool lateResult (SimValue **, OperationContext &context) const
 
- Public Member Functions inherited from OperationBehavior
virtual bool areValid (const InputOperandVector &inputs, const OperationContext &context) const
 
virtual void createState (OperationContext &context) const
 
virtual void deleteState (OperationContext &context) const
 
virtual const char * stateName () const
 
virtual bool canBeSimulated () const
 
virtual void writeOutput (const char *text) const
 
 OperationBehavior ()
 
 OperationBehavior (const Operation &parent)
 
virtual ~OperationBehavior ()
 

Static Public Member Functions

static NullOperationBehaviorinstance ()
 

Protected Member Functions

 NullOperationBehavior ()
 

Static Private Attributes

static NullOperationBehavior instance_
 

Additional Inherited Members

- Public Types inherited from OperationBehavior
typedef std::vector< SimValueInputOperandVector
 Input operand type for areValid() More...
 
- Protected Attributes inherited from OperationBehavior
const Operationparent_
 

Detailed Description

Singleton class to represent an undefined operation behavior.

All methods cause program abort with an error log message.

Definition at line 93 of file OperationBehavior.hh.

Constructor & Destructor Documentation

◆ NullOperationBehavior()

NullOperationBehavior::NullOperationBehavior ( )
inlineprotected

Definition at line 105 of file OperationBehavior.hh.

105 { }

Member Function Documentation

◆ instance()

static NullOperationBehavior& NullOperationBehavior::instance ( )
inlinestatic

◆ lateResult()

bool NullOperationBehavior::lateResult ( SimValue **  ,
OperationContext context 
) const
virtual

Writes an error message to error log and aborts the program.

Parameters
ioNot used.
contextNot used.
Returns
Never returns.

Definition at line 198 of file OperationBehavior.cc.

200  {
201 
203  return true;
204 }

References abortWithError, and ERROR_MESSAGE.

◆ simulateTrigger()

bool NullOperationBehavior::simulateTrigger ( SimValue **  ,
OperationContext context 
) const
virtual

Writes an error message to error log and aborts the program.

Parameters
ioNot used.
contextNot used.
Returns
Never returns.

Implements OperationBehavior.

Definition at line 182 of file OperationBehavior.cc.

184  {
185 
187  return true;
188 }

References abortWithError, and ERROR_MESSAGE.

Member Data Documentation

◆ instance_

NullOperationBehavior NullOperationBehavior::instance_
staticprivate

Definition at line 108 of file OperationBehavior.hh.

Referenced by instance().


The documentation for this class was generated from the following files:
NullOperationBehavior::instance_
static NullOperationBehavior instance_
Definition: OperationBehavior.hh:108
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
ERROR_MESSAGE
const char * ERROR_MESSAGE
Definition: OperationBehavior.cc:171