OpenASIP  2.0
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
TPEF::InstructionElement Class Reference

#include <InstructionElement.hh>

Inheritance diagram for TPEF::InstructionElement:
Inheritance graph
Collaboration diagram for TPEF::InstructionElement:
Collaboration graph

Public Member Functions

virtual ~InstructionElement ()
 
bool isMove () const
 
bool isImmediate () const
 
bool begin () const
 
void setBegin (bool isBegin)
 
InstructionAnnotationannotation (Word index) const
 
void addAnnotation (InstructionAnnotation *anAnnotation)
 
Word annotationCount () const
 
- Public Member Functions inherited from TPEF::SectionElement
virtual ~SectionElement ()
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Protected Member Functions

 InstructionElement (bool isMove)
 
- Protected Member Functions inherited from TPEF::SectionElement
 SectionElement ()
 
- Protected Member Functions inherited from TPEF::SafePointable
 SafePointable ()
 

Private Attributes

bool begin_
 Is the first element of whole instruction. More...
 
bool isMove_
 Is move or immediate. More...
 
std::vector< InstructionAnnotation * > annotations_
 All annotations. More...
 

Detailed Description

Abstract base class for all instructions of CodeSection.

Definition at line 77 of file InstructionElement.hh.

Constructor & Destructor Documentation

◆ ~InstructionElement()

TPEF::InstructionElement::~InstructionElement ( )
virtual

Destructor

Definition at line 83 of file InstructionElement.cc.

83  {
84  for (Word i = 0; i < annotationCount(); i++) {
85  delete annotation(i);
86  }
87 }

References annotation(), and annotationCount().

Here is the call graph for this function:

◆ InstructionElement()

TPEF::InstructionElement::InstructionElement ( bool  isMove)
protected

Constructor

Definition at line 76 of file InstructionElement.cc.

76  :
77  SectionElement(), begin_(false), isMove_(isMove) {
78 }

Member Function Documentation

◆ addAnnotation()

void TPEF::InstructionElement::addAnnotation ( InstructionAnnotation anAnnotation)

◆ annotation()

InstructionAnnotation* TPEF::InstructionElement::annotation ( Word  index) const

◆ annotationCount()

Word TPEF::InstructionElement::annotationCount ( ) const

◆ begin()

bool TPEF::InstructionElement::begin ( ) const

◆ isImmediate()

bool TPEF::InstructionElement::isImmediate ( ) const

◆ isMove()

bool TPEF::InstructionElement::isMove ( ) const

◆ setBegin()

void TPEF::InstructionElement::setBegin ( bool  isBegin)

Member Data Documentation

◆ annotations_

std::vector<InstructionAnnotation*> TPEF::InstructionElement::annotations_
private

All annotations.

Definition at line 101 of file InstructionElement.hh.

◆ begin_

bool TPEF::InstructionElement::begin_
private

Is the first element of whole instruction.

Definition at line 96 of file InstructionElement.hh.

◆ isMove_

bool TPEF::InstructionElement::isMove_
private

Is move or immediate.

Definition at line 98 of file InstructionElement.hh.


The documentation for this class was generated from the following files:
TPEF::InstructionElement::isMove
bool isMove() const
TPEF::SectionElement::SectionElement
SectionElement()
Definition: SectionElement.cc:41
TPEF::InstructionElement::annotation
InstructionAnnotation * annotation(Word index) const
TPEF::InstructionElement::begin_
bool begin_
Is the first element of whole instruction.
Definition: InstructionElement.hh:96
TPEF::InstructionElement::annotationCount
Word annotationCount() const
TPEF::InstructionElement::isMove_
bool isMove_
Is move or immediate.
Definition: InstructionElement.hh:98