srecord
1.65.0
|
The srecord::memory_chunk class is used to represent portion of memory. More...
#include <chunk.h>
Public Types | |
enum | { size = 7 * 256 } |
Public Member Functions | |
memory_chunk (unsigned long address) | |
The constructor. More... | |
memory_chunk (const memory_chunk &) | |
The copy constructor. More... | |
memory_chunk & | operator= (const memory_chunk &) |
The assignment operator. More... | |
~memory_chunk () | |
The destructor. More... | |
void | set (unsigned long offset, int value) |
The set method is used to set the byte at the given offset within the chunk. More... | |
int | get (unsigned long offset) |
The get method is used to get the value at the given offset within the chunk. More... | |
bool | set_p (unsigned long) const |
The get_p method is used to determine whether the byte at the given offset within the chunk contains valid data. More... | |
void | walk (memory_walker::pointer) const |
The walk method is used to iterate across all of the bytes which are set within the chunk, calling the walker's observe method. More... | |
unsigned long | get_address () const |
The get_address method is used to get the address of the memory chunk. More... | |
bool | find_next_data (unsigned long &, void *, size_t &) const |
The find_next_data method is used when iteratinbg across all of the bytes set within the chunk. More... | |
unsigned long | get_upper_bound () const |
The get_upper_bound method is used to determine the upper bound (offset of last byte with valid data, plus one) of the chunk. More... | |
unsigned long | get_lower_bound () const |
The get_lower_bound method is used to determine the lower bound (offset of first byte with valid data) of the chunk. More... | |
Static Public Member Functions | |
static bool | equal (const memory_chunk &, const memory_chunk &) |
The equal class method is used to determine wherther two memory chunks are equal. More... | |
The srecord::memory_chunk class is used to represent portion of memory.
Not all bytes are actually set, so there is a bit map of which bytes actually contain data.
anonymous enum |
Enumerator | |
---|---|
size | The size value is the size, in bytes, of each memory chunk.
|
srecord::memory_chunk::memory_chunk | ( | unsigned long | address | ) |
The constructor.
srecord::memory_chunk::memory_chunk | ( | const memory_chunk & | ) |
The copy constructor.
srecord::memory_chunk::~memory_chunk | ( | ) |
The destructor.
memory_chunk& srecord::memory_chunk::operator= | ( | const memory_chunk & | ) |
The assignment operator.
void srecord::memory_chunk::set | ( | unsigned long | offset, |
int | value | ||
) |
The set method is used to set the byte at the given offset within the chunk.
int srecord::memory_chunk::get | ( | unsigned long | offset | ) |
The get method is used to get the value at the given offset within the chunk.
bool srecord::memory_chunk::set_p | ( | unsigned long | ) | const |
The get_p method is used to determine whether the byte at the given offset within the chunk contains valid data.
void srecord::memory_chunk::walk | ( | memory_walker::pointer | ) | const |
The walk method is used to iterate across all of the bytes which are set within the chunk, calling the walker's observe method.
|
inline |
|
static |
The equal class method is used to determine wherther two memory chunks are equal.
The must have the same address, the same bit mask, and the same byte values on the valid bytes.
bool srecord::memory_chunk::find_next_data | ( | unsigned long & | , |
void * | , | ||
size_t & | |||
) | const |
The find_next_data method is used when iteratinbg across all of the bytes set within the chunk.
unsigned long srecord::memory_chunk::get_upper_bound | ( | ) | const |
The get_upper_bound method is used to determine the upper bound (offset of last byte with valid data, plus one) of the chunk.
It returns a memory byte address, NOT the chunk offset.
unsigned long srecord::memory_chunk::get_lower_bound | ( | ) | const |
The get_lower_bound method is used to determine the lower bound (offset of first byte with valid data) of the chunk.
It returns a memory byte address, NOT the chunk offset.