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

#include <DisassemblyAnnotation.hh>

Inheritance diagram for DisassemblyAnnotation:
Inheritance graph
Collaboration diagram for DisassemblyAnnotation:
Collaboration graph

Public Member Functions

 DisassemblyAnnotation (Word id, const std::vector< Byte > &payload)
 
virtual ~DisassemblyAnnotation ()
 
virtual std::string toString () const
 
- Public Member Functions inherited from DisassemblyElement
virtual ~DisassemblyElement ()
 

Private Attributes

Word id_
 Annotation id. More...
 
std::vector< Bytepayload_
 Name of the operation. More...
 

Additional Inherited Members

- Protected Member Functions inherited from DisassemblyElement
 DisassemblyElement ()
 

Detailed Description

Represents an annotation.

Definition at line 44 of file DisassemblyAnnotation.hh.

Constructor & Destructor Documentation

◆ DisassemblyAnnotation()

DisassemblyAnnotation::DisassemblyAnnotation ( Word  id,
const std::vector< Byte > &  payload 
)

Constructor.

Parameters
idId of the annotation.
payloadData for the annotation.

Definition at line 45 of file DisassemblyAnnotation.cc.

46  :
47  DisassemblyElement(), id_(id), payload_(payload) {
48 }

◆ ~DisassemblyAnnotation()

DisassemblyAnnotation::~DisassemblyAnnotation ( )
virtual

Destructor.

Definition at line 53 of file DisassemblyAnnotation.cc.

53  {
54 }

Member Function Documentation

◆ toString()

string DisassemblyAnnotation::toString ( ) const
virtual

Returns disassembly of the annotation.

Implements DisassemblyElement.

Definition at line 61 of file DisassemblyAnnotation.cc.

61  {
62 
63  std::stringstream retVal;
64  retVal << "{" << std::hex << "0x" << id_;
65 
66  for (unsigned int i = 0; i < payload_.size(); i++) {
67  retVal << " " << int(payload_[i]);
68  }
69 
70  retVal << "}";
71  return retVal.str();
72 }

References id_, and payload_.

Referenced by DisassemblyMove::toString(), DisassemblyImmediateAssignment::toString(), and DisassemblyInstruction::toString().

Member Data Documentation

◆ id_

Word DisassemblyAnnotation::id_
private

Annotation id.

Definition at line 52 of file DisassemblyAnnotation.hh.

Referenced by toString().

◆ payload_

std::vector<Byte> DisassemblyAnnotation::payload_
private

Name of the operation.

Definition at line 54 of file DisassemblyAnnotation.hh.

Referenced by toString().


The documentation for this class was generated from the following files:
DisassemblyAnnotation::id_
Word id_
Annotation id.
Definition: DisassemblyAnnotation.hh:52
DisassemblyElement::DisassemblyElement
DisassemblyElement()
Definition: DisassemblyElement.cc:38
DisassemblyAnnotation::payload_
std::vector< Byte > payload_
Name of the operation.
Definition: DisassemblyAnnotation.hh:54