2 #include "BlockEvent.h"
3 #include "StreamAsString.h"
9 std::string
Event::serialize() {
10 if(type
== BLOCK_EVENT
) return Misc::StreamAsString() << 0x01;
11 throw Misc::Exception("Asked to serialize invalid Event");
14 Misc::SmartPointer
<Event
> Event::deserialize(std::string data
) {
15 if(data
[0] == '1') return BlockEvent::deserialize(data
.substr(1));
20 } // namespace Aesalon