INSDTCHK.H
上传用户:ywlong9188
上传日期:2022-05-31
资源大小:2656k
文件大小:2k
- /////////////////////////////////////////////////////////////
- //class CCfgInsDataTypeCheck
- //source file: InsDTchk.cpp
- //file: InsDTChk.h
- #ifndef __CFG_INSDTCHK_H__
- #define __CFG_INSDTCHK_H__
- #include "Chkbase.h"
- #include "instype.h"
- //struct RLLoopConnect is used in CCfgRLInstrData and this class
- struct RLLoopConnect{
- WORD wBinWord; // data get or put to binary file
- short nInsType; //-1: const; otherwise: RL_INSTYPE_??
- short nCalcType; //get from CInstrumentSet_Cfg's Calc field
-
- long nHiVal;
- long nLoVal;
- short nDecimal;
- CString sEditStr; //string to be shown in screen
- };
- typedef struct RLLoopConnect STRU_RLLOOP;
- class AFX_EXT_CLASS CCfgInsDataTypeCheck
- {
- //operations
- public:
- CCfgInsDataTypeCheck();
- ~CCfgInsDataTypeCheck();
-
- void InitialPointer(CDaoDatabase* pFCUDB);
- BOOL ConvWordToStr(STRU_RLLOOP& struRL);
- BOOL ConvStrToWord(STRU_RLLOOP& struRL);
- BOOL CheckDataType(STRU_RLLOOP& struRL,CString& sErrMsg);
-
- BOOL CheckData_LT(CString sDataType,CString sTagNo,CString& sRetStr);
- protected:
- BOOL CheckRangeValidOfTagNo(int nTagType,int nElementNo);
- BOOL CheckDataType_TagNo(STRU_RLLOOP& struRL,CString& sErrMsg);
- //attribute
- CMap<CString,LPCSTR,UINT,UINT> m_TagToTypeMap;
- CFCULPTableSet m_LPTableSet;
- CFCUSUTableSet m_SUTableSet;
- CFCUTagSet m_FCUTagListSet;
- CInstrumentSet_Cfg m_InsTypeSet;
- CInstrCommandSet_Cfg m_InsAddrTypeSet;
-
- CDaoDatabase* m_pFCUDB;
- CDaoDatabase m_InsTypeParaDB;
- // CInsTypeParaSet m_InsTypeSet;
- CString m_sUnitNo;
- private:
- short GetValueBySHSLStr(const CString& sExpr,short nHiVal,short nLoVal);
- };
- class AFX_EXT_CLASS CGraphCfgInsCheck : public CCfgInsDataTypeCheck
- {
- private:
- BOOL OpenFcuDatabase(int nUnitNo);
- CString m_sPath;
- int m_nCurUnitNo;
- CDaoDatabase m_FcuDatabase;
- CDaoDatabase m_OpsDatabase;
- CFCUTagSet m_OPSTagListSet;
- public:
- void Initial();
- CGraphCfgInsCheck();
- ~CGraphCfgInsCheck();
- BOOL CheckInsTag_Type(CString& sTagNo,CString& sDataType);
- private:
- };
- #endif