summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAtle Hellvik Havsø <atle@havso.net>2010-11-21 21:35:14 +0100
committerAtle Hellvik Havsø <atle@havso.net>2010-11-21 21:35:14 +0100
commit8832f496bfc0069561ba092b10c66fd0cc861b59 (patch)
treece4430e0c63f37db299d2e420d153bce8ed1f6aa /common
parentd7892a9e7aa204ecaa19bd9b4d71887217fa18d0 (diff)
Added a empty RoundEnd Message.
Signed-off-by: Atle Hellvik Havsø <atle@havso.net>
Diffstat (limited to 'common')
-rw-r--r--common/connectionbase.cpp4
-rw-r--r--common/message.cpp4
-rw-r--r--common/message.h6
3 files changed, 14 insertions, 0 deletions
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<Message::RoundAction>();
break;
+
+ case Message::Types::RoundEnd:
+ m = make_shared<Message::RoundEnd>();
+ 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<RoundEnd> p;
+
+ RoundEnd();
+ };
typedef boost::shared_ptr<Base> p;
};