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

#include <DisassemblyImmediateRegister.hh>

Inheritance diagram for DisassemblyImmediateRegister:
Inheritance graph
Collaboration diagram for DisassemblyImmediateRegister:
Collaboration graph

Public Member Functions

 DisassemblyImmediateRegister (std::string rfName, Word index)
 
virtual ~DisassemblyImmediateRegister ()
 
std::string toString () const
 
- Public Member Functions inherited from DisassemblyElement
virtual ~DisassemblyElement ()
 

Private Attributes

std::string immName_
 Name of the immediate unit. More...
 
Word index_
 Index of the register in the immediate unit. More...
 

Additional Inherited Members

- Protected Member Functions inherited from DisassemblyElement
 DisassemblyElement ()
 

Detailed Description

Represents an immediate register in the disassembler.

Definition at line 43 of file DisassemblyImmediateRegister.hh.

Constructor & Destructor Documentation

◆ DisassemblyImmediateRegister()

DisassemblyImmediateRegister::DisassemblyImmediateRegister ( std::string  immName,
Word  index 
)

The constructor.

Parameters
immNameName of the immediate unit.
indexIndex of the register in the immediate unit.

Definition at line 42 of file DisassemblyImmediateRegister.cc.

43  :
45  immName_(immName),
46  index_(index) {
47 }

◆ ~DisassemblyImmediateRegister()

DisassemblyImmediateRegister::~DisassemblyImmediateRegister ( )
virtual

The destructor.

Definition at line 53 of file DisassemblyImmediateRegister.cc.

53  {
54 }

Member Function Documentation

◆ toString()

std::string DisassemblyImmediateRegister::toString ( ) const
virtual

Returns disassembly of the immediate register.

Returns
Disassembly of the immediate register as a string.

Implements DisassemblyElement.

Definition at line 64 of file DisassemblyImmediateRegister.cc.

64  {
65  return immName_ + "." + Conversion::toString(index_);
66 }

References immName_, index_, and Conversion::toString().

Here is the call graph for this function:

Member Data Documentation

◆ immName_

std::string DisassemblyImmediateRegister::immName_
private

Name of the immediate unit.

Definition at line 50 of file DisassemblyImmediateRegister.hh.

Referenced by toString().

◆ index_

Word DisassemblyImmediateRegister::index_
private

Index of the register in the immediate unit.

Definition at line 52 of file DisassemblyImmediateRegister.hh.

Referenced by toString().


The documentation for this class was generated from the following files:
Conversion::toString
static std::string toString(const T &source)
DisassemblyImmediateRegister::immName_
std::string immName_
Name of the immediate unit.
Definition: DisassemblyImmediateRegister.hh:50
DisassemblyElement::DisassemblyElement
DisassemblyElement()
Definition: DisassemblyElement.cc:38
DisassemblyImmediateRegister::index_
Word index_
Index of the register in the immediate unit.
Definition: DisassemblyImmediateRegister.hh:52