You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.3 KiB
C++

#pragma once
#include "sqlvarint.h"
#include "..\WellCommonDef.h"
//#include "DataLinkOb.h"
typedef struct _ColInfo
{
CString colName;
int type;
}COLINFO;
class AFX_EXT_CLASS CWellDataObj
{
public:
CWellDataObj(void);
virtual ~CWellDataObj(void);
virtual void Clear(BOOL bRelease = TRUE);
virtual int GetCount();
virtual void Serialize(CArchive& ar);
virtual void operator = (CWellDataObj &data);
virtual void SetTableID(CString strID) { m_strTableID = strID; };
virtual CString GetTableID() { return m_strTableID; };
virtual void WritePCG(CFile &fw, int nBaseTabNum) {};
virtual int ReadPCG(CKXmlParse& xp, const short &ver);
static CWellDataObj* CreateWellDataObj(CString strTableId);
virtual void SetTopBottom(double top, double bottom, VARINTARR* pRow) {};
virtual void SetTopBottom(CString colId,double top, double bottom, VARINTARR* pRow) {};
int m_nID;
std::vector<VARINTARR*> getDatas() { return m_datas; }
int getRowID(VARINTARR*pRow);
// ROWLINK getRowLink(int RowId);
protected:
std::vector<VARINTARR*> m_datas;
protected:
CString m_strTableID; //kep¹¤ÇøÖеıíÀàÐÍ
virtual void WritePCG_datas(CFile &fw, int nBaseTabNum, CString& tableId, COLINFO* pColINfos, int colLen);
virtual int ReadPCG_datas(CKXmlParse& xp, const short &ver, COLINFO* pColINfos, int colLen);
void GetDatas(StringVectorSet &dataContent, std::vector<CString>& fields, COLINFO* pColINfos, int cols);
void SetModifyDatas(StringVectorSet &dataContent, std::vector<CString>& fields, COLINFO* pColINfos, int cols);
BOOL SetStrJsonToData(CString& jsonStr, COLINFO* pColINfos, int cols);
void SerializDatas(CArchive& ar, COLINFO* pColINfos, int colLen);
virtual VARINTARR* GetSelfNewRow() { return new VARINTARR; };
void GetJsonData(CString& jsonStr, COLINFO* pColINfos, int cols);
public:
virtual void GetStringDatas(StringVectorSet &dataContent , std::vector<CString>& fields) {};
virtual void SetModifyStringDatas(StringVectorSet &dataContent, std::vector<CString>& fields) {};
virtual void DeleteRow(VARINTARR*pRow);
virtual BOOL SetDataJson(CString& jsonStr) { return FALSE; };
virtual void GetDataJson(CString& strJson);
virtual VARINTARR* GetNewRow();
virtual BOOL IsSameTopBottom(CString strCol1, CString strCol2) { return (strCol1 == strCol2); }//ÅжÏÁ½ÖÖÊý¾ÝÁбêʶÊÇ·ñ»á¹ØÁªÍ¬Ò»Àà¶¥µ×Éî
};