#pragma once #include "common.h" #include "LArray.h" class AFX_CLASS_EXPORT T2RoutingTable : private LArray { public: T2RoutingTable(T2FloorInfo* inFloorInfo, T2FloorPtrList* inFloorPtrList, int inWhichTable); virtual ~T2RoutingTable(); void FloorAdded(); void FloorRemoved(int inFloorID); void MoverAdded(T2Mover* inMover, BOOL inFlag); void MoverRemoved(T2Mover* inMover, BOOL inFlag); void MoverModified(T2Mover* inMover, BOOL inFlag); void FullUpdate(); BOOL CheckRoute(POINT inFromPt, POINT inToPt, unsigned int inSearchScore) const; BOOL IsConnectRouteFromLobby(POINT inPt) const; BOOL GetNextRoute(POINT inFromPt, POINT& ioToPt) const; T2Tenant* SelectNearTenant(POINT inPt, unsigned int inSearchScore) const; protected: BOOL IsRelatedMover(T2Mover* inMover) const; void AddItem(T2Mover* inMover); void RemoveItem(T2Mover* inMover); T2MoverRoutingTable* GetItem(T2Mover* inMover) const; BOOL GetElem(T2Mover* inMover, int inFloor, T2RoutingTableElem& outElem) const; int GetIndex(T2Mover* inMover) const; void Update(); void ClearData(); T2Tenant* SelectNearTenant(T2Tenant* inTenant, int inH, unsigned int inSearchScore) const; unsigned int mAttributeMask; T2FloorPtrList *mFloorPtrList; T2FloorInfo *mFloorInfo; };