コード例 #1
0
ファイル: Stcgrp.cpp プロジェクト: karlnicholas/GeneDoc
void 
CStcGroup::CopyVars( const CStcGroup& fStcGroup )
{

	ClearAllData();

	// CMapStringToOb
	CString key;
	POSITION pos;	
	void *pfv;
	

	const CMapStringToPtr& DataValuesMap = fStcGroup.GetDataValuesMap();


	StcDataValues *pfDV;
	// Iterate through the entire map, dumping both name and age.
	for( pos = DataValuesMap.GetStartPosition(); pos != NULL; )
	{
		DataValuesMap.GetNextAssoc( pos, key, pfv );
		
		pfDV = (StcDataValues *)pfv;

		StcDataValues *pDV = new StcDataValues;

		// Fix this .. done 
		CopyDataValues( pDV, pfDV->Values, pfDV->ValuesSize );
		
		pDV->pColorMap = pfDV->pColorMap;

		m_StcDataValuesMap.SetAt( key, pDV );
		//

	}

	// CStringList
	const CStringList& cList = fStcGroup.GetFileNames();
	for( pos = cList.GetHeadPosition(); pos != NULL; )
	{
		m_FileNames.AddTail( cList.GetNext(pos) );
	}

	fStcGroup.GetNameDescription( m_Name, m_Description );

	// m_Residues = fStcGroup.GetResidues();
	CopyResidues( fStcGroup.GetResidues(), fStcGroup.GetResiduesSize() );

	m_MasterSeq = fStcGroup.GetMasterSeq();

	SetCurrentDataType( fStcGroup.GetCurrentDataType() );
	
}
コード例 #2
0
ファイル: Stcgrp.cpp プロジェクト: karlnicholas/GeneDoc
CStcGroup::~CStcGroup()
{
	ClearAllData();
}
コード例 #3
0
void CDetailDelayResult::GenerateResult(vector<CAirsideFlightDelayReport::FltTypeDelayItem>& fltTypeDelayData,CParameters *pParameter)
{
	ASSERT(pParameter != NULL);

	ClearAllData();

	ElapsedTime estMinDelayTime = pParameter->getStartTime();
	ElapsedTime estMaxDelayTime = pParameter->getEndTime();

	long lMinDelayTime = estMinDelayTime.asSeconds();
	long lMaxDelayTime = estMaxDelayTime.asSeconds();

	//delay time error
	if (lMaxDelayTime < lMinDelayTime)
	{
		return;
	}

	m_estStartTime = estMinDelayTime;
	m_estEndTime   = estMaxDelayTime;

	long lUserIntervalTime = pParameter->getInterval();
	ElapsedTime estUserIntervalTime = ElapsedTime(lUserIntervalTime);

	long lDelayTimeSegmentCount = 0;             //the count of the delayTime segment
	if (0 < lUserIntervalTime)
	{
        estMinDelayTime = ElapsedTime(lMinDelayTime);
        lDelayTimeSegmentCount = (lMaxDelayTime - lMinDelayTime) / (lUserIntervalTime);

        if((lMaxDelayTime - lMinDelayTime) % (lUserIntervalTime) != 0)
            lDelayTimeSegmentCount += 1;
	}
	else
	{
		lDelayTimeSegmentCount= ClacTimeRange(estMaxDelayTime, estMinDelayTime, estUserIntervalTime);
	}

	bool bSetTimeRange = false;
	for (int j=0; j<(int)pParameter->getFlightConstraintCount(); j++)
	{
		FlightConstraint flightConstraint = pParameter->getFlightConstraint(j);

		CDetailFlightDelayData *pDetailFlightDelayData = new CDetailFlightDelayData;
		pDetailFlightDelayData->m_fltCons = flightConstraint;

		for (long i=0; i<lDelayTimeSegmentCount; i++)
		{
			ElapsedTime estTempMinDelayTime = estMinDelayTime + ElapsedTime(estUserIntervalTime.asSeconds()*i);
			ElapsedTime estTempMaxDelayTime = estMinDelayTime + ElapsedTime(estUserIntervalTime.asSeconds()*(i + 1));

            if(estTempMaxDelayTime > estMaxDelayTime)
                estTempMaxDelayTime = estMaxDelayTime;

			if (!bSetTimeRange)
			{
				CString strTimeRange = _T("");
				//strTimeRange.Format(_T("%s-%s"), estTempMinDelayTime.printTime(), estTempMaxDelayTime.printTime());
				strTimeRange.Format(_T("%02d:%02d-%02d:%02d"), estTempMinDelayTime.asHours(), estTempMinDelayTime.GetMinute(), estTempMaxDelayTime.asHours(), estTempMaxDelayTime.GetMinute());
				m_vTimeRange.push_back(strTimeRange);
			}			

			pDetailFlightDelayData->m_vData.push_back(GetFlightCountInIntervalTime(flightConstraint, estTempMinDelayTime, estTempMaxDelayTime, fltTypeDelayData)/100);  //second
		}

		bSetTimeRange = true;

		m_vFlightData.push_back(pDetailFlightDelayData);
	}
}
コード例 #4
0
CDetailTaxiDelayResult::~CDetailTaxiDelayResult(void)
{
	ClearAllData();
}
コード例 #5
0
CDetailFlightScheduleDelayResult::~CDetailFlightScheduleDelayResult(void)
{
	ClearAllData();
}
コード例 #6
0
CSummaryAirDelayResult::~CSummaryAirDelayResult(void)
{
	ClearAllData();
}