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

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

?? tru64platformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright 1999-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. *//* * $Id: Tru64PlatformUtils.cpp,v 1.18 2004/09/08 13:56:43 peiyongz Exp $ */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#if !defined (APP_NO_THREADS)#include    <pthread.h>#endif // APP_NO_THREADS#include <stdio.h>#include <stdlib.h>#include <time.h>#include <unistd.h>#include    <xercesc/util/Janitor.hpp>#include    <xercesc/util/PlatformUtils.hpp>#include    <xercesc/util/RuntimeException.hpp>#include    <xercesc/util/Mutexes.hpp>#include    <xercesc/util/XMLString.hpp>#include    <xercesc/util/XMLUni.hpp>#include    <xercesc/util/XMLUniDefs.hpp>#include    <xercesc/util/PanicHandler.hpp>#include    <xercesc/util/OutOfMemoryException.hpp>////  These control which transcoding service is used by the Tru64 version.//  They allow this to be controlled from the build process by just defining//  one of these values.//#if defined (XML_USE_ICU_TRANSCODER)#include <xercesc/util/Transcoders/ICU/ICUTransService.hpp>#else   // use native transcoder#include <xercesc/util/Transcoders/Iconv/IconvTransService.hpp>#endif////  These control which message loading service is used by the Tru64 version.//  They allow this to be controlled from the build process by just defining//  one of these values.//#if defined (XML_USE_ICU_MESSAGELOADER)#include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp>#elif defined (XML_USE_ICONV_MESSAGELOADER)#include <xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp>#else   // use In-memory message loader#include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>#endif#if defined (XML_USE_NETACCESSOR_LIBWWW)#include <xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp>#elif defined (XML_USE_NETACCESSOR_SOCKET)#include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp>#endifXERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  XMLPlatformUtils: Private Static Methods// ---------------------------------------------------------------------------XMLNetAccessor* XMLPlatformUtils::makeNetAccessor()#if defined (XML_USE_NETACCESSOR_LIBWWW){    return new LibWWWNetAccessor();}#elif defined (XML_USE_NETACCESSOR_SOCKET){    return new SocketNetAccessor();}#else{    return 0;}#endif////  This method is called by the platform independent part of this class//  when client code asks to have one of the supported message sets loaded.//  In our case, we use the ICU based message loader mechanism.//XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain){  XMLMsgLoader* retVal;  try  {#if defined (XML_USE_ICU_MESSAGELOADER)    retVal = new ICUMsgLoader(msgDomain);#elif defined (XML_USE_ICONV_MESSAGELOADER)    retVal = new MsgCatalogLoader(msgDomain);#else    retVal = new InMemMsgLoader(msgDomain);#endif  }  catch(const OutOfMemoryException&)  {    throw;  }  catch(...)  {    panic(PanicHandler::Panic_CantLoadMsgDomain);  }  return retVal;}////  This method is called very early in the bootstrapping process. This guy//  must create a transcoding service and return it. It cannot use any string//  methods, any transcoding services, throw any exceptions, etc... It just//  makes a transcoding service and returns it, or returns zero on failure.//XMLTransService* XMLPlatformUtils::makeTransService()#if defined (XML_USE_ICU_TRANSCODER){  return new ICUTransService;}#elif defined (XML_USE_ICONV_TRANSCODER){  return new IconvTransService;}#else // Use Native transcoding service{  return new IconvTransService;}#endif// ---------------------------------------------------------------------------//  XMLPlatformUtils: The panic method// ---------------------------------------------------------------------------void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason){    fgUserPanicHandler? fgUserPanicHandler->panic(reason) : fgDefaultPanicHandler->panic(reason);	}// ---------------------------------------------------------------------------//  XMLPlatformUtils: File Methods// ---------------------------------------------------------------------------unsigned int XMLPlatformUtils::curFilePos(FileHandle theFile                                          , MemoryManager* const manager){  // Get the current position  int curPos = ftell( (FILE*)theFile);  if (curPos == -1)    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotGetSize, manager);  return (unsigned int)curPos;}void XMLPlatformUtils::closeFile(FileHandle theFile                                 , MemoryManager* const manager){  if (fclose((FILE*) theFile))    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotCloseFile, manager);}unsigned int XMLPlatformUtils::fileSize(FileHandle theFile                                        , MemoryManager* const manager){  // Get the current position  long  int curPos = ftell((FILE*) theFile);  if (curPos == -1)    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotGetCurPos, manager);  // Seek to the end and save that value for return  if (fseek( (FILE*) theFile, 0, SEEK_END) )    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotSeekToEnd, manager);  long int retVal = ftell((FILE*) theFile);  if (retVal == -1)    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotSeekToEnd, manager);  // And put the pointer back  if (fseek((FILE*) theFile, curPos, SEEK_SET))    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotSeekToPos, manager);  return (unsigned int)retVal;}FileHandle XMLPlatformUtils::openFile(const char* const fileName                                      , MemoryManager* const manager){  FileHandle retVal = (FILE*)fopen( fileName , "rb" );  if (retVal == NULL)    return 0;  return retVal;}FileHandle XMLPlatformUtils::openFile(const XMLCh* const fileName                                      , MemoryManager* const manager){  const char* tmpFileName = XMLString::transcode(fileName, manager);  ArrayJanitor<char> janText((char*)tmpFileName, manager);  FileHandle retVal = (FILE*)fopen( tmpFileName , "rb" );  if (retVal == NULL)    return 0;  return retVal;}FileHandle XMLPlatformUtils::openFileToWrite(const XMLCh* const fileName                                             , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    return fopen( tmpFileName , "wb" );}FileHandle XMLPlatformUtils::openFileToWrite(const char* const fileName                                             , MemoryManager* const manager){    return fopen( fileName , "wb" );}unsigned int XMLPlatformUtils::readFileBuffer(FileHandle theFile,					      const unsigned int toRead,					      XMLByte* const toFill                          , MemoryManager* const manager){  size_t noOfItemsRead =    fread((void*) toFill, 1, toRead, (FILE*) theFile);  if(ferror((FILE*) theFile))  {    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotReadFromFile, manager);  }  return (unsigned int) noOfItemsRead;}voidXMLPlatformUtils::writeBufferToFile( FileHandle     const  theFile                                   , long                  toWrite                                   , const XMLByte* const  toFlush                                   , MemoryManager* const  manager){    if (!theFile        ||        (toWrite <= 0 ) ||        !toFlush         )        return;    const XMLByte* tmpFlush = (const XMLByte*) toFlush;    size_t bytesWritten = 0;    while (true)    {        bytesWritten=fwrite(tmpFlush, sizeof(XMLByte), toWrite, (FILE*)theFile);        if(ferror((FILE*)theFile))        {            ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile, manager);        }        if (bytesWritten < toWrite) //incomplete write        {            tmpFlush+=bytesWritten;            toWrite-=bytesWritten;            bytesWritten=0;        }        else            return;    }    return;}void XMLPlatformUtils::resetFile(FileHandle theFile                                 , MemoryManager* const manager){  // Seek to the start of the file  if (fseek((FILE*) theFile, 0, SEEK_SET))    ThrowXMLwithMemMgr(XMLPlatformUtilsException,	     XMLExcepts::File_CouldNotResetFile, manager);}// ---------------------------------------------------------------------------//  XMLPlatformUtils: File system methods

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人av免费| 久久精品夜色噜噜亚洲aⅴ| 亚洲欧美一区二区久久| 成人网在线免费视频| 中文字幕在线一区| 91麻豆国产香蕉久久精品| 夜夜操天天操亚洲| 欧美久久久久久蜜桃| 美女久久久精品| 久久久精品综合| 99精品欧美一区二区蜜桃免费| 亚洲人一二三区| 欧美高清性hdvideosex| 久久成人久久鬼色| 国产精品久久看| 欧美视频在线观看一区二区| 免费成人你懂的| 国产精品免费av| 欧美日韩久久一区二区| 麻豆精品在线观看| 亚洲欧洲日产国产综合网| 欧美视频精品在线观看| 精品一区二区三区视频在线观看| 亚洲国产精品激情在线观看| 欧美主播一区二区三区美女| 日本不卡不码高清免费观看| 久久久不卡网国产精品一区| 色88888久久久久久影院按摩 | 欧美影视一区在线| 久久国产综合精品| 亚洲男人电影天堂| www国产成人免费观看视频 深夜成人网 | 69堂精品视频| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美三级资源在线| 粉嫩绯色av一区二区在线观看| 亚洲综合男人的天堂| 精品国产一区二区精华| 色婷婷久久久综合中文字幕| 精品一区二区三区香蕉蜜桃| 亚洲精品免费一二三区| 久久综合色8888| 欧美日韩亚州综合| 99久久精品情趣| 国产在线播放一区| 日本欧美加勒比视频| 中文字幕一区二区5566日韩| 精品久久人人做人人爰| 91官网在线免费观看| 不卡的av在线播放| 国产在线播精品第三| 青青草视频一区| 一区二区三区视频在线观看| 国产欧美日韩在线视频| 日韩精品中文字幕在线不卡尤物| 欧美在线一二三四区| 91免费看视频| 成人国产精品免费观看| 国内久久婷婷综合| 裸体健美xxxx欧美裸体表演| 亚洲图片一区二区| 一区二区欧美视频| 日韩伦理电影网| 国产精品免费视频一区| 久久精品无码一区二区三区| 欧美成人激情免费网| 欧美高清性hdvideosex| 欧美日韩1234| 91麻豆精品国产综合久久久久久| 欧美亚洲高清一区| 欧美午夜精品久久久久久孕妇| 一本色道久久综合亚洲aⅴ蜜桃| 成人精品国产免费网站| 成人自拍视频在线观看| 国产suv精品一区二区6| 国产99一区视频免费| 国产精品18久久久久久vr| 精品亚洲porn| 国产suv精品一区二区三区| 国产福利一区二区| 国产99久久久国产精品潘金网站| 国产激情偷乱视频一区二区三区| 黑人精品欧美一区二区蜜桃| 久久精品国产精品青草| 国产另类ts人妖一区二区| 国产一区二区免费在线| 夫妻av一区二区| gogogo免费视频观看亚洲一| 91在线你懂得| 欧美撒尿777hd撒尿| 欧美精品视频www在线观看| 欧美一区二区黄| 国产午夜精品一区二区 | 色婷婷综合久久久中文字幕| 日本精品免费观看高清观看| 欧美写真视频网站| 欧美一区二区三区精品| 久久综合999| 亚洲天堂网中文字| 日日摸夜夜添夜夜添国产精品| 美女精品一区二区| 国产精品亚洲第一区在线暖暖韩国| 成人免费视频网站在线观看| 日本国产一区二区| 日韩一级完整毛片| 国产精品视频在线看| 亚洲激情男女视频| 免费在线欧美视频| 成人一道本在线| 欧美日韩免费电影| 久久久久久亚洲综合影院红桃| 亚洲欧美激情一区二区| 日韩av在线发布| 成人黄色在线网站| 91精品国产色综合久久| 欧美国产成人精品| 日韩高清中文字幕一区| 成人av电影免费在线播放| 8x8x8国产精品| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲午夜精品网| 国产一区二区久久| 精品1区2区3区| 国产亚洲欧美日韩在线一区| 亚洲国产精品久久久久秋霞影院 | 国产精品亚洲一区二区三区在线| 一本到不卡精品视频在线观看| 日韩午夜在线观看视频| 自拍视频在线观看一区二区| 开心九九激情九九欧美日韩精美视频电影 | 欧美国产日本韩| 视频在线观看国产精品| 99热在这里有精品免费| 欧美精品一区二区高清在线观看| 亚洲国产日日夜夜| 99久久精品免费看| wwwwww.欧美系列| 亚洲成av人片在线观看无码| 成人黄色电影在线| 欧美videofree性高清杂交| 亚洲日本va在线观看| 国产成人一级电影| 日韩欧美在线1卡| 亚洲成人精品一区| 在线视频一区二区三区| 国产精品国产三级国产| 国模套图日韩精品一区二区 | 一区二区三区四区蜜桃| 国产一区二区毛片| 欧美精品一区二区三| 美女高潮久久久| 在线成人午夜影院| 亚洲另类一区二区| 成人综合在线观看| 国产欧美日韩在线观看| 国产精品羞羞答答xxdd| 久久夜色精品国产噜噜av| 久久精工是国产品牌吗| 欧美精品久久久久久久多人混战 | 国产欧美在线观看一区| 韩国精品主播一区二区在线观看| 制服丝袜国产精品| 亚洲成在线观看| 欧美日韩你懂的| 日韩精品欧美成人高清一区二区| 欧美日韩一区二区三区高清| 亚洲最新在线观看| 欧美日韩国产区一| 日韩制服丝袜av| 精品噜噜噜噜久久久久久久久试看| 久久精品国产亚洲高清剧情介绍 | 亚洲精选一二三| 99国产欧美久久久精品| 亚洲欧美二区三区| 色婷婷综合五月| 亚洲高清中文字幕| 日韩欧美一级在线播放| 国产综合久久久久久久久久久久| 久久久99精品久久| 成人精品视频一区二区三区| 国产精品白丝在线| 欧美在线free| 人人精品人人爱| 国产婷婷一区二区| 99久久久无码国产精品| 亚洲一区在线观看免费| 777xxx欧美| 国产成人亚洲精品青草天美 | 久久久久久久综合日本| 成人av网址在线| 亚洲国产综合91精品麻豆| 欧美一级二级三级蜜桃| 国产91清纯白嫩初高中在线观看| 中文字幕一区二区三区不卡在线 | 久久婷婷色综合| 成人黄色在线网站| 亚洲国产欧美在线| 国产午夜久久久久| 在线观看成人免费视频| 蜜桃在线一区二区三区|