Continued ripping up the source.
[aesalon.git] / monitor / src / misc / BlockEvent.h
blobca5661e35d9f38f47769a90415a5595618b6fc52
1 #ifndef AESALON_MISC_BLOCK_EVENT_H
2 #define AESALON_MISC_BLOCK_EVENT_H
4 #include "Event.h"
5 #include "Types.h"
7 namespace Aesalon {
8 namespace Misc {
10 class BlockEvent : public Event {
11 public:
12 enum block_event_type_e {
13 ALLOC_EVENT,
14 REALLOC_EVENT,
15 FREE_EVENT
17 private:
18 block_event_type_e block_type;
20 uint_64 address, size, new_address;
21 public:
22 BlockEvent(block_event_type_e type, uint_64 address, uint_64 size = 0,
23 uint_64 new_address = 0, uint_64 new_size = 0) : Event(BLOCK_EVENT), block_type(type),
24 address(address), size(size), new_address(new_address) {}
25 virtual ~BlockEvent() {}
27 block_event_type_e get_block_type() const { return block_type; }
29 uint_64 get_address() const { return address; }
30 uint_64 get_size() const { return size; }
31 uint_64 get_new_address() const { return new_address; }
33 virtual std::string serialize();
34 static Misc::SmartPointer<Event> deserialize(std::string data);
37 } // namespace Misc
38 } // namespace Aesalon
40 #endif