class CommonMsg
{
friend class boost::serialization::access;
public:
//CommonMsg():imsg1( 0),imsg2( 0),imsg3( 0),imsg4( 0),imsg5( 0),imsg6(0),bool1(false),bool2(false),bool3(false),bool4(false),ack(false){};
//~CommonMsg();
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & msg1 & msg2 & msg3 & msg4 & msg5 & msg6 & imsg1 & imsg2 & imsg3 & imsg4 & imsg5 & imsg6 & bool1 & bool2 & bool3 & bool4 & ack;
}
std::string msg1;
std::string msg2;
std::string msg3;
std::string msg4;
std::string msg5;
std::string msg6;
int imsg1;
int imsg2;
int imsg3;
int imsg4;
int imsg5;
int imsg6;
bool bool1;
bool bool2;
bool bool3;
bool bool4;
bool ack;
};
T& Serialization<T>::DeSerialize(const std::string& message)
{
T msg;
std::istringstream archiveStream(message);
boost::archive::text_iarchive archive(archiveStream);
archive>>msg;
return msg;
}