⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tabdatfile.h

📁 linux下一款GIS程序源码
💻 H
字号:
// tabdatfile.h: interface for the TABDATFile class.///*--------------------------------------------------------------------- *                      class TABDATFile * * Class to handle Read/Write operation on .DAT files... the .DAT file * contains the table of attribute field values. *--------------------------------------------------------------------*/#ifndef  TABDATFile_H#define  TABDATFile_H#include "tabindfile.h"#include "tabrawbinblock.h"class TABDATFile  {private:    char        *m_pszFname;    FILE        *m_fp;    TABAccess   m_eAccessMode;    TABTableType m_eTableType;    TABRawBinBlock *m_poHeaderBlock;    int         m_numFields;    TABDATFieldDef *m_pasFieldDef;    TABRawBinBlock *m_poRecordBlock;    int         m_nBlockSize;    int         m_nRecordSize;    int         m_nCurRecordId;    UGKBool       m_bCurRecordDeletedFlag;    UGKInt32      m_numRecords;    UGKInt32      m_nFirstRecordPtr;    UGKBool       m_bWriteHeaderInitialized;    int         InitWriteHeader();    int         WriteHeader();public:	TABDATFile();	virtual ~TABDATFile();    int         Open(const char *pszFname, const char *pszAccess,                     TABTableType eTableType =TABTableNative);    int         Close();    int         GetNumFields();    TABFieldType GetFieldType(int nFieldId);    int         GetFieldWidth(int nFieldId);    int         GetFieldPrecision(int nFieldId);    int         ValidateFieldInfoFromTAB(int iField, const char *pszName,                                         TABFieldType eType,                                         int nWidth, int nPrecision);    int         AddField(const char *pszName, TABFieldType eType,                         int nWidth, int nPrecision=0);    UGKInt32      GetNumRecords();    TABRawBinBlock *GetRecordBlock(int nRecordId);    UGKBool       IsCurrentRecordDeleted() { return m_bCurRecordDeletedFlag;};    int         CommitRecordToFile();    const char  *ReadCharField(int nWidth);    UGKInt32      ReadIntegerField(int nWidth);    UGKInt16      ReadSmallIntField(int nWidth);    double      ReadFloatField(int nWidth);    double      ReadDecimalField(int nWidth);    const char  *ReadLogicalField(int nWidth);    const char  *ReadDateField(int nWidth);    int         WriteCharField(const char *pszValue, int nWidth,                               TABINDFile *poINDFile, int nIndexNo);    int         WriteIntegerField(UGKInt32 nValue,                                  TABINDFile *poINDFile, int nIndexNo);    int         WriteSmallIntField(UGKInt16 nValue,                                   TABINDFile *poINDFile, int nIndexNo);    int         WriteFloatField(double dValue,                                TABINDFile *poINDFile, int nIndexNo);    int         WriteDecimalField(double dValue, int nWidth, int nPrecision,                                  TABINDFile *poINDFile, int nIndexNo);    int         WriteLogicalField(const char *pszValue,                                  TABINDFile *poINDFile, int nIndexNo);    int         WriteDateField(const char *pszValue,                               TABINDFile *poINDFile, int nIndexNo);	void Dump(FILE *fpOut = NULL);};#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -