ElectricEqpmt_Station400VLoadMng.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #include "pch.h"
  2. #include "ElectricEqpmt_Station400VLoadMng.h"
  3. ElectricEqpmt_Station400VLoadMng::ElectricEqpmt_Station400VLoadMng()
  4. {
  5. }
  6. ElectricEqpmt_Station400VLoadMng::~ElectricEqpmt_Station400VLoadMng()
  7. {
  8. }
  9. void ElectricEqpmt_Station400VLoadMng::Deal400VLoad( int nStationID, int nThreeLoadUnitID, int nCutMark )
  10. {
  11. map<int, ElectricEqpmt_Station400VLoad>::iterator iter = m_mapStation400VLoad.find(nStationID);
  12. if ( iter != m_mapStation400VLoad.end() )
  13. {
  14. iter->second.Update400VLoadCut( nThreeLoadUnitID, nCutMark );
  15. }
  16. }
  17. void ElectricEqpmt_Station400VLoadMng::Add400VLoadData( int nStationID, const string& strEqpmtID, const string& strInputStrID, int nButtonID , const string& strRelationBoltID)
  18. {
  19. map<int, ElectricEqpmt_Station400VLoad>::iterator iter = m_mapStation400VLoad.find(nStationID);
  20. if ( iter == m_mapStation400VLoad.end() )
  21. {
  22. ElectricEqpmt_Station400VLoad station400VLoad;
  23. station400VLoad.m_nStationID = nStationID;
  24. station400VLoad.Add400VLoadData(strEqpmtID, strInputStrID, nButtonID,strRelationBoltID );
  25. m_mapStation400VLoad.insert( make_pair( nStationID, station400VLoad) );
  26. }
  27. else
  28. {
  29. iter->second.Add400VLoadData(strEqpmtID, strInputStrID, nButtonID ,strRelationBoltID );
  30. }
  31. }
  32. void ElectricEqpmt_Station400VLoadMng::CheckInputEqpmt( ELEEQPMTMAP* ElectricEqpmtMap, const string& strInputStrID, int nButtonID )
  33. {
  34. ELEEQPMTMAP::iterator iter = ElectricEqpmtMap->find( strInputStrID );
  35. if ( ElectricEqpmtMap->end() == iter )
  36. {
  37. return;
  38. }
  39. int nStationID = iter->second->GetSourceStationID();
  40. map<int, ElectricEqpmt_Station400VLoad>::iterator iterStation400VLaod = m_mapStation400VLoad.find(nStationID);
  41. if ( iterStation400VLaod != m_mapStation400VLoad.end() )
  42. {
  43. iterStation400VLaod->second.CheckInputEqpmt(ElectricEqpmtMap, strInputStrID, nButtonID );
  44. }
  45. }
  46. void ElectricEqpmt_Station400VLoadMng::SetDelayMap(DELAYMAP* delaymap)
  47. {
  48. map<int, ElectricEqpmt_Station400VLoad>::iterator iterStation400VLaod = m_mapStation400VLoad.begin();
  49. if ( iterStation400VLaod != m_mapStation400VLoad.end() )
  50. {
  51. iterStation400VLaod->second.SetDelayMap(delaymap);
  52. }
  53. }