From 8832f496bfc0069561ba092b10c66fd0cc861b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atle=20Hellvik=20Havs=C3=B8?= Date: Sun, 21 Nov 2010 21:35:14 +0100 Subject: Added a empty RoundEnd Message. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Atle Hellvik Havsø --- common/connectionbase.cpp | 4 ++++ common/message.cpp | 4 ++++ common/message.h | 6 ++++++ 3 files changed, 14 insertions(+) (limited to 'common') diff --git a/common/connectionbase.cpp b/common/connectionbase.cpp index 66b5140..165614f 100644 --- a/common/connectionbase.cpp +++ b/common/connectionbase.cpp @@ -69,6 +69,10 @@ void ConnectionBase::got_data(uint8_t* data, std::size_t bytes) { case Message::Types::RoundAction: m = make_shared(); break; + + case Message::Types::RoundEnd: + m = make_shared(); + break; default: throw std::runtime_error("Deserialization attempted on unknown message type."); diff --git a/common/message.cpp b/common/message.cpp index 4f7bad3..f3a4748 100644 --- a/common/message.cpp +++ b/common/message.cpp @@ -159,3 +159,7 @@ void Message::RoundAction::serialize(boost::archive::text_oarchive& ar) { void Message::RoundAction::deserialize(boost::archive::text_iarchive& ar) { ar & action; } + +Message::RoundEnd::RoundEnd() : NullBase(Types::RoundEnd) { + +} diff --git a/common/message.h b/common/message.h index 584a850..efcca2e 100644 --- a/common/message.h +++ b/common/message.h @@ -159,6 +159,12 @@ namespace Message { virtual void deserialize(boost::archive::text_iarchive& ar); }; + class RoundEnd : public NullBase { + public: + typedef boost::shared_ptr p; + + RoundEnd(); + }; typedef boost::shared_ptr p; }; -- cgit v1.2.3