OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
DisassemblyInstructionSlot Class Referenceabstract

#include <DisassemblyInstructionSlot.hh>

Inheritance diagram for DisassemblyInstructionSlot:
Inheritance graph
Collaboration diagram for DisassemblyInstructionSlot:
Collaboration graph

Public Member Functions

virtual ~DisassemblyInstructionSlot ()
 
virtual std::string toString () const =0
 
DisassemblyAnnotationannotation (int index) const
 
void addAnnotation (DisassemblyAnnotation *annotation)
 
int annotationCount () const
 

Protected Member Functions

 DisassemblyInstructionSlot ()
 

Private Member Functions

 DisassemblyInstructionSlot (const DisassemblyInstructionSlot &)
 Copying not allowed.
 
DisassemblyInstructionSlotoperator= (const DisassemblyInstructionSlot &)
 Assignment not allowed.
 

Private Attributes

std::vector< DisassemblyAnnotation * > annotationes_
 Annotationes of move or long immediates.
 

Detailed Description

An abstract base class for instruction disassembly slots.

Definition at line 43 of file DisassemblyInstructionSlot.hh.

Constructor & Destructor Documentation

◆ ~DisassemblyInstructionSlot()

DisassemblyInstructionSlot::~DisassemblyInstructionSlot ( )
virtual

The destructor.

Definition at line 46 of file DisassemblyInstructionSlot.cc.

46 {
47 for (int i = 0; i < annotationCount(); i++) {
48 delete &(annotation(i));
49 }
50 annotationes_.clear();
51}
std::vector< DisassemblyAnnotation * > annotationes_
Annotationes of move or long immediates.
DisassemblyAnnotation & annotation(int index) const

References annotation(), annotationCount(), and annotationes_.

Here is the call graph for this function:

◆ DisassemblyInstructionSlot() [1/2]

DisassemblyInstructionSlot::DisassemblyInstructionSlot ( )
protected

The Constructor.

Definition at line 39 of file DisassemblyInstructionSlot.cc.

39 {
40}

◆ DisassemblyInstructionSlot() [2/2]

DisassemblyInstructionSlot::DisassemblyInstructionSlot ( const DisassemblyInstructionSlot )
private

Copying not allowed.

Member Function Documentation

◆ addAnnotation()

void DisassemblyInstructionSlot::addAnnotation ( DisassemblyAnnotation annotation)

Adds an annotation to instruction slot.

Parameters
annotationAnnotation to add.

Definition at line 70 of file DisassemblyInstructionSlot.cc.

70 {
71 annotationes_.push_back(annotation);
72}

References annotation(), and annotationes_.

Referenced by TPEFDisassembler::createInstruction().

Here is the call graph for this function:

◆ annotation()

DisassemblyAnnotation & DisassemblyInstructionSlot::annotation ( int  index) const

Returns annotation of requested index.

Parameters
indexIndex of annotation to return.
Returns
Annotation of requested index.

Definition at line 60 of file DisassemblyInstructionSlot.cc.

60 {
61 return *(annotationes_.at(index));
62}

References annotationes_.

Referenced by addAnnotation(), DisassemblyImmediateAssignment::toString(), DisassemblyMove::toString(), and ~DisassemblyInstructionSlot().

◆ annotationCount()

int DisassemblyInstructionSlot::annotationCount ( ) const

Returns the number of annotationes stored for the slot.

Returns
The number of annotationes stored for the slot.

Definition at line 80 of file DisassemblyInstructionSlot.cc.

80 {
81 return static_cast<int>(annotationes_.size());
82}

References annotationes_.

Referenced by DisassemblyImmediateAssignment::toString(), DisassemblyMove::toString(), and ~DisassemblyInstructionSlot().

◆ operator=()

DisassemblyInstructionSlot & DisassemblyInstructionSlot::operator= ( const DisassemblyInstructionSlot )
private

Assignment not allowed.

◆ toString()

virtual std::string DisassemblyInstructionSlot::toString ( ) const
pure virtual

Member Data Documentation

◆ annotationes_

std::vector<DisassemblyAnnotation*> DisassemblyInstructionSlot::annotationes_
private

Annotationes of move or long immediates.

Definition at line 61 of file DisassemblyInstructionSlot.hh.

Referenced by addAnnotation(), annotation(), annotationCount(), and ~DisassemblyInstructionSlot().


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