19 #ifndef SRECORD_MEMORY_CHUNK_H
20 #define SRECORD_MEMORY_CHUNK_H
77 void set(
unsigned long offset,
int value);
83 int get(
unsigned long offset);
89 bool set_p(
unsigned long)
const;
137 unsigned long address;
142 unsigned char data[
size];
148 unsigned char mask[(
size + 7) / 8];
The srecord::memory_chunk class is used to represent portion of memory.
unsigned long get_address() const
The get_address method is used to get the address of the memory chunk.
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 ...
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,...
static bool equal(const memory_chunk &, const memory_chunk &)
The equal class method is used to determine wherther two memory chunks are equal.
@ size
The size value is the size, in bytes, of each memory chunk.
memory_chunk(unsigned long address)
The constructor.
~memory_chunk()
The destructor.
void set(unsigned long offset, int value)
The set method is used to set the byte at the given offset within the chunk.
memory_chunk(const memory_chunk &)
The copy constructor.
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.
int get(unsigned long offset)
The get method is used to get the value at the given offset within the chunk.
memory_chunk & operator=(const memory_chunk &)
The assignment operator.
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...
void walk(memory_walker::pointer) const
The walk method is used to iterate across all of the bytes which are set within the chunk,...
std::shared_ptr< memory_walker > pointer
bool operator==(const interval &lhs, const interval &rhs)
The equality operator is used to determine if two intervals are the same.
bool operator!=(const interval &lhs, const interval &rhs)
The inequality operator is used to determine if two intervals are different.