I need to have a way to serialize classes in my code into a string. Later on, using that string I would need to populate an instance of that class.
i.e.
enum AlarmStatus
{
Clear=0,
Active
};
class AlarmInfo
{
public:
std::string S;
int I;
AlarmStatus alarmStatus;
void setAlarmStatus(AlarmStatus alarmStatus);
AlarmStatus getAlarmStatus();
};
Any ideas how I can do that in code? I know boost have boost/archive/ library that can serialize a class but it is not a “HeaderOnly library”? Is there a library that is Header only?
Thank you
Create a to and from serial code and call that
}