Hey Guys, I have problems with serialising Objects of NET.
Serialising works fine but when deserialising i get the error "Datastream error".
Everything works also fine whe NET has no members in mNeurons and mConnections.
The class CONNECTION can have Instances of mNeurons, mConnections and mConnections2 may contain duplicate Objects. Below the simplified Version of my Code. (Headers included but not shown)
Any Idea what i am doing wrong?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
class NET
{
friendclass boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, constunsignedint version){ar & mNeurons; ar &mConnections; ar & mConnections2;}
private:
std::list<NEURON*> mNeurons;
std::list<CONNECTION*> mConnections;
std::list<CONNECTION*> mConnections2;
};
BOOST_CLASS_EXPORT(NET)