#ifndef T2DLL_T2OBJECT_H #define T2DLL_T2OBJECT_H #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_CLASS_EXPORT T2Object { public: T2Object(); virtual ~T2Object() {} BOOL IsUsed() const { return mUsed; } virtual void SetUsed(BOOL u) { mUsed = u; } int GetStatus() const { return mStatus; } void SetStatus(int s) { mStatus = s; } virtual BOOL Enter(CLink*) { return false; } virtual BOOL Leave(CLink*) { return false; } virtual unsigned int Idle(T2TowerDoc*) { return 0; } BOOL IsFavorite() const { return mFavorite; } 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); protected: virtual void InitLoaded(); BOOL mUsed; int mStatus; BOOL mFavorite; }; #endif