ReportMgr.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #pragma once
  2. #include "GBImgPropCal.h"
  3. #include "PropParam.h"
  4. #include "SmplMsrResultFileMgr.h"
  5. #include "GridData.h"
  6. #include "IncAFileMgr.h"
  7. #include "RptParamFile.h"
  8. #include <RptParamFileMgr.h>
  9. #include <CGBGradeData.h>
  10. namespace OTSMODEL {
  11. using namespace OTSDATA;
  12. using namespace OTSGBCalculate;
  13. const double Pi = 3.14159;
  14. class __declspec(dllexport) CReportMgr
  15. {
  16. public:
  17. CReportMgr(); // constructor
  18. virtual ~CReportMgr(); // destructor
  19. // sample measure result files
  20. CSmplMsrResultFileMgrList GetSmplMsrResultMgrs()
  21. {
  22. CSmplMsrResultFileMgrList rstlist;
  23. for (auto rst : m_mapSmplMgrs)
  24. {
  25. rstlist.push_back(rst.second);
  26. }
  27. return rstlist;
  28. }
  29. void SetSmplMsrResultMgrs(CSmplMsrResultFileMgrList a_listSmplMsrResultFileMgr);
  30. BOOL AddASmplMsrResultMgr(CString a_strPathName = _T(""),CString anotherName=_T(""));
  31. void ClearSmplResults();
  32. CSmplMsrResultFileMgrPtr GetASmplMsrResultMgrByPathName(CString a_strPathName);
  33. CSmplMsrResultFileMgrPtr GetASmplMsrResultMgrByFileName(CString a_strFileName);
  34. // set working sample index
  35. int GetWorkingSampleIndex() { return m_nWorkingSampeIndex; }
  36. void SetWorkingSampleIndex(int a_nWorkingSampleIndex) { m_nWorkingSampeIndex = a_nWorkingSampleIndex; }
  37. BOOL IsHaveMultiDataSource();
  38. BOOL ResetPropertyParams(BOOL a_bClear = FALSE);
  39. CPropParamPtr GetPropertyParamImage();
  40. CPropParamPtr GetPropertyParamForGrid();
  41. CPropParamPtr GetPropertyParamChart();
  42. // grid computing
  43. CGridDatasList GridDataTransfer(CPropParamPtr thePropParam);
  44. CGBFieldList GetAllGBFields(CPropParamPtr thePropParam);
  45. COTSParticleList GetAnalysisParticleList(CString a_DataSourceName);
  46. CRptParamFilePtr GetRptParamFilePtr();
  47. protected:
  48. // property parameters list m_listPropParam contains 3 propParm object contrast to the Image¡¢ Table and Chart tab
  49. CPropParamsList m_listPropParams;
  50. // sample measure result files
  51. std::map<CString, CSmplMsrResultFileMgrPtr> m_mapSmplMgrs;
  52. // working sample index
  53. int m_nWorkingSampeIndex=0;
  54. //param file mgr
  55. CRptParamFileMgr m_rptparamfilemgr;
  56. CRptParamFilePtr m_rptparamfile;
  57. // get data source name list
  58. std::vector<CString> GetDataSourceNamesList();
  59. // get source name pos list
  60. std::vector<int> GetDataSourcePosList();
  61. CElementChemistriesList GetUndefinedElementList(COTSParticleList a_listParticle, CPosXrayList a_listXray);
  62. BOOL EstimateShowColumn(CString a_strColName);
  63. CGBFieldList listGBFields;
  64. };
  65. typedef std::shared_ptr<CReportMgr> __declspec(dllexport) CReportMgrPtr;
  66. }