#pragma once #include "common.h" #include "CLink.h" enum { kStatus0, // "out of the tower" kStatus1, // "just on the floor" kStatus2, // "on the floor" kStatus3, // "looking for the route" kStatus4, // "going to the mover" kStatus5, // "waiting the mover" kStatus6, // "on the mover" kStatus7, // "just taking the mover" kStatus8, // "just getting off the mover" kStatus9, // "going to the tenant" kStatus10, // "in the tenant" kStatus11, // "going out the tower" kStatus12, // "goint to the emergency stair" kStatus13, // "going to the point" kStatus14, // "stopping" kStatus15, // "on the transporter" kStatus16, }; class AFX_EXT_CLASS T2Object { public: T2Object(); virtual ~T2Object() {} virtual void SetUsed(BOOL u) { mUsed = u; } virtual BOOL Enter(CLink*) { return false; } virtual BOOL Leave(CLink*) { return false; } virtual unsigned int Idle(T2TowerDoc*) { return 0; } virtual void SetFavorite(BOOL v); virtual void Load(T2Archive& archive, T2TowerDoc* towerDoc); virtual void Save(T2Archive& archive); virtual void LoadSelf(T2Archive& archive, T2TowerDoc* towerDoc); virtual void SaveSelf(T2Archive& archive); BOOL IsUsed() const { return mUsed; } int GetStatus() const { return mStatus; } void SetStatus(int s) { mStatus = s; } BOOL IsFavorite() const { return mFavorite; } protected: virtual void InitLoaded(); BOOL mUsed; int mStatus; BOOL mFavorite; };