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

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

?? qnxplatformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
字號:
/* * Copyright 2003-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: QNXPlatformUtils.cpp,v 1.10 2004/09/08 13:56:42 peiyongz Exp $ */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/timeb.h>#include <atomic.h>#include <pthread.h>#include <errno.h>#include <sys/neutrino.h>#include <xercesc/util/Janitor.hpp>#include <xercesc/util/PlatformUtils.hpp>#include <xercesc/util/RuntimeException.hpp>#include <xercesc/util/XMLExceptMsgs.hpp>#include <xercesc/util/XMLString.hpp>#include <xercesc/util/XMLUniDefs.hpp>#include <xercesc/util/XMLUni.hpp>////  These control which transcoding service is used by the QNX version.//#if defined (XML_USE_ICU_TRANSCODER)    #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp>#elif defined (XML_USE_GNU_TRANSCODER)    #include <xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp>#else    #error A transcoding service must be chosen#endif////  These control which message loading service is used by the QNX version.//#if defined(XML_USE_ICU_MESSAGELOADER)    #include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp>#else    #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>#endif////  These control which network access service is used by the QNX version.//#if defined (XML_USE_NETACCESSOR_LIBWWW)    #include <xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp>#else    #include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp>#endifXERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  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){    int curPos = ftell(theFile);    if (curPos == -1) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotGetSize, manager);    }    return (unsigned int)curPos;}void XMLPlatformUtils::closeFile(FileHandle theFile                                 , MemoryManager* const manager){    if (fclose(theFile)) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotCloseFile, manager);    }}unsigned int XMLPlatformUtils::fileSize(FileHandle theFile                                        , MemoryManager* const manager){    struct stat sbuf;    if( fstat( fileno(theFile), &sbuf ) ) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotGetSize, manager);    }    return sbuf.st_size;}FileHandle XMLPlatformUtils::openFile(const char* const fileName                                      , MemoryManager* const manager){    return fopen( fileName, "rb" );}FileHandle XMLPlatformUtils::openFile(const XMLCh* const fileName                                      , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    return openFile( tmpFileName );}FileHandle XMLPlatformUtils::openFileToWrite(const char* const fileName                                             , MemoryManager* const manager){    return fopen( fileName, "wb" );}FileHandle XMLPlatformUtils::openFileToWrite(const XMLCh* const fileName                                             , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    return openFileToWrite(tmpFileName);}FileHandle XMLPlatformUtils::openStdInHandle(MemoryManager* const manager){    return fdopen( dup(STDIN_FILENO), "rb" );}unsigned intXMLPlatformUtils::readFileBuffer(       FileHandle      theFile                                , const unsigned int    toRead                                ,       XMLByte* const  toFill                                , MemoryManager* const  manager){    unsigned long bytesRead = 0;    bytesRead = fread( toFill, 1, toRead, theFile );    if (ferror(theFile)) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile, manager);    }    return (unsigned int)bytesRead;}voidXMLPlatformUtils::writeBufferToFile( FileHandle     const  theFile                                   , long                  toWrite                                   , const XMLByte* const  toFlush                                   , MemoryManager* const  manager){    unsigned long bytesWritten = 0;    bytesWritten = fwrite( toFlush, 1, toWrite, theFile );    if( bytesWritten != toWrite ) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile, manager);    }    return;}void XMLPlatformUtils::resetFile(FileHandle theFile                                 , MemoryManager* const manager){    if (fseek(theFile, 0, SEEK_SET)) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotResetFile, manager);    }}// ---------------------------------------------------------------------------//  XMLPlatformUtils: File system methods// ---------------------------------------------------------------------------XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath,                                     MemoryManager* const manager){    //    //  NOTE: THe path provided has always already been opened successfully,    //  so we know that its not some pathological freaky path. It comes in    //  in native format, and goes out as Unicode always    //    char* newSrc = XMLString::transcode(srcPath, manager);    ArrayJanitor<char> janText(newSrc, manager);    char absPath[PATH_MAX + 1];    char* retPath = realpath(newSrc, &absPath[0]);    if (!retPath) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotGetBasePathName, manager);    }    return XMLString::transcode(absPath, manager);}bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck                                  , MemoryManager* const manager){    if (!toCheck[0] || toCheck[0] == XMLCh('/'))        return false;    return true;}XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const manager){    char  dirBuf[PATH_MAX + 2];    char  *curDir = getcwd(&dirBuf[0], PATH_MAX + 1);    if (!curDir)    {        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::File_CouldNotGetBasePathName, manager);    }    return XMLString::transcode(curDir, manager);}inline bool XMLPlatformUtils::isAnySlash(XMLCh c) {    return ( chBackSlash == c || chForwardSlash == c);}// ---------------------------------------------------------------------------//  XMLPlatformUtils: Timing Methods// ---------------------------------------------------------------------------unsigned long XMLPlatformUtils::getCurrentMillis(){    timeb aTime;    ftime(&aTime);    return (unsigned long)(aTime.time*1000 + aTime.millitm);}// ---------------------------------------------------------------------------//  Mutex methods// ---------------------------------------------------------------------------void* XMLPlatformUtils::makeMutex(){    pthread_mutexattr_t attr;    pthread_mutexattr_init( &attr );    pthread_mutexattr_setrecursive( &attr, PTHREAD_RECURSIVE_ENABLE );    pthread_mutex_t *mutex = new pthread_mutex_t;    if( pthread_mutex_init( mutex, &attr ) != EOK ) {        delete mutex;        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);    }    pthread_mutexattr_destroy( &attr );    return mutex;}void XMLPlatformUtils::closeMutex(void* const mtxHandle){    if( mtxHandle == NULL || pthread_mutex_destroy( (pthread_mutex_t *)mtxHandle ) != EOK ) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotClose, fgMemoryManager);    }    delete mtxHandle;}void XMLPlatformUtils::lockMutex(void* const mtxHandle){    if( mtxHandle == NULL || pthread_mutex_lock( (pthread_mutex_t *)mtxHandle ) != EOK ) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);    }}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){    if( mtxHandle == NULL || pthread_mutex_unlock( (pthread_mutex_t *)mtxHandle ) != EOK ) {        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);    }}// ---------------------------------------------------------------------------//  Miscellaneous synchronization methods// ---------------------------------------------------------------------------void*XMLPlatformUtils::compareAndSwap(       void**      toFill                                , const void* const newValue                                , const void* const toCompare){    //    // Undocumented function pulled in by pthread.h.  Uses CPU specific    // inline assembly routines for doing an atomic compare and exchange    // operation.    //    return (void *)_smp_cmpxchg( (volatile unsigned *)toFill, (unsigned)toCompare, (unsigned)newValue );}// ---------------------------------------------------------------------------//  Atomic increment and decrement methods// ---------------------------------------------------------------------------int XMLPlatformUtils::atomicIncrement(int &location){    atomic_add( &(volatile unsigned &)location, 1 );    return location;}int XMLPlatformUtils::atomicDecrement(int &location){    atomic_sub( &(volatile unsigned &)location, 1 );    return location;}// ---------------------------------------------------------------------------//  XMLPlatformUtils: Private Static Methods// ---------------------------------------------------------------------------////  This method is called by the platform independent part of this class//  during initialization. We have to create the type of net accessor that//  we want to use. If none, then just return zero.//XMLNetAccessor* XMLPlatformUtils::makeNetAccessor(){#if defined (XML_USE_NETACCESSOR_LIBWWW)    return new LibWWWNetAccessor();#else     return new SocketNetAccessor();#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){#if defined (XML_USE_ICU_MESSAGELOADER)    return new ICUMsgLoader(msgDomain);#else    return new InMemMsgLoader(msgDomain);#endif}////  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_GNU_TRANSCODER)    return new IconvGNUTransService;#else    #error You must provide a transcoding service implementation#endif}void XMLPlatformUtils::platformInit(){}void XMLPlatformUtils::platformTerm(){}#include <xercesc/util/LogicalPath.c>XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品99久久久久| 久久精品亚洲麻豆av一区二区| 日本三级亚洲精品| 亚洲一区欧美一区| 中文字幕一区二区三区av | 亚洲欧洲在线观看av| 欧美成人性战久久| 337p日本欧洲亚洲大胆色噜噜| 欧美日本一道本| 国产成人精品免费网站| 成人性视频免费网站| 麻豆91精品91久久久的内涵| 麻豆国产精品一区二区三区| 国产视频不卡一区| 亚洲一区二区三区爽爽爽爽爽| wwwwww.欧美系列| 欧美精品一区二区久久久| 欧美电影免费观看高清完整版在线 | 欧美大肚乱孕交hd孕妇| 欧美久久久久中文字幕| 7777精品伊人久久久大香线蕉超级流畅| 91视频国产资源| 日本视频一区二区三区| 一本色道亚洲精品aⅴ| 精品国产成人在线影院| 日韩不卡手机在线v区| 一区二区三区中文免费| 一区二区三区在线不卡| 精品卡一卡二卡三卡四在线| 日韩精品自拍偷拍| 日本乱人伦一区| 欧美性受xxxx黑人xyx性爽| 国产一区二区三区最好精华液| 久久国产夜色精品鲁鲁99| 久久97超碰国产精品超碰| 免费人成在线不卡| 一区二区三区四区在线| 亚洲午夜电影网| 免费人成黄页网站在线一区二区| 精久久久久久久久久久| 成人av在线电影| 欧美午夜电影在线播放| 91精品国产入口| 国产午夜精品福利| 亚洲最新在线观看| 免费人成网站在线观看欧美高清| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美日韩一区二区在线观看视频| 欧美色图12p| 精品动漫一区二区三区在线观看| 国产拍揄自揄精品视频麻豆| 亚洲精品中文字幕在线观看| 日韩激情视频网站| 国产99久久久精品| 欧美日韩极品在线观看一区| 精品免费国产二区三区| 亚洲女厕所小便bbb| 日本系列欧美系列| 成人小视频在线| 欧美精品自拍偷拍| 国产视频一区二区在线观看| 亚洲风情在线资源站| 久久99精品久久久| 欧美性大战久久| 国产亚洲精品精华液| 午夜影视日本亚洲欧洲精品| 国产一区二区三区在线看麻豆| 岛国精品在线观看| 欧美视频一区二区| 国产精品日韩成人| 亚洲国产精品综合小说图片区| 韩国毛片一区二区三区| 欧美精品v国产精品v日韩精品| 中文字幕va一区二区三区| 人妖欧美一区二区| 精品婷婷伊人一区三区三| 国产精品伦理一区二区| 蜜桃一区二区三区在线观看| 欧美专区日韩专区| 亚洲欧美在线高清| 国产高清精品久久久久| 日韩久久精品一区| 亚洲在线成人精品| 色综合久久九月婷婷色综合| 国产女主播一区| 国产精品一区二区三区四区| 欧美成人欧美edvon| 亚洲午夜久久久久久久久电影网| 国产999精品久久久久久绿帽| 日韩一区二区在线看| 亚洲电影视频在线| 在线一区二区三区| 一区二区三区四区激情| 日本韩国欧美一区| 亚洲综合网站在线观看| 色8久久人人97超碰香蕉987| 亚洲欧美成人一区二区三区| 麻豆精品一区二区av白丝在线| 欧美精品乱码久久久久久| 亚洲成人av电影在线| 欧美日韩综合在线免费观看| 亚洲www啪成人一区二区麻豆| 在线看国产一区| 午夜av一区二区| 欧美一级免费观看| 狂野欧美性猛交blacked| 欧美精品日韩一本| 亚洲激情中文1区| 成人免费毛片嘿嘿连载视频| 色综合久久99| 欧美a一区二区| 欧美日本韩国一区二区三区视频| 日本中文字幕不卡| 在线电影院国产精品| 麻豆成人久久精品二区三区红| 久久久精品免费观看| 91在线你懂得| 男女性色大片免费观看一区二区 | 日韩不卡一二三区| 久久影院电视剧免费观看| 99综合电影在线视频| 亚洲综合精品久久| 2022国产精品视频| jlzzjlzz国产精品久久| 亚洲另类色综合网站| 欧美一区二区三区四区在线观看| 韩国av一区二区三区| 亚洲柠檬福利资源导航| 日韩欧美的一区二区| eeuss鲁片一区二区三区在线看| 中文字幕一区二区5566日韩| 欧美无乱码久久久免费午夜一区| 亚洲综合激情网| 777a∨成人精品桃花网| 天天综合网 天天综合色| 色天天综合久久久久综合片| 日日夜夜精品视频天天综合网| 91蜜桃视频在线| 精品一区二区三区不卡 | 亚洲精品视频在线观看免费| 欧美日韩精品三区| 91麻豆国产精品久久| 麻豆精品视频在线| 一区二区三区不卡视频| 日韩一区二区免费电影| 蜜臀久久久久久久| 亚洲欧美偷拍卡通变态| 欧美色涩在线第一页| 成人国产精品免费观看动漫| 精品一区二区免费视频| 日韩高清不卡一区| 一区二区三区四区不卡视频| 国产欧美日韩精品一区| 欧美一区二区三区四区视频| 一本久久精品一区二区| 懂色一区二区三区免费观看| 蜜桃视频一区二区三区在线观看| 亚洲激情男女视频| 久久综合狠狠综合久久激情| 99久久久无码国产精品| 国产一区二区导航在线播放| 国产精品久久久久久福利一牛影视| 日韩美一区二区三区| 欧美日韩免费一区二区三区| 一本大道久久a久久综合婷婷| 麻豆精品视频在线观看免费| ...xxx性欧美| 久久亚洲精品国产精品紫薇| 欧美三级日韩三级国产三级| 成人中文字幕合集| 久久精品久久久精品美女| 一区二区三区成人| 亚洲在线视频网站| 亚洲视频一二三| 国产精品国产三级国产有无不卡| 日韩精品一区二区三区在线播放| 国产成人在线网站| 久久国产精品无码网站| 亚洲欧美成aⅴ人在线观看| 国产欧美日韩精品在线| 一本一本大道香蕉久在线精品 | 色综合婷婷久久| 99精品黄色片免费大全| 成人免费视频播放| 色欧美日韩亚洲| 99久久婷婷国产| 欧美图片一区二区三区| 岛国精品在线观看| 国产老女人精品毛片久久| 国产成人免费在线观看| 91女厕偷拍女厕偷拍高清| 欧美怡红院视频| 日韩欧美卡一卡二| 亚洲国产精品成人久久综合一区| 中文字幕一区二区三区精华液| 亚洲福利国产精品| 日韩国产一二三区| 国产乱码精品1区2区3区| 色爱区综合激月婷婷| 精品免费国产二区三区|