I have a MyFile.hpp header file which contains various types and enums. How do i do serialization/ desrialization of given example code.
//MyFile.hpp
namespace A {
namespace B {
typedef std::string MyString;
typedef std::map<std::string,std::string> my_type;
typedef bool result;
struct MyTimer
{
int time;
private :
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive &ar, const unsigned int version)
{
ar & time;
}
};
enum MODE
{
Sleep=1,
HybridSleep,
Hybernate
}
}
}
I need to do implementation in corresponding MyFile.cpp but don't know how do i go ahead.
Thanks,
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…