ReportMgr.h 2.4 KB

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