IDA Domain
BasicBlocks::Iterator Class Reference

Iterator for basic blocks in a function. More...

#include <basic_block.hpp>

Public Member Functions

 Iterator (const Database &database, const ea_t start_ea, const ea_t end_ea)
 Constructs a basic block iterator for the specified function. More...
 
int get_count ()
 Retrieves the number of basic blocks in the current range. More...
 
qbasic_block_t get_at_index (int index)
 Retrieves the basic block at the given index. More...
 

Detailed Description

Iterator for basic blocks in a function.

Constructor & Destructor Documentation

◆ Iterator()

BasicBlocks::Iterator::Iterator ( const Database database,
const ea_t  start_ea,
const ea_t  end_ea 
)
inline

Constructs a basic block iterator for the specified function.

Parameters
databaseReference to the active IDA database.
start_eaStart address of the function.
end_eaEnd address of the function.

Member Function Documentation

◆ get_at_index()

qbasic_block_t BasicBlocks::Iterator::get_at_index ( int  index)

Retrieves the basic block at the given index.

Parameters
indexThe index of the block.
Returns
The qbasic_block_t at the specified index, or an empty block on error.

◆ get_count()

int BasicBlocks::Iterator::get_count ( )

Retrieves the number of basic blocks in the current range.

Returns
The number of basic blocks.

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