OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
NullInstructionField Class Reference

#include <NullInstructionField.hh>

Inheritance diagram for NullInstructionField:
Inheritance graph
Collaboration diagram for NullInstructionField:
Collaboration graph

Public Member Functions

virtual int childFieldCount () const
 
virtual InstructionField & childField (int position) const
 
virtual int width () const
 
- Public Member Functions inherited from InstructionField
virtual ~InstructionField ()
 
InstructionField * parent () const
 
int bitPosition () const
 
int relativePosition () const
 
virtual void setRelativePosition (int position)
 
void setExtraBits (int bits)
 
int extraBits () const
 
virtual void loadState (const ObjectState *state)
 
virtual ObjectState * saveState () const
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 

Static Public Member Functions

static NullInstructionField & instance ()
 

Private Member Functions

 NullInstructionField ()
 
virtual ~NullInstructionField ()
 

Static Private Attributes

static NullInstructionField instance_
 The only instance.
 

Additional Inherited Members

- Static Public Attributes inherited from InstructionField
static const std::string OSNAME_INSTRUCTION_FIELD = "instr_field"
 ObjectState name for instruction field.
 
static const std::string OSKEY_EXTRA_BITS = "extra_bits"
 ObjectState attribute key for the number of extra bits.
 
static const std::string OSKEY_POSITION = "position"
 ObjectState attribute key for the relative position of the field.
 
- Protected Member Functions inherited from InstructionField
 InstructionField (InstructionField *parent)
 
 InstructionField (const ObjectState *state, InstructionField *parent)
 
void setParent (InstructionField *parent)
 
- Static Protected Member Functions inherited from InstructionField
static void reorderSubfields (ObjectState *state)
 

Detailed Description

A null version of instruction field.

Definition at line 41 of file NullInstructionField.hh.

Constructor & Destructor Documentation

◆ NullInstructionField()

NullInstructionField::NullInstructionField ( )
private

The constructor.

Definition at line 45 of file NullInstructionField.cc.

◆ ~NullInstructionField()

NullInstructionField::~NullInstructionField ( )
privatevirtual

The destructor.

Definition at line 52 of file NullInstructionField.cc.

52 {
53}

Member Function Documentation

◆ childField()

InstructionField & NullInstructionField::childField ( int  position) const
virtual

Always throws OutOfRange exception.

Returns
Never returns.
Exceptions
OutOfRangeAlways thrown.

Reimplemented from InstructionField.

Definition at line 85 of file NullInstructionField.cc.

85 {
86 const string procName = "NullInstructionField::childField";
87 throw OutOfRange(__FILE__, __LINE__, procName);
88}

◆ childFieldCount()

int NullInstructionField::childFieldCount ( ) const
virtual

Always returns 0.

Returns
0.

Implements InstructionField.

Definition at line 73 of file NullInstructionField.cc.

73 {
74 return 0;
75}

◆ instance()

NullInstructionField & NullInstructionField::instance ( )
static

Returns the only instance of NullInstructionField.

Returns
The only instance of NullInstructionField.

Definition at line 62 of file NullInstructionField.cc.

62 {
63 return instance_;
64}
static NullInstructionField instance_
The only instance.

References instance_.

Referenced by BinaryEncoding::childField(), InstructionField::childField(), MoveSlot::childField(), and InstructionField::setRelativePosition().

◆ width()

int NullInstructionField::width ( ) const
virtual

Always returns 0.

Returns
0.

Implements InstructionField.

Definition at line 96 of file NullInstructionField.cc.

96 {
97 return 0;
98}

Member Data Documentation

◆ instance_

NullInstructionField NullInstructionField::instance_
staticprivate

The only instance.

Definition at line 54 of file NullInstructionField.hh.

Referenced by instance().


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