| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 | #pragma once#include <string>#include <vector>#include "element.h"#include <map>#include "Posxray.h"using namespace std;using namespace OTSDATA;class PartSTDRuleItem :public xmls::ISlo{public:	std::map<std::string, CElementPtr>& GetMapElements();	virtual void Serialize(bool isStoring, tinyxml2::XMLDocument* classDoc, tinyxml2::XMLElement* rootNode) override;		std::string  GetHardness() const { return m_Hardness; }	void SetHardness(std::string val) { m_Hardness = val; }	std::string  GetDensity() const { return m_Density; }	void SetDensity(std::string val) { m_Density = val; }	std::string GetElectrical_conductivity() const { return m_Electrical_conductivity; }	void SetElectrical_conductivity(std::string val) { m_Electrical_conductivity = val; }	int GetID() const { return ID; }	void SetID(int val) { ID = val; }	std::string GetName() const { return m_name; }	void SetName(std::string val) { m_name = val; }	std::string GetColor() const { return m_color; }	void SetColor(std::string val) { m_color = val; }	int GetGrpID() const { return m_grpId; }	void SetGrpID(int val) { m_grpId = val; }	std::string GetGrpName() const { return m_grpName; }	void SetGrpName(std::string val) { m_grpName = val; }	std::string GetGrpColor() const { return m_grpColor; }	void SetGrpColor(std::string val) { m_grpColor = val; }	std::vector<std::string> GetUsingImgPropertyNameList() { return m_ImgPropertyList; }	void SetUsingImgPropertyNameList(std::vector<std::string> val) { m_ImgPropertyList = val; }	std::vector<std::string> GetUsingOtherpropertyList() { return m_OtherpropertyList; }	void SetUsingOtherpropertyList(std::vector<std::string> val) { m_OtherpropertyList = val; }	std::vector<std::string> GetUsingConstants() const { return m_usingConstants; }	std::string GetExpressionStr() const { return m_expressionStr; }	void SetExpressionStr(std::string val) { m_expressionStr = val; }	CElementsList GetKeyElementList() const { return m_KeyelementList; }	void SetKeyElementList(CElementsList val) { m_KeyelementList = val; }	CElementsList GetSubElementList() const { return m_SubelementList; }	void SetSubElementList(CElementsList val) { m_SubelementList = val; }	CElementsList GetAllSortedEleList();			std::string GetFormula() const { return m_Formula; }	void SetFormula(std::string val) { m_Formula = val; }	std::string GetElement() const { return m_Element; }	void SetElement(std::string val) { m_Element = val; }	double GetBSE() const { return m_BSE; }	void SetBSE(double val) { m_BSE = val; }	void AddXraySpectrum(CPosXrayPtr xray);	void SetIsElementAnalysis(bool isanalysis) { m_elementAnalysis = isanalysis; };	bool GetIsElementAnalysis() { return m_elementAnalysis; };	double CalculateSimilarity(CPosXrayPtr xray);private:	double GetCosValue(CPosXrayPtr posXray, CPosXrayPtr posXray1, int iDataLen1);	int ID;	std::string m_name;	std::string m_color;	int m_grpId;	std::string m_grpName;	std::string m_grpColor;	CElementsList m_KeyelementList;	CElementsList m_SubelementList;	std::vector<std::string> m_ImgPropertyList;	std::vector<std::string> m_OtherpropertyList;	std::vector<std::string> m_usingConstants;	std::string m_expressionStr;	std::map <std::string, CElementPtr> m_mapEleItems;	std::string m_Hardness;	std::string m_Density;	std::string  m_Electrical_conductivity;	double m_BSE;	std::string m_Formula;	std::string m_Element;	bool m_elementAnalysis;	CPosXrayList m_spectrums;};typedef std::shared_ptr<PartSTDRuleItem>  PartSTDRuleItemPtr;typedef std::vector<PartSTDRuleItemPtr> PartSTDRuleItemList;
 |