Make protocol messages structs instead of classes
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 26 Feb 2013 22:04:40 +0000 (23:04 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 7 Nov 2013 22:05:49 +0000 (23:05 +0100)
commit9dfc807d8f60135976d4ea0ed31022304fad8f4c
treee417a07f0958d04b0ef0ca7483288253249a17f8
parentfc378f90d532416e43fe35955d29bd33d99a7c94
Make protocol messages structs instead of classes

Encapsulation with private members and accessors is nice, but for something
that is just a POD and will most probably stay that way, it's overkill [1].
So we're turning the classes into structs with direct member access.

Most beneficially, this makes protocol.h much nicer to read.

As a bonus, we introduce a common baseclass that holds the handler() method to
remove duplication.

[1] Even Qt sets a precedent for that, e.g. QPair and many other PODs that are
    implemented as structs with public member access even in the public API.
src/common/protocol.h
src/common/protocols/legacy/legacypeer.cpp
src/common/remotepeer.cpp
src/common/signalproxy.cpp