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

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

?? xmlucstranscoder.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
字號:
/* * Copyright 1999-2001,2004 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#include <xercesc/util/BitOps.hpp>#include <xercesc/util/XMLUCS4Transcoder.hpp>#include <xercesc/util/TranscodingException.hpp>#include <string.h>XERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  XMLUCS4Transcoder: Constructors and Destructor// ---------------------------------------------------------------------------XMLUCS4Transcoder::XMLUCS4Transcoder(const  XMLCh* const    encodingName                                    , const unsigned int    blockSize                                    , const bool            swapped                                    , MemoryManager* const manager) :    XMLTranscoder(encodingName, blockSize, manager)    , fSwapped(swapped){}XMLUCS4Transcoder::~XMLUCS4Transcoder(){}// ---------------------------------------------------------------------------//  XMLUCS4Transcoder: Implementation of the transcoder API// ---------------------------------------------------------------------------unsigned intXMLUCS4Transcoder::transcodeFrom(const  XMLByte* const          srcData                                , const unsigned int            srcCount                                ,       XMLCh* const            toFill                                , const unsigned int            maxChars                                ,       unsigned int&           bytesEaten                                ,       unsigned char* const    charSizes){    // If debugging, make sure that the block size is legal    #if defined(XERCES_DEBUG)    checkBlockSize(maxChars);    #endif    //    //  Get pointers to the start and end of the source buffer in terms of    //  UCS-4 characters.    //    const UCS4Ch*   srcPtr = (const UCS4Ch*)srcData;    const UCS4Ch*   srcEnd = srcPtr + (srcCount / sizeof(UCS4Ch));    //    //  Get pointers to the start and end of the target buffer, which is    //  in terms of the XMLCh chars we output.    //    XMLCh*  outPtr = toFill;    XMLCh*  outEnd = toFill + maxChars;    //    //  And get a pointer into the char sizes buffer. We will run this    //  up as we put chars into the output buffer.    //    unsigned char* sizePtr = charSizes;    //    //  Now process chars until we either use up all our source or all of    //  our output space.    //    while ((outPtr < outEnd) && (srcPtr < srcEnd))    {        //        //  Get the next UCS char out of the buffer. Don't bump the ptr        //  yet since we might not have enough storage for it in the target        //  (if its causes a surrogate pair to be created.        //        UCS4Ch nextVal = *srcPtr;        // If it needs to be swapped, then do it        if (fSwapped)            nextVal = BitOps::swapBytes(nextVal);        // Handle a surrogate pair if needed        if (nextVal & 0xFFFF0000)        {            //            //  If we don't have room for both of the chars, then we            //  bail out now.            //            if (outPtr + 1 == outEnd)                break;            const XMLCh ch1 = XMLCh(((nextVal - 0x10000) >> 10) + 0xD800);            const XMLCh ch2 = XMLCh(((nextVal - 0x10000) & 0x3FF) + 0xDC00);            //            //  We have room so store them both. But note that the            //  second one took up no source bytes!            //            *sizePtr++ = sizeof(UCS4Ch);            *outPtr++ = ch1;            *sizePtr++ = 0;            *outPtr++ = ch2;        }         else        {            //            //  No surrogate, so just store it and bump the count of chars            //  read. Update the char sizes buffer for this char's entry.            //            *sizePtr++ = sizeof(UCS4Ch);            *outPtr++ = XMLCh(nextVal);        }        // Indicate that we ate another UCS char's worth of bytes        srcPtr++;    }    // Set the bytes eaten parameter    bytesEaten = ((const XMLByte*)srcPtr) - srcData;    // And return the chars written into the output buffer    return outPtr - toFill;}unsigned intXMLUCS4Transcoder::transcodeTo( const   XMLCh* const    srcData                                , const unsigned int    srcCount                                ,       XMLByte* const  toFill                                , const unsigned int    maxBytes                                ,       unsigned int&   charsEaten                                , const UnRepOpts){    // If debugging, make sure that the block size is legal    #if defined(XERCES_DEBUG)    checkBlockSize(maxBytes);    #endif    //    //  Get pointers to the start and end of the source buffer, which    //  is in terms of XMLCh chars.    //    const XMLCh*  srcPtr = srcData;    const XMLCh*  srcEnd = srcData + srcCount;    //    //  Get pointers to the start and end of the target buffer, in terms    //  of UCS-4 chars.    //    UCS4Ch*   outPtr = (UCS4Ch*)toFill;    UCS4Ch*   outEnd = outPtr + (maxBytes / sizeof(UCS4Ch));    //    //  Now loop until we either run out of source characters or we    //  fill up our output buffer.    //    XMLCh trailCh;    while ((outPtr < outEnd) && (srcPtr < srcEnd))    {        //        //  Get out an XMLCh char from the source. Don't bump up the        //  pointer yet, since it might be a leading for which we don't        //  have the trailing.        //        const XMLCh curCh = *srcPtr;        //        //  If its a leading char of a surrogate pair handle it one way,        //  else just cast it over into the target.        //        if ((curCh >= 0xD800) && (curCh <= 0xDBFF))        {            //            //  Ok, we have to have another source char available or we            //  just give up without eating the leading char.            //            if (srcPtr + 1 == srcEnd)                break;            //            //  We have the trailing char, so eat the first char and the            //  trailing char from the source.            //            srcPtr++;            trailCh = *srcPtr++;            //            //  Then make sure its a legal trailing char. If not, throw            //  an exception.            //            if ( !( (trailCh >= 0xDC00) && (trailCh <= 0xDFFF) ) )                ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadTrailingSurrogate, getMemoryManager());            // And now combine the two into a single output char            *outPtr++ = ((curCh - 0xD800) << 10)                        + (trailCh - 0xDC00) + 0x10000;        }         else        {            //            //  Its just a char, so we can take it as is. If we need to            //  swap it, then swap it. Because of flakey compilers, use            //  a temp first.            //            const UCS4Ch tmpCh = UCS4Ch(curCh);            if (fSwapped)                *outPtr++ = BitOps::swapBytes(tmpCh);            else                *outPtr++ = tmpCh;            // Bump the source pointer            srcPtr++;        }    }    // Set the chars we ate from the source    charsEaten = srcPtr - srcData;    // Return the bytes we wrote to the output    return ((XMLByte*)outPtr) - toFill;}bool XMLUCS4Transcoder::canTranscodeTo(const unsigned int) const{    // We can handle anything    return true;}XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日产国产欧美视频一区精品| 日韩视频永久免费| 中文字幕在线观看不卡视频| 高清av一区二区| 国产免费成人在线视频| 国产69精品久久777的优势| 亚洲国产精品国自产拍av| 国产盗摄精品一区二区三区在线| www成人在线观看| 国产高清在线观看免费不卡| 国产精品国产精品国产专区不蜜 | 亚洲成a人在线观看| 91精品在线免费| 国产精品一区二区久久不卡| 国产精品久久久久久久裸模 | 婷婷综合五月天| 67194成人在线观看| 免费成人深夜小野草| 国产日韩v精品一区二区| 91婷婷韩国欧美一区二区| 亚洲一二三四在线| 精品久久久久久久久久久久久久久久久| 国产真实精品久久二三区| 一区二区三区四区国产精品| 亚洲图片激情小说| 国产69精品久久99不卡| 欧美日韩黄视频| 国产午夜一区二区三区| 亚洲一区二区三区爽爽爽爽爽 | 中文文精品字幕一区二区| 中文字幕一区二区三区精华液| 亚洲自拍偷拍网站| 国产成人av网站| 欧美日韩国产在线播放网站| 久久99精品一区二区三区三区| 久久精品人人做人人综合| 日本乱码高清不卡字幕| 久久国产精品色| 亚洲精品你懂的| 国产清纯在线一区二区www| 欧美无人高清视频在线观看| 国产乱妇无码大片在线观看| 亚洲在线视频免费观看| 国产日韩精品一区二区三区 | 91在线精品一区二区| 爽好久久久欧美精品| 综合婷婷亚洲小说| 欧美精品一区二区三区高清aⅴ | 欧美日韩国产高清一区| 成人激情文学综合网| 美腿丝袜亚洲综合| 亚洲网友自拍偷拍| 中文字幕中文乱码欧美一区二区| 欧美大胆人体bbbb| 欧美日韩精品三区| 91成人在线观看喷潮| 岛国精品在线观看| 九色综合狠狠综合久久| 视频一区视频二区中文| 亚洲精品你懂的| 亚洲欧美在线视频观看| 国产婷婷色一区二区三区四区| 日韩三级电影网址| 欧美肥大bbwbbw高潮| 欧美图区在线视频| 欧洲中文字幕精品| 色先锋资源久久综合| 99久久久久久| a在线欧美一区| 成人综合激情网| 国产suv精品一区二区6| 国产一区91精品张津瑜| 久久99久久精品| 精品一区二区三区免费视频| 日日骚欧美日韩| 奇米色一区二区| 三级欧美韩日大片在线看| 日日夜夜免费精品| 日韩国产欧美三级| 久久se精品一区精品二区| 精品一区二区三区在线观看| 老司机免费视频一区二区三区| 男人的j进女人的j一区| 久色婷婷小香蕉久久| 久久精品国产亚洲5555| 国产一区二区在线免费观看| 久久国产尿小便嘘嘘| 国产综合久久久久影院| 国产69精品久久久久毛片| www.亚洲色图| 在线一区二区三区四区五区| 欧美日韩小视频| 91精品福利在线一区二区三区 | 久久99精品国产.久久久久| 人人精品人人爱| 精品一区二区在线观看| 高清成人在线观看| 91理论电影在线观看| 欧美日韩激情一区二区| 日韩三区在线观看| 欧美激情在线观看视频免费| 亚洲人精品午夜| 亚洲国产美国国产综合一区二区| 精品久久一二三区| 国产精品视频第一区| 亚洲欧美在线视频| 亚洲成av人综合在线观看| 亚洲精品日韩专区silk| 奇米影视一区二区三区| 国产在线精品国自产拍免费| 国产寡妇亲子伦一区二区| 波波电影院一区二区三区| 在线影院国内精品| 国产精品99久久久久久久女警| 色一区在线观看| 欧美日韩国产精品自在自线| 91超碰这里只有精品国产| 精品少妇一区二区三区在线播放| 国产午夜精品一区二区| 日韩理论片在线| 日韩精品乱码av一区二区| 激情成人综合网| 99精品欧美一区二区三区综合在线| 色诱亚洲精品久久久久久| 日韩免费福利电影在线观看| 中文字幕精品一区二区精品绿巨人| 亚洲欧美日韩久久精品| 蜜臀久久99精品久久久画质超高清| 国产精品白丝jk黑袜喷水| 91免费版在线| 日韩欧美国产一区在线观看| 中文字幕精品一区| 全部av―极品视觉盛宴亚洲| 成人综合在线观看| 欧美一区二区高清| 国产精品动漫网站| 日韩av在线免费观看不卡| 成人a免费在线看| 69av一区二区三区| 亚洲一区二区三区四区在线免费观看 | 国产91在线|亚洲| 欧美日韩国产高清一区二区三区| 精品福利av导航| 亚洲久本草在线中文字幕| 日韩va欧美va亚洲va久久| 色婷婷综合久久久久中文一区二区| 91精品国产综合久久久久久久 | 亚洲欧洲av在线| 蜜臀av在线播放一区二区三区| 9l国产精品久久久久麻豆| 日韩西西人体444www| 亚洲丝袜自拍清纯另类| 国产福利不卡视频| 日韩欧美一二三| 亚洲成人午夜影院| 97久久精品人人做人人爽50路| 欧美成人aa大片| 亚洲在线免费播放| 91在线观看污| 亚洲精品在线观看视频| 亚洲福利电影网| 色婷婷综合视频在线观看| 久久精品亚洲精品国产欧美kt∨| 一区二区欧美视频| 91国内精品野花午夜精品| 亚洲国产岛国毛片在线| 狠狠狠色丁香婷婷综合激情 | 久久久久久麻豆| 秋霞电影网一区二区| 欧美精品久久久久久久久老牛影院| 亚洲伦理在线免费看| 成人高清在线视频| 国产精品美女久久久久高潮| 黑人巨大精品欧美黑白配亚洲| 在线成人小视频| 亚洲国产美国国产综合一区二区 | 岛国av在线一区| 久久精品网站免费观看| 国精产品一区一区三区mba桃花| 久久久久久一级片| 美脚の诱脚舐め脚责91| 欧美一二三四区在线| 日本不卡的三区四区五区| 在线电影一区二区三区| 捆绑变态av一区二区三区| 精品福利一区二区三区免费视频| 麻豆精品一二三| 久久综合久久鬼色| 日本不卡免费在线视频| 久久综合色一综合色88| 国产一区二区三区在线观看免费 | 一区二区三区 在线观看视频| 色老头久久综合| 综合久久给合久久狠狠狠97色 | 亚洲精品视频观看| 色哟哟精品一区| 婷婷一区二区三区| 日韩一区二区免费视频| 91在线免费看| 日av在线不卡|