Oliver Kania wrote:
Hello and thx I guess that means I cannot change class state in my save method. That is what I need ! Is there any way around it ?
... Please don't top post!
=================================================== template<class Archive>
void save( Archive &ar, unsigned int version) const { replace these:
m_offlineMode = true; // we cannot load more when offline --> always cachedAll bool oldCachedAll = m_CachedAll; m_CachedAll = true; ar & m_CachedAll; ar & m_offlineMode;
with: ar << true; ar << true;
// do not serialize the lock -- use the default constructor. // we assume that no iterators that lock the cache do exist when serializing. // ar & m_Lock; ar & m_LookupId; ar & m_LookupName; ar & m_SequenceNumber; //reset old state for the case we want to continue working
remove these:
m_CachedAll = oldCachedAll; m_offlineMode = false; }
then there's no need for mutable nor const_cast. Jeff Flinn