1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#pragma once
#include "common.h"
#include "LArray.h"
class AFX_CLASS_EXPORT T2MoverRoutingTable : private LArray {
public:
T2MoverRoutingTable(T2FloorInfo* inFloorInfo, T2FloorPtrList* inFloorPtrList, T2Mover* inMover);
virtual ~T2MoverRoutingTable();
void AddItems(int inCount);
void RemoveItem(int inIndex);
void ClearData();
BOOL GetItem(int inIndex, T2RoutingTableElem& outItem);
void SetStopFloor();
BOOL Update(T2MoverRoutingTable* inTable);
BOOL IsConnectRoute(int inFloorID);
BOOL GetNextRoute(POINT inPt, unsigned int inFloorID, POINT& ioPt, unsigned int inFloorID2, unsigned int& outScore);
T2Tenant* SelectNearFloor(POINT inPt, int& outFinalHPos, unsigned int& ioScore);
T2Mover* GetMover() const;
int GetMoverHPos() const;
protected:
BOOL IsStopFloor(int inIndex);
BOOL IsUpdate(const T2MoverRoutingTable* inTable, unsigned int inNextFloorID, unsigned int inPrevFloorID, T2RoutingTableElem& inElem);
BOOL IsSetTable(unsigned int inPrevFloorID, unsigned int inNextFloorID, unsigned int inScore, int inTime, int inFinalHPos);
int CalcHScore(int inDistance);
unsigned int CalcScore(POINT inPt, POINT& ioPt, T2RoutingTableElem* inElem);
T2Mover *mMover;
int mMoverHPos;
T2FloorPtrList *mFloorPtrList;
T2FloorInfo *mFloorInfo;
};
inline T2Mover* T2MoverRoutingTable::GetMover() const { return mMover; }
inline int T2MoverRoutingTable::GetMoverHPos() const { return mMoverHPos; }
|