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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mitab_mapcoordblock.cpp

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
    if ((!bCompressed && (WriteInt32(nX) != 0 || WriteInt32(nY) != 0 ) ) ||        (bCompressed && (WriteInt16(nX - m_nComprOrgX) != 0 ||                         WriteInt16(nY - m_nComprOrgY) != 0) ) )    {        return -1;    }    /*-----------------------------------------------------------------     * Update block MBR     *----------------------------------------------------------------*/    //__TODO__ Do we still need to track the block MBR???    if (nX < m_nMinX)        m_nMinX = nX;    if (nX > m_nMaxX)        m_nMaxX = nX;        if (nY < m_nMinY)        m_nMinY = nY;    if (nY > m_nMaxY)        m_nMaxY = nY;        /*-------------------------------------------------------------     * Also keep track of current feature MBR.     *------------------------------------------------------------*/    if (nX < m_nFeatureXMin)        m_nFeatureXMin = nX;    if (nX > m_nFeatureXMax)        m_nFeatureXMax = nX;    if (nY < m_nFeatureYMin)        m_nFeatureYMin = nY;    if (nY > m_nFeatureYMax)        m_nFeatureYMax = nY;    return 0;}/********************************************************************** *                   TABMAPCoordBlock::SetMAPBlockManagerRef() * * Pass a reference to the block manager object for the file this  * block belongs to.  The block manager will be used by this object * when it needs to automatically allocate a new block. **********************************************************************/void TABMAPCoordBlock::SetMAPBlockManagerRef(TABBinBlockManager *poBlockMgr){    m_poBlockManagerRef = poBlockMgr;};/********************************************************************** *                   TABMAPCoordBlock::ReadBytes() * * Cover function for TABRawBinBlock::ReadBytes() that will automagically * load the next coordinate block in the chain before reading the  * requested bytes if we are at the end of the current block and if * m_nNextCoordBlock is a valid block. * * Then the control is passed to TABRawBinBlock::ReadBytes() to finish the * work: * Copy the number of bytes from the data block's internal buffer to * the user's buffer pointed by pabyDstBuf. * * Passing pabyDstBuf = NULL will only move the read pointer by the * specified number of bytes as if the copy had happened... but it  * won't crash. * * Returns 0 if succesful or -1 if an error happened, in which case  * CPLError() will have been called. **********************************************************************/int     TABMAPCoordBlock::ReadBytes(int numBytes, GByte *pabyDstBuf){    int nStatus;    if (m_pabyBuf &&         m_nCurPos >= (m_numDataBytes+MAP_COORD_HEADER_SIZE) &&         m_nNextCoordBlock > 0)    {        // We're at end of current block... advance to next block.        if ( (nStatus=GotoByteInFile(m_nNextCoordBlock)) != 0)        {            // Failed.... an error has already been reported.            return nStatus;        }        GotoByteInBlock(MAP_COORD_HEADER_SIZE); // Move pointer past header        m_numBlocksInChain++;    }    if (m_pabyBuf &&         m_nCurPos < (m_numDataBytes+MAP_COORD_HEADER_SIZE) &&         m_nCurPos+numBytes > (m_numDataBytes+MAP_COORD_HEADER_SIZE) &&         m_nNextCoordBlock > 0)    {        // Data overlaps on more than one block        // Read until end of this block and then recursively call ReadBytes()        // for the rest.        int numBytesInThisBlock =                       (m_numDataBytes+MAP_COORD_HEADER_SIZE)-m_nCurPos;        nStatus = TABRawBinBlock::ReadBytes(numBytesInThisBlock, pabyDstBuf);        if (nStatus == 0)            nStatus = TABMAPCoordBlock::ReadBytes(numBytes-numBytesInThisBlock,                                               pabyDstBuf+numBytesInThisBlock);        return nStatus;    }    return TABRawBinBlock::ReadBytes(numBytes, pabyDstBuf);}/********************************************************************** *                   TABMAPCoordBlock::WriteBytes() * * Cover function for TABRawBinBlock::WriteBytes() that will automagically * CommitToFile() the current block and create a new one if we are at  * the end of the current block. * * Then the control is passed to TABRawBinBlock::WriteBytes() to finish the * work. * * Passing pabySrcBuf = NULL will only move the write pointer by the * specified number of bytes as if the copy had happened... but it  * won't crash. * * Returns 0 if succesful or -1 if an error happened, in which case  * CPLError() will have been called. **********************************************************************/int  TABMAPCoordBlock::WriteBytes(int nBytesToWrite, GByte *pabySrcBuf){    if (m_eAccess != TABWrite && m_eAccess != TABReadWrite )    {        CPLError(CE_Failure, CPLE_AppDefined,                 "WriteBytes(): Block does not support write operations.");        return -1;    }    if (m_poBlockManagerRef && (m_nBlockSize - m_nCurPos) < nBytesToWrite)    {        if (nBytesToWrite <= (m_nBlockSize-MAP_COORD_HEADER_SIZE))        {            // Data won't fit in this block but can fit inside a single            // block, so we'll allocate a new block for it.  This will             // prevent us from overlapping coordinate values on 2 blocks, but            // still allows strings longer than one block (see 'else' below).            //            if ( m_nNextCoordBlock != 0 )            {                // We're in read/write mode and there is already an allocated                // block following this one in the chain ... just reload it                 // and continue writing to it                CPLAssert( m_eAccess == TABReadWrite );                if (CommitToFile() != 0 ||                     ReadFromFile(m_fp, m_nNextCoordBlock, m_nBlockSize) != 0)                {                    // An error message should have already been reported.                    return -1;                }            }            else            {                // Need to alloc a new block.                int nNewBlockOffset = m_poBlockManagerRef->AllocNewBlock();                SetNextCoordBlock(nNewBlockOffset);                if (CommitToFile() != 0 ||                    InitNewBlock(m_fp, m_nBlockSize, nNewBlockOffset) != 0)                {                    // An error message should have already been reported.                    return -1;                }                m_numBlocksInChain++;            }        }        else        {            // Data to write is longer than one block... so we'll have to            // split it over multiple block through multiple calls.            //            int nStatus = 0;            while(nStatus == 0 && nBytesToWrite > 0)            {                int nBytes = m_nBlockSize-MAP_COORD_HEADER_SIZE;                if ( (m_nBlockSize - m_nCurPos) > 0 )                {                    // Use free room in current block                    nBytes = (m_nBlockSize - m_nCurPos);                }                nBytes = MIN(nBytes, nBytesToWrite);                // The following call will result in a new block being                 // allocated in the if() block above.                nStatus = TABMAPCoordBlock::WriteBytes(nBytes,                                                        pabySrcBuf);                nBytesToWrite -= nBytes;                pabySrcBuf += nBytes;            }            return nStatus;        }    }    if (m_nCurPos >= MAP_COORD_HEADER_SIZE)    {        // Keep track of Coordinate data... this means ignore header bytes        // that could be written.        m_nTotalDataSize += nBytesToWrite;        m_nFeatureDataSize += nBytesToWrite;    }    return TABRawBinBlock::WriteBytes(nBytesToWrite, pabySrcBuf);}/********************************************************************** *                   TABMAPCoordBlock::StartNewFeature() * * Reset all member vars that are used to keep track of data size * and MBR for the current feature.  This is info is not needed by * the coord blocks themselves, but it helps a lot the callers to * have this class take care of that for them. * * See Also: GetFeatureDataSize() and GetFeatureMBR() **********************************************************************/void TABMAPCoordBlock::StartNewFeature(){    m_nFeatureDataSize = 0;    m_nFeatureXMin = 1000000000;    m_nFeatureYMin = 1000000000;    m_nFeatureXMax = -1000000000;    m_nFeatureYMax = -1000000000;}/********************************************************************** *                   TABMAPCoordBlock::GetFeatureMBR() * * Return the MBR of all the coords written using WriteIntCoord() since * the last call to StartNewFeature(). **********************************************************************/void TABMAPCoordBlock::GetFeatureMBR(GInt32 &nXMin, GInt32 &nYMin,                                      GInt32 &nXMax, GInt32 &nYMax){    nXMin = m_nFeatureXMin;    nYMin = m_nFeatureYMin;    nXMax = m_nFeatureXMax;    nYMax = m_nFeatureYMax; }/********************************************************************** *                   TABMAPCoordBlock::Dump() * * Dump block contents... available only in DEBUG mode. **********************************************************************/#ifdef DEBUGvoid TABMAPCoordBlock::Dump(FILE *fpOut /*=NULL*/){    if (fpOut == NULL)        fpOut = stdout;    fprintf(fpOut, "----- TABMAPCoordBlock::Dump() -----\n");    if (m_pabyBuf == NULL)    {        fprintf(fpOut, "Block has not been initialized yet.");    }    else    {        fprintf(fpOut,"Coordinate Block (type %d) at offset %d.\n",                                                  m_nBlockType, m_nFileOffset);        fprintf(fpOut,"  m_numDataBytes        = %d\n", m_numDataBytes);        fprintf(fpOut,"  m_nNextCoordBlock     = %d\n", m_nNextCoordBlock);    }    fflush(fpOut);}#endif // DEBUG

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
3751色影院一区二区三区| 色婷婷av一区二区三区之一色屋| 亚洲天天做日日做天天谢日日欢| 精品国产不卡一区二区三区| 欧美一区二区三区成人| 日韩欧美一区在线观看| 91精品国产综合久久国产大片| 欧美日韩国产免费一区二区| 欧美巨大另类极品videosbest | 丝袜美腿亚洲色图| 亚洲自拍与偷拍| 丝袜脚交一区二区| 激情国产一区二区| 春色校园综合激情亚洲| 91啪九色porn原创视频在线观看| 在线免费观看视频一区| 欧美日韩久久一区二区| 欧美成人一区二区三区| 国产丝袜美腿一区二区三区| 亚洲欧美一区二区视频| 亚洲精品欧美激情| 日韩成人精品视频| 国产剧情一区二区三区| 91蜜桃婷婷狠狠久久综合9色| 色综合久久88色综合天天| 91麻豆精品91久久久久同性| 久久久蜜桃精品| 亚洲蜜臀av乱码久久精品 | 日本成人中文字幕| 国产在线精品不卡| 欧美在线观看禁18| 精品精品国产高清a毛片牛牛| 国产精品色一区二区三区| 亚洲国产成人高清精品| 久久99精品久久久久久国产越南| voyeur盗摄精品| 91麻豆精品国产91久久久久久久久 | 久久综合久久鬼色| 亚洲女同ⅹxx女同tv| 免费在线看一区| 91日韩精品一区| 久久综合久久综合九色| 亚洲午夜影视影院在线观看| 轻轻草成人在线| a美女胸又www黄视频久久| 欧美一级二级三级乱码| 亚洲欧美日韩国产中文在线| 国产麻豆午夜三级精品| 91色婷婷久久久久合中文| 精品日韩成人av| 亚洲444eee在线观看| 99精品视频在线播放观看| 精品国产成人系列| 爽好多水快深点欧美视频| 国产白丝精品91爽爽久久| 日韩一区二区电影| 亚洲成a人v欧美综合天堂下载| 成人午夜视频福利| 久久久久久免费毛片精品| 日日摸夜夜添夜夜添精品视频| 91亚洲永久精品| 国产精品入口麻豆原神| 激情小说亚洲一区| 日韩欧美国产一二三区| 丝袜亚洲另类欧美| 欧美酷刑日本凌虐凌虐| 亚洲gay无套男同| 欧美日韩亚洲另类| 亚洲影视资源网| 在线观看日韩一区| 亚洲一区国产视频| 欧洲一区二区三区在线| 一区二区在线观看av| 91黄色免费观看| 亚洲一区二区三区四区中文字幕| 99国产精品视频免费观看| 国产精品区一区二区三| 成人v精品蜜桃久久一区| 国产精品高潮久久久久无| 成人高清av在线| 综合分类小说区另类春色亚洲小说欧美| 福利视频网站一区二区三区| 国产亚洲自拍一区| 懂色av一区二区三区蜜臀| 欧美激情一区三区| 色综合中文字幕| 亚洲宅男天堂在线观看无病毒| 欧美视频在线播放| 日日欢夜夜爽一区| 精品国产乱码久久久久久浪潮| 国产在线一区二区| 国产精品久久网站| 色哦色哦哦色天天综合| 亚洲成av人片一区二区梦乃| 欧美乱熟臀69xxxxxx| 蜜臀av一区二区在线免费观看| 精品国产电影一区二区| 成人精品免费视频| 亚洲一区二区欧美日韩 | 国产成人精品免费| 亚洲人成精品久久久久| 欧美日韩国产综合一区二区| 韩日欧美一区二区三区| 国产精品国产自产拍高清av| 在线观看av一区| 极品少妇xxxx精品少妇偷拍 | 91久久精品网| 另类调教123区| 国产清纯美女被跳蛋高潮一区二区久久w| 成人app网站| 天天操天天综合网| 日本一区二区三区四区在线视频| 972aa.com艺术欧美| 蜜臀国产一区二区三区在线播放| 国产精品视频一二三| 欧美日韩一区二区在线观看| 九九精品视频在线看| 国产三区在线成人av| 久久99久久99精品免视看婷婷| 日本一区二区高清| 欧美人伦禁忌dvd放荡欲情| 国产.精品.日韩.另类.中文.在线.播放| 亚洲黄色尤物视频| 国产亚洲精久久久久久| 在线播放视频一区| 色综合一区二区| 东方aⅴ免费观看久久av| 免费成人深夜小野草| 亚洲精品老司机| 国产午夜精品一区二区 | 国内精品免费**视频| 亚洲第一福利一区| 最近中文字幕一区二区三区| 久久免费看少妇高潮| 日韩欧美一区电影| 欧美三级电影一区| 在线影视一区二区三区| 成人av资源在线| 国产不卡一区视频| 国产精品一区二区久久不卡| 蜜桃精品视频在线观看| 日韩国产欧美三级| 亚洲福利视频三区| 亚洲最大的成人av| 亚洲欧美福利一区二区| 国产精品久久久久久久久久免费看| 精品国产伦一区二区三区观看方式| 欧美电影一区二区三区| 欧美久久一区二区| 欧美一级在线视频| 88在线观看91蜜桃国自产| 欧美中文字幕一区二区三区亚洲| 99精品国产一区二区三区不卡| 成人av在线播放网址| 丰满放荡岳乱妇91ww| 丁香激情综合五月| 夫妻av一区二区| fc2成人免费人成在线观看播放| 国产成人a级片| a4yy欧美一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃| a级高清视频欧美日韩| 99re6这里只有精品视频在线观看| 99久久久久久| 在线免费观看日本一区| 在线成人小视频| 精品日韩一区二区三区免费视频| 精品国产99国产精品| 久久久久久久精| 亚洲天堂精品在线观看| 一区二区三区高清| 热久久国产精品| 国产+成+人+亚洲欧洲自线| 91视频一区二区| 制服丝袜一区二区三区| 久久一二三国产| 欧美国产日本视频| 亚洲自拍偷拍麻豆| 精品系列免费在线观看| 成人深夜视频在线观看| 欧美影院一区二区| 久久亚洲综合色| 亚洲欧美aⅴ...| 麻豆成人91精品二区三区| 国产99久久久精品| 欧美三级电影网| 国产亚洲成aⅴ人片在线观看| 亚洲另类春色国产| 狠狠色丁香婷综合久久| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美精品aⅴ在线视频| 日韩欧美高清dvd碟片| 中文字幕在线一区| 午夜精品久久久久久久久久| 国产福利91精品| 欧美久久一区二区| 亚洲人成网站在线| 韩国理伦片一区二区三区在线播放| 色噜噜久久综合| 中文字幕av一区 二区|