Continued ripping up the source.
[aesalon.git] / monitor / src / MemoryBlock.h
blob8c0119bf3011395e172cbe0d1d7175cf16ac1671
1 #ifndef AESALON_MONITOR_MEMORY_BLOCK_H
2 #define AESALON_MONITOR_MEMORY_BLOCK_H
4 #include "Types.h"
6 namespace Aesalon {
7 namespace Monitor {
9 /** A representation of a block of allocated memory. */
10 class MemoryBlock {
11 private:
12 /** The address of the block. */
13 Word address;
14 /** The size of the block. */
15 Word size;
16 public:
17 /** Generic constructor.
18 @param address The address of the block.
19 @param size The size of the block.
21 MemoryBlock(Word address, Word size) : address(address), size(size) {}
23 /** Gets the address of the current block.
24 @return The address of the block.
26 Word get_address() const { return address; }
27 /** Changes the address of the current block.
28 @param new_addres The new address.
30 void set_address(Word new_address) { address = new_address; }
31 /** Returns the current size of the current block.
32 @return The current size.
34 Word get_size() const { return size; }
35 /** Changes the size of the current block.
36 @param new_size The new size.
38 void set_size(Word new_size) { size = new_size; }
41 } // namespace Monitor
42 } // namespace Aesalon
44 #endif