📄 tabmapfile.h
字号:
// tabmapfile.h: interface for the TABMAPFile class.////////////////////////////////////////////////////////////////////////#ifndef TABMAPFile_H#define TABMAPFile_H#include "tabbinblockmanager.h"#include "tabmapheaderblock.h"#include "tabmapindexblock.h"#include "tabidfile.h"#include "tabmapobjectblock.h"#include "tabmapcoordblock.h"#include "tabtooldeftable.h"class TABMAPFile {private: int m_nMinTABVersion; char *m_pszFname; FILE *m_fp; TABAccess m_eAccessMode; TABBinBlockManager m_oBlockManager; TABMAPHeaderBlock *m_poHeader; //头块 // Members used to access objects using the spatial index TABMAPIndexBlock *m_poSpIndex; //索引块 // Member used to access objects using the object ids (.ID file) TABIDFile *m_poIdIndex; // Current object data block. TABMAPObjectBlock *m_poCurObjBlock; //对象块 int m_nCurObjPtr; int m_nCurObjType; int m_nCurObjId; TABMAPCoordBlock *m_poCurCoordBlock; //坐标块 // Drawing Tool Def. table (takes care of all drawing tools in memory) TABToolDefTable *m_poToolDefTable; // Coordinates filter... default is MBR of the whole file TABVertex m_sMinFilter; TABVertex m_sMaxFilter; UGKInt32 m_XMinFilter; UGKInt32 m_YMinFilter; UGKInt32 m_XMaxFilter; UGKInt32 m_YMaxFilter; int CommitObjBlock(UGKBool bInitNewBlock =TRUE); int CommitDrawingTools(); int CommitSpatialIndex(); // Stuff related to traversing spatial index. TABMAPIndexBlock *m_poSpIndexLeaf; //索引块 int LoadNextMatchingObjectBlock(int bFirstObject); TABRawBinBlock *PushBlock( int nFileOffset );public: TABMAPFile(); virtual ~TABMAPFile(); int Open(const char *pszFname, const char *pszAccess, UGKBool bNoErrorMsg = FALSE ); int Close(); int Int2Coordsys(UGKInt32 nX, UGKInt32 nY, double &dX, double &dY); int Coordsys2Int(double dX, double dY, UGKInt32 &nX, UGKInt32 &nY, UGKBool bIgnoreOveflow=FALSE); int Int2CoordsysDist(UGKInt32 nX, UGKInt32 nY, double &dX, double &dY); int Coordsys2IntDist(double dX, double dY, UGKInt32 &nX, UGKInt32 &nY); void SetCoordFilter(TABVertex sMin, TABVertex sMax); void GetCoordFilter(TABVertex &sMin, TABVertex &sMax); void ResetCoordFilter(); int SetCoordsysBounds(double dXMin, double dYMin, double dXMax, double dYMax); UGKInt32 GetMaxObjId(); int MoveToObjId(int nObjId); int PrepareNewObj(int nObjId, UGKByte nObjType); void ResetReading(); int GetNextFeatureId( int nPrevId ); int GetCurObjType(); int GetCurObjId(); TABMAPObjectBlock *GetCurObjBlock(); TABMAPCoordBlock *GetCurCoordBlock(); TABMAPCoordBlock *GetCoordBlock(int nFileOffset); TABMAPHeaderBlock *GetHeaderBlock(); TABIDFile *GetIDFileRef(); TABRawBinBlock *GetIndexObjectBlock(int nFileOffset); int InitDrawingTools(); //MODIFY -ZGQ 06/03/16 由原来的private 变为 public TABToolDefTable * GetToolDefTableRef(){return m_poToolDefTable;} //ADD-ZGQ 06/03/15 int ReadPenDef(int nPenIndex, TABPenDef *psDef); int ReadBrushDef(int nBrushIndex, TABBrushDef *psDef); int ReadFontDef(int nFontIndex, TABFontDef *psDef); int ReadSymbolDef(int nSymbolIndex, TABSymbolDef *psDef); int WritePenDef(TABPenDef *psDef); int WriteBrushDef(TABBrushDef *psDef); int WriteFontDef(TABFontDef *psDef); int WriteSymbolDef(TABSymbolDef *psDef); int GetMinTABFileVersion(); void Dump(FILE *fpOut = NULL);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -