#include "T2Archive.h" #include "T2Object.h" T2Object::T2Object() { mUsed = false; mStatus = kStatus0; mFavorite = false; } /*virtual*/ void T2Object::SetFavorite(BOOL v) { mFavorite = v; } /*virtual*/ void T2Object::Load(T2Archive& archive, T2TowerDoc* towerDoc) { LoadSelf(archive, towerDoc); InitLoaded(); } /*virtual*/ void T2Object::Save(T2Archive& archive) { SaveSelf(archive); } /*virtual*/ void T2Object::LoadSelf(T2Archive& archive, T2TowerDoc* towerDoc) { unsigned char b; short s; archive >> b; mUsed = (b != 0); archive >> s; mStatus = s; archive >> b; mFavorite = (b != 0); } /*virtual*/ void T2Object::SaveSelf(T2Archive& archive) { unsigned char b; short s; b = (mUsed != 0); archive << b; s = mStatus; archive << s; b = (mFavorite != 0); archive << b; } /*virtual*/ void T2Object::InitLoaded() { }