Hello dear Stackoverflow!
I'mm using boost to serialize and deserialize some classes
Like so:
boost::archive::xml_oarchive xmlArchive(oStringStream);
xmlArchive.register_type(static_cast<BaseMessage *>(NULL));
xmlArchive.register_type(static_cast<IncomingTradeMessage *>(NULL));
xmlArchive.register_type(static_cast<InternalRequestInfo *>(NULL));
xmlArchive.register_type(static_cast<InternalTradeTransInfo *>(NULL));
const BaseMessage* myMessage =message;
xmlArchive << make_nvp("Message", myMessage);
now my clasess get a class_id according to the order used, i dont want that, i want to control the Class_id's
so i can do something like
BOOST_SET_CLASS_ID(1234, BaseMessage);
and everywhere in my project BaseMessage would have class_id of 1234.
How can i do such a thing