12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #pragma once
- #include "otsdataconst.h"
- #include "OTSFieldData.h"
- namespace OTSGBCalculate
- {
- using namespace OTSDATA;
- class CGBFieldData;
- class CGBLevel : public xmls::ISlo
- {
- public:
- CGBLevel();
- // constructor
- CGBLevel(CGBFieldData * GBField, GB_LEVEL_TYPE a_nLevel);
- CGBLevel(const CGBLevel&); // copy constructor
- CGBLevel(CGBLevel*); // copy constructor
- CGBLevel& operator=(const CGBLevel&); // =operator
- BOOL operator==(const CGBLevel&); // =operator
- virtual ~CGBLevel(); // detractor
- //获得细系颗粒的级别(非DS下同)
- GB_GRADE_TYPE GetThinGrade();
- //获得粗系颗粒的级别
- GB_GRADE_TYPE GetWideGrade();
- //获得超尺寸颗粒的级别
- GB_GRADE_TYPE GetSuperGrade();
- //只有类型为DS时有效
- GB_GRADE_TYPE GetMyDSGrade();
- double GetMaxFeretDiameter();
- // serialization
- void Serialize(bool isStoring, tinyxml2::XMLDocument *classDoc, tinyxml2::XMLElement *rootNode);
- protected:
- // cleanup
- void Cleanup();
- // initialization
- void Init();
- // duplication
- void Duplicate(const CGBLevel& a_oSource);
- private:
- //视场各类的分级数:A / B / C / D / DS
- GB_LEVEL_TYPE m_nLevel;
- CGBFieldData* m_GBField;
- double m_FeretDiameterMax;
- };
- typedef std::shared_ptr<CGBLevel> __declspec(dllexport) CGBLevelPtr;
- GB_GRADE_TYPE GetAGrade(double dLengthAll);
- GB_GRADE_TYPE GetBGrade(double dLengthAll);
- GB_GRADE_TYPE GetCGrade(double dLengthAll);
- GB_GRADE_TYPE GetDGrade(int nSize);
- GB_GRADE_TYPE GetDSGrade(double dFeretDiameterMax);
- //typedef std::vector<CGBLevelPtr> __declspec(dllexport) CGBLevelList;
- }
|