#include "T2RoutingTableElem.h" T2RoutingTableElem::T2RoutingTableElem() { mNextFloorID = 0; mScore = 0; mTime = 0; mFinalHPos = 0; } T2RoutingTableElem::~T2RoutingTableElem() { } BOOL T2RoutingTableElem::IsStopFloor() const { return ((mNextFloorID != 0) && (mScore == 0)); } void T2RoutingTableElem::SetTable(unsigned int inNextFloorID, int inFinalHPos) { mNextFloorID = inNextFloorID; mScore = 0; mTime = 0; mFinalHPos = inFinalHPos; } BOOL T2RoutingTableElem::IsSetTable(unsigned int inNextFloorID, unsigned int inScore, int inTime, int inFinalHPos) { BOOL result = false; if (mNextFloorID == 0 || mScore > inScore) { mNextFloorID = inNextFloorID; mScore = inScore; mTime = inTime; mFinalHPos = inFinalHPos; result = true; } return result; } BOOL T2RoutingTableElem::HasNextRoute(unsigned int inFloorID) const { return (mNextFloorID != 0) && (mNextFloorID != inFloorID); }