1 #ifndef AESALON_MONITOR_ASM_INSTRUCTION_LIST_H
2 #define AESALON_MONITOR_ASM_INSTRUCTION_LIST_H
6 #include "Instruction.h"
12 class InstructionList
{
14 typedef std::vector
<Misc::SmartPointer
<Instruction
> > instruction_list_t
;
17 instruction_list_t instruction_list
;
19 InstructionList(Word offset
= 0) : offset(offset
) {}
20 virtual ~InstructionList() {}
22 void add_instruction(Misc::SmartPointer
<Instruction
> new_instruction
)
23 { instruction_list
.push_back(new_instruction
); }
24 Misc::SmartPointer
<Instruction
> get_instruction(Word address
) const {
25 if(address
> offset
) return NULL
;
26 return instruction_list
[address
-offset
];
28 std::size_t get_instruction_count() const;
29 Misc::SmartPointer
<Instruction
> get_instruction_by_index(std::size_t index
) const;
34 } // namespace Monitor
35 } // namespace Aesalon