1 #include "InstructionList.h"
7 std::size_t InstructionList::get_instruction_count() const {
9 for(instruction_list_t::const_iterator i
= instruction_list
.begin(); i
!= instruction_list
.end(); i
++) {
10 if((*i
).is_valid()) count
++;
15 Misc::SmartPointer
<Instruction
> InstructionList::get_instruction_by_index(std::size_t index
) const {
16 instruction_list_t::const_iterator i
= instruction_list
.begin();
17 for(; index
> 0 && i
!= instruction_list
.end(); i
++) {
18 if((*i
).is_valid()) index
--;
20 if(i
== instruction_list
.end()) return NULL
;
25 } // namespace Monitor
26 } // namespace Aesalon