MapRecordSet.h
上传用户:bjslfz
上传日期:2022-07-25
资源大小:4430k
文件大小:2k
- /************************************************************
- 文件名: MapRecordSet.h
-
- 作者: 谢婧 Version : 1.0 Date: 2008/05/26
-
- 类描述: 对Shp对象的属性数据记录集(DBF数据)的管理
-
- 邮件地址:xiejing0707@163.com
- ***********************************************************/
- #ifndef _MAP_RECORDSET_H_
- #define _MAP_RECORDSET_H_
- #include "dbfFile.h"
- #include "MapTableDesc.h"
- #define MAX_CACH_SIZE 100 //最大缓存记录数
- class CMapFields;
- //记录集移动的位置
- typedef enum {
- BookmarkCurrent,
- BookmarkFirst,
- BookmarkLast
- } RECORDSTART;
- class CMapRecordSet {
- public:
- CMapRecordSet();
- ~CMapRecordSet();
- //ATTRIBUTE
- public:
- long GetRecordCount();
- CMapFields* GetFields(long sIndex);
- CMapTableDesc* GetTableDesc();
- BOOL GetBOF();
- BOOL GetEOF();
- int GetCacheSize();
- DBF_HEADER m_Header; //存储DBF文件头
- BOOL SetCacheSize(int& CacheSize);
- //opeeration
- public:
- BOOL openDBF(CString& csFileName);
- void MoveFirst();
- void MoveLast();
- void MoveNext();
- void MovePrev();
- BOOL Move(int iNumRecords , RECORDSTART Start );
- void ReadRecord(unsigned long lRecordID);
- CMapTableDesc m_TableDesc;
- CArray<CMapFields*,CMapFields*> m_Fields; //记录集缓冲区
- CFile fDbf;
- unsigned long iCursorPos; //游标当前位置
- void Clear();
- private:
-
- int m_CacheSize;
- BOOL bBOF,bEOF;
- private:
-
- BOOL m_bDbfOpen; //数据库文件是否打开
-
- };
- //extern static void SwapWord( int length, void * wordP );
- #endif //_MAP_RECORDSET_H_