#include "cmixprotofunctor.hpp" #define MESSAGE_SETTER_DEF(TYPE, NAME) \ CMixProtoFunctor::proto_type CMixProtoFunctor::operator()(cmix_proto::TYPE const& v) { \ proto_type m; \ *m.mutable_##NAME() = v; \ return m; \ } \ MESSAGE_SETTER_DEF(Initialization, initialization) MESSAGE_SETTER_DEF(ImANode, imanode) MESSAGE_SETTER_DEF(ImAClient, imaclient) MESSAGE_SETTER_DEF(Bye, bye) MESSAGE_SETTER_DEF(KeyExchange, keyexchange) MESSAGE_SETTER_DEF(SecretKey, secretkey) #undef MESSAGE_SETTER_DEF