本文整理汇总了C++中TimeRange::GetStartTime方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeRange::GetStartTime方法的具体用法?C++ TimeRange::GetStartTime怎么用?C++ TimeRange::GetStartTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeRange
的用法示例。
在下文中一共展示了TimeRange::GetStartTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PushBackExitEnrouteQCapacity
bool EnrouteQueueCapacityInSim::PushBackExitEnrouteQCapacity( const ElapsedTime& eTime, AirsideFlightInSim* pFlight )
{
TaxiRouteInSim* pTaxiRoute = pFlight->GetAndAssignOutBoundRoute();
if (pTaxiRoute == NULL)
return true;
pTaxiRoute->InitRoute(pFlight,eTime);
FlightHoldListInTaxiRoute& taxiRouteList = pTaxiRoute->GetHoldList();
CString strTime = eTime.printTime();
for (int i = 0; i < taxiRouteList.GetCount(); i++)
{
const HoldInTaxiRoute& theHold = taxiRouteList.ItemAt(i);
if (theHold.m_pNode->GetNodeInput().GetRunwayIntersectItemList().size() == 0)
continue;
RunwayIntersectItem* pRwItem = theHold.m_pNode->GetNodeInput().GetRunwayIntersectItemList()[0];
int nRwID = pRwItem->GetObjectID();
RunwayInSim* pRunway = pFlight->GetAirTrafficController()->GetAirsideResourceManager()->GetAirportResource()->getRunwayResource()->GetRunwayByID(nRwID);
HoldPositionInSim* pCrossHold = pRunway->GetHoldPosition( theHold.m_nHoldId );
if (pCrossHold == NULL)
continue;
size_t nCount = m_pEnrouteQueueCapacity->GetElementCount();
for (size_t i = 0; i < nCount; i++)
{
AirsideEnrouteQCapacityTimeRange* pQCapacityTimeRange = m_pEnrouteQueueCapacity->GetItem(i);
TimeRange* pTimeRange = pQCapacityTimeRange->getTimeRange();
if (eTime < pTimeRange->GetStartTime() || eTime > pTimeRange->GetEndTime())
continue;
size_t iEnrouteCount = pQCapacityTimeRange->getEnrouteQCapacity()->GetElementCount();
for (size_t j = 0; j < iEnrouteCount; j++)
{
AirsideEnrouteQCapacityItem* pCapacityItem = pQCapacityTimeRange->getEnrouteQCapacity()->GetItem(j);
int nExitID = pCapacityItem->getTakeOffPosition()->GetID();
if(nExitID < 0)
continue;
LogicRunwayInSim* pRwyPort = m_pAirportres->getRunwayResource()->GetLogicRunway(pCapacityItem->getTakeOffPosition()->GetRunwayID(),pCapacityItem->getTakeOffPosition()->GetRunwayMark());
if(!pRwyPort)
continue;
RunwayExitInSim* pRwyExit = pRwyPort->GetExitByID(nExitID);
if(!pRwyExit)
continue;
HoldPositionInSim* pHold = pRwyExit->getHoldPosition();
if(!pHold)
continue;
if (pCrossHold != pHold)
continue;
if(!pHold->IsFlightInQueue(pFlight))
{
double dQueueLength = pHold->GetTakeoffQueueLength();
double dMaxQueue = pCapacityItem->getMaxLength() * 100;
if (dQueueLength > dMaxQueue )
{
pHold->AddEnrouteWaitList(pFlight);
return false;
}
}
}
}
}
return true;
}