亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mitab_mapfile.cpp

?? 支持各種柵格圖像和矢量圖像讀取的庫(kù)
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
    nObjSize = m_poHeader->GetMapObjectSize(nObjType);    if (m_poCurObjBlock->GetNumUnusedBytes() < nObjSize )    {        /*-------------------------------------------------------------         * OK, the new object won't fit in the current block.  Commit         * the current block to disk, and init a new one.         *         * __TODO__ To create an optimum file, we should split the object         * block at this point and update the index blocks... however the         * file should still be usable even if we don't do it.         *------------------------------------------------------------*/        CommitObjBlock(TRUE);    }    /*-----------------------------------------------------------------     * Init member vars and write new object type/id     *----------------------------------------------------------------*/    m_nCurObjType = nObjType;    m_nCurObjId   = nObjId;    m_nCurObjPtr = m_poCurObjBlock->GetFirstUnusedByteOffset();    m_poCurObjBlock->GotoByteInFile(m_nCurObjPtr);    m_poCurObjBlock->WriteByte(m_nCurObjType);    m_poCurObjBlock->WriteInt32(m_nCurObjId);    // Move write pointer to start location of next object (padding with zeros)    // Nothing will get written to the object block until CommitToFile()    // is called.    m_poCurObjBlock->WriteZeros(m_poHeader->GetMapObjectSize(nObjType) - 5);    /*-----------------------------------------------------------------     * Update .ID Index     *----------------------------------------------------------------*/    m_poIdIndex->SetObjPtr(m_nCurObjId, m_nCurObjPtr);    /*-----------------------------------------------------------------     * Prepare Coords block...      * create a new TABMAPCoordBlock if it was not done yet.     * Note that in write mode, TABCollections require read/write access     * to the coord block.     *----------------------------------------------------------------*/    if (m_poHeader->MapObjectUsesCoordBlock(m_nCurObjType))    {        if (m_poCurCoordBlock == NULL)        {            m_poCurCoordBlock = new TABMAPCoordBlock(m_eAccessMode==TABWrite?                                                     TABReadWrite:                                                      m_eAccessMode);            m_poCurCoordBlock->InitNewBlock(m_fp, 512,                                             m_oBlockManager.AllocNewBlock());            m_poCurCoordBlock->SetMAPBlockManagerRef(&m_oBlockManager);            // Set the references to this coord block in the MAPObjBlock            m_poCurObjBlock->AddCoordBlockRef(m_poCurCoordBlock->                                                           GetStartAddress());        }        if (m_poCurCoordBlock->GetNumUnusedBytes() < 4)        {            int nNewBlockOffset = m_oBlockManager.AllocNewBlock();            m_poCurCoordBlock->SetNextCoordBlock(nNewBlockOffset);            m_poCurCoordBlock->CommitToFile();            m_poCurCoordBlock->InitNewBlock(m_fp, 512, nNewBlockOffset);        }    }    if (CPLGetLastErrorNo() != 0 && CPLGetLastErrorType() == CE_Failure)        return -1;    return 0;}/********************************************************************** *                   TABMAPFile::CommitObjBlock() * * Commit the TABMAPObjBlock and TABMAPCoordBlock to disk after updating * the references to each other and in the TABMAPIndex block. * * After the Commit() call, the ObjBlock and others will be reinitialized * and ready to receive new objects. (only if bInitNewBlock==TRUE) * * Returns 0 on success, -1 on error. **********************************************************************/int TABMAPFile::CommitObjBlock(GBool bInitNewBlock /*=TRUE*/){    int nStatus = 0;    /*-----------------------------------------------------------------     * First check that a objBlock has been created.  It is possible to have     * no object block in files that contain only "NONE" geometries.     *----------------------------------------------------------------*/    if (m_poCurObjBlock == NULL)        return 0;     if (m_eAccessMode != TABWrite)    {        CPLError(CE_Failure, CPLE_AssertionFailed,                 "CommitObjBlock() failed: file not opened for write access.");        return -1;    }    /*-----------------------------------------------------------------     * We need to flush the coord block if there was one     * since a list of coord blocks can belong to only one obj. block     *----------------------------------------------------------------*/    if (m_poCurCoordBlock)    {        // Update the m_nMaxCoordBufSize member in the header block        //        int nTotalCoordSize = m_poCurCoordBlock->GetNumBlocksInChain()*512;        if (nTotalCoordSize > m_poHeader->m_nMaxCoordBufSize)            m_poHeader->m_nMaxCoordBufSize = nTotalCoordSize;        // Update the references to this coord block in the MAPObjBlock        //        m_poCurObjBlock->AddCoordBlockRef(m_poCurCoordBlock->                                                         GetStartAddress());        nStatus = m_poCurCoordBlock->CommitToFile();        delete m_poCurCoordBlock;        m_poCurCoordBlock = NULL;    }    /*-----------------------------------------------------------------     * Commit the obj block.     *----------------------------------------------------------------*/    if (nStatus == 0)        nStatus = m_poCurObjBlock->CommitToFile();    /*-----------------------------------------------------------------     * Update the spatial index     *     * Spatial index will be created here if it was not done yet.     *----------------------------------------------------------------*/    if (nStatus == 0)    {        GInt32 nXMin, nYMin, nXMax, nYMax;        if (m_poSpIndex == NULL)        {            // Spatial Index not created yet...            m_poSpIndex = new TABMAPIndexBlock(m_eAccessMode);            m_poSpIndex->InitNewBlock(m_fp, 512,                                       m_oBlockManager.AllocNewBlock());            m_poSpIndex->SetMAPBlockManagerRef(&m_oBlockManager);            m_poHeader->m_nFirstIndexBlock = m_poSpIndex->GetNodeBlockPtr();        }        m_poCurObjBlock->GetMBR(nXMin, nYMin, nXMax, nYMax);        nStatus = m_poSpIndex->AddEntry(nXMin, nYMin, nXMax, nYMax,                                        m_poCurObjBlock->GetStartAddress());        m_poHeader->m_nMaxSpIndexDepth = MAX(m_poHeader->m_nMaxSpIndexDepth,                                             m_poSpIndex->GetCurMaxDepth()+1);    }    /*-----------------------------------------------------------------     * Reinitialize the obj block only if requested     *----------------------------------------------------------------*/    if (bInitNewBlock && nStatus == 0)    {        nStatus = m_poCurObjBlock->InitNewBlock(m_fp,512,                                            m_oBlockManager.AllocNewBlock());    }    return nStatus;}/********************************************************************** *                   TABMAPFile::GetCurObjType() * * Return the MapInfo object type of the object that the m_poCurObjBlock * is pointing to.  This value is set after a call to MoveToObjId(). * * Returns a value >= 0 on success, -1 on error. **********************************************************************/int TABMAPFile::GetCurObjType(){    return m_nCurObjType;}/********************************************************************** *                   TABMAPFile::GetCurObjId() * * Return the MapInfo object id of the object that the m_poCurObjBlock * is pointing to.  This value is set after a call to MoveToObjId(). * * Returns a value >= 0 on success, -1 on error. **********************************************************************/int TABMAPFile::GetCurObjId(){    return m_nCurObjId;}/********************************************************************** *                   TABMAPFile::GetCurObjBlock() * * Return the m_poCurObjBlock.  If MoveToObjId() has previously been  * called then m_poCurObjBlock points to the beginning of the current  * object data. * * Returns a reference to an object owned by this TABMAPFile object, or * NULL on error. **********************************************************************/TABMAPObjectBlock *TABMAPFile::GetCurObjBlock(){    return m_poCurObjBlock;}/********************************************************************** *                   TABMAPFile::GetCurCoordBlock() * * Return the m_poCurCoordBlock.  This function should be used after  * PrepareNewObj() to get the reference to the coord block that has * just been initialized. * * Returns a reference to an object owned by this TABMAPFile object, or * NULL on error. **********************************************************************/TABMAPCoordBlock *TABMAPFile::GetCurCoordBlock(){    return m_poCurCoordBlock;}/********************************************************************** *                   TABMAPFile::GetCoordBlock() * * Return a TABMAPCoordBlock object ready to read coordinates from it. * The block that contains nFileOffset will automatically be * loaded, and if nFileOffset is the beginning of a new block then the * pointer will be moved to the beginning of the data. * * The contents of the returned object is only valid until the next call * to GetCoordBlock(). * * Returns a reference to an object owned by this TABMAPFile object, or * NULL on error. **********************************************************************/TABMAPCoordBlock *TABMAPFile::GetCoordBlock(int nFileOffset){    if (m_eAccessMode != TABRead)        return NULL;    if (m_poCurCoordBlock == NULL)    {        m_poCurCoordBlock = new TABMAPCoordBlock(m_eAccessMode);        m_poCurCoordBlock->InitNewBlock(m_fp, 512);    }    /*-----------------------------------------------------------------     * Use GotoByteInFile() to go to the requested location.  This will     * force loading the block if necessary and reading its header.     * If nFileOffset is at the beginning of the requested block, then     * we make sure to move the read pointer past the 8 bytes header     * to be ready to read coordinates data     *----------------------------------------------------------------*/    if ( m_poCurCoordBlock->GotoByteInFile(nFileOffset) != 0)    {        // Failed... an error has already been reported.        return NULL;    }    if (nFileOffset % 512 == 0)        m_poCurCoordBlock->GotoByteInBlock(8);      // Skip Header    return m_poCurCoordBlock;}/********************************************************************** *                   TABMAPFile::GetHeaderBlock() * * Return a reference to the MAP file's header block. * * The returned pointer is a reference to an object owned by this TABMAPFile * object and should not be deleted by the caller. * * Return NULL if file has not been opened yet. **********************************************************************/TABMAPHeaderBlock *TABMAPFile::GetHeaderBlock(){    return m_poHeader;}/********************************************************************** *                   TABMAPFile::GetIDFileRef() * * Return a reference to the .ID file attached to this .MAP file * * The returned pointer is a reference to an object owned by this TABMAPFile * object and should not be deleted by the caller. * * Return NULL if file has not been opened yet. **********************************************************************/TABIDFile *TABMAPFile::GetIDFileRef(){    return m_poIdIndex;}/********************************************************************** *                   TABMAPFile::GetIndexBlock() * * Return a reference to the requested index or object block.. * * Ownership of the returned block is turned over to the caller, who should * delete it when no longer needed.  The type of the block can be determined * with the GetBlockType() method.  * * @param nFileOffset the offset in the map file of the spatial index * block or object block to load. * * @return The requested TABMAPIndexBlock, TABMAPObjectBlock or NULL if the  * read fails for some reason. **********************************************************************/TABRawBinBlock *TABMAPFile::GetIndexObjectBlock( int nFileOffset ){    /*----------------------------------------------------------------     * Read from the file     *---------------------------------------------------------------*/    GByte abyData[512];    if (VSIFSeek(m_fp, nFileOffset, SEEK_SET) != 0         || VSIFRead(abyData, sizeof(GByte), 512, m_fp) != 512 )    {        CPLError(CE_Failure, CPLE_FileIO,                 "GetIndexBlock() failed reading %d bytes at offset %d.",                 512, nFileOffset);        return NULL;    }/* -------------------------------------------------------------------- *//*      Create and initialize depending on the block type.              *//* -------------------------------------------------------------------- */    int nBlockType = abyData[0];    TABRawBinBlock *poBlock;    if( nBlockType == TABMAP_INDEX_BLOCK )        poBlock = new TABMAPIndexBlock();    else        poBlock = new TABMAPObjectBlock();        if( poBlock->InitBlockFromData(abyData,512,TRUE,m_fp,nFileOffset) == -1 )    {        delete poBlock;        poBlock = NULL;    }    return poBlock;}/********************************************************************** *                   TABMAPFile::InitDrawingTools() * * Init the drawing tools for this file. * * In Read mode, this will load the drawing tools from the file. * * In Write mode, this function will init an empty the tool def table. * * Reutrns 0 on success, -1 on error. **********************************************************************/int TABMAPFile::InitDrawingTools()

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视视频在线观看入口直接观看www| 99久免费精品视频在线观看| 国产日韩成人精品| 欧美视频一区二区在线观看| 韩国成人精品a∨在线观看| ㊣最新国产の精品bt伙计久久| 欧美精品 日韩| 波多野结衣中文一区| 极品少妇xxxx偷拍精品少妇| 亚洲精品ww久久久久久p站| 日韩免费一区二区三区在线播放| 久久精品一区二区三区四区| 欧美日韩在线播放三区| 91丨porny丨蝌蚪视频| 国产综合久久久久久久久久久久| 亚洲成人综合网站| 亚洲免费视频成人| 国产精品免费久久| 欧美精彩视频一区二区三区| 欧美一区二区人人喊爽| 在线观看国产日韩| 色综合久久中文综合久久97| 国产成人精品一区二区三区网站观看| 青青草精品视频| 亚洲一二三级电影| 亚洲一区二区在线视频| 亚洲欧美电影一区二区| 国产精品日韩成人| 国产精品三级av| 欧美国产精品一区二区三区| 久久综合五月天婷婷伊人| 日韩区在线观看| 日韩欧美在线观看一区二区三区| 欧美日韩免费一区二区三区视频| 成人黄色小视频| 风流少妇一区二区| 国产99久久久国产精品潘金| 国产剧情在线观看一区二区| 喷白浆一区二区| 蜜桃视频第一区免费观看| 五月激情丁香一区二区三区| 午夜精品久久一牛影视| 午夜在线电影亚洲一区| 丝袜美腿亚洲一区| 日韩av午夜在线观看| 五月婷婷欧美视频| 青椒成人免费视频| 人禽交欧美网站| 狠狠色狠狠色综合| 国产很黄免费观看久久| 成人国产精品免费| 91亚洲午夜精品久久久久久| 99久久伊人网影院| 色综合久久99| 欧美精品自拍偷拍动漫精品| 欧美久久一二区| 精品欧美一区二区久久| 国产亚洲一区字幕| 最新高清无码专区| 国产做a爰片久久毛片| 亚洲色欲色欲www在线观看| 中文字幕一区三区| 一区二区三区免费在线观看| 午夜精品久久久久久| 蜜桃视频在线一区| 成人午夜视频福利| 日本精品一区二区三区四区的功能| 欧美午夜在线一二页| 欧美一区二区观看视频| 久久先锋影音av鲁色资源| 欧美国产精品v| 亚洲国产日韩综合久久精品| 日本成人在线视频网站| 国产成人精品亚洲777人妖| 91丝袜美腿高跟国产极品老师 | 成人免费高清在线观看| 91蜜桃免费观看视频| 欧美久久久久久久久久| 久久伊99综合婷婷久久伊| 国产精品乱子久久久久| 亚洲亚洲人成综合网络| 韩国成人在线视频| 91国在线观看| 欧美精品一区二区在线观看| 国产精品视频一二三区 | 成人永久aaa| 欧美三级中文字| 久久免费国产精品| 亚洲成人你懂的| 成人午夜伦理影院| 制服视频三区第一页精品| 国产女人18水真多18精品一级做| 亚洲一区在线视频观看| 国产精品中文字幕一区二区三区| 一本久久综合亚洲鲁鲁五月天 | 久久婷婷国产综合国色天香| 亚洲精品日韩一| 国产揄拍国内精品对白| 色吧成人激情小说| 久久久久久9999| 亚洲成人高清在线| 波多野结衣中文字幕一区| 国产人久久人人人人爽| 免费一级片91| 欧美日韩一区二区三区四区五区| 久久亚洲影视婷婷| 青青草视频一区| 在线精品视频一区二区三四| 国产欧美综合色| 蜜桃久久久久久| 欧美日韩国产天堂| 伊人夜夜躁av伊人久久| 成人永久免费视频| 精品处破学生在线二十三| 亚洲国产乱码最新视频| 99在线热播精品免费| 国产日韩精品久久久| 精品无人码麻豆乱码1区2区| 在线不卡的av| 午夜精品影院在线观看| 色激情天天射综合网| 国产精品国产精品国产专区不蜜| 国产在线精品一区二区三区不卡| 91麻豆精品国产91久久久使用方法| 亚洲日本va午夜在线影院| 成人免费的视频| 国产蜜臀av在线一区二区三区| 狠狠色综合色综合网络| 精品欧美一区二区三区精品久久| 日本欧美韩国一区三区| 欧美日高清视频| 亚洲精品少妇30p| 91国偷自产一区二区三区观看| 一区视频在线播放| 粉嫩av一区二区三区粉嫩| 久久久www成人免费毛片麻豆| 激情综合色综合久久综合| 日韩欧美你懂的| 精品影视av免费| 久久午夜老司机| 高清在线不卡av| 国产精品久久久久婷婷| av在线不卡免费看| 亚洲另类春色国产| 欧美揉bbbbb揉bbbbb| 日韩在线播放一区二区| 欧美成人女星排行榜| 国产一区欧美一区| 国产精品素人一区二区| 91网上在线视频| 一卡二卡三卡日韩欧美| 欧美人牲a欧美精品| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩免费福利电影在线观看| 久久精品国产第一区二区三区| 欧美大片在线观看一区二区| 精品亚洲国产成人av制服丝袜| 久久夜色精品国产欧美乱极品| 国产不卡一区视频| 亚洲欧美日本在线| 欧美顶级少妇做爰| 国产精品影视网| 亚洲天堂av一区| 欧美精品久久久久久久多人混战| 全国精品久久少妇| 国产肉丝袜一区二区| 色噜噜夜夜夜综合网| 日韩电影在线看| 国产日韩精品久久久| 在线观看不卡一区| 精品一二线国产| 国产精品初高中害羞小美女文| 欧美综合一区二区三区| 久久99久久99小草精品免视看| 欧美高清在线一区二区| 欧美日韩视频不卡| 国产精品一区二区无线| 一区2区3区在线看| 欧美成人免费网站| 91精品福利视频| 久久99国产精品久久| 亚洲丝袜精品丝袜在线| 欧美一区二区视频网站| 国产成人av福利| 亚州成人在线电影| 国产欧美日韩麻豆91| 欧美精品色一区二区三区| 日韩一区二区免费在线电影| 国产福利精品导航| 五月开心婷婷久久| 中文字幕一区在线| 精品国产自在久精品国产| 欧洲一区二区三区在线| 国产精品影视在线观看| 亚洲电影一区二区| 国产精品少妇自拍| 欧美一区二区三区免费大片 | 成人性生交大片免费| 日本欧美久久久久免费播放网| 国产精品不卡在线|