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

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

?? hpplatformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
FileHandle XMLPlatformUtils::openFile(const XMLCh* const fileName                                      , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> janText((char*)tmpFileName, manager);    return fopen(tmpFileName , "rb");}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" );}FileHandle XMLPlatformUtils::openStdInHandle(MemoryManager* const manager){    return (FileHandle) fdopen(dup(0), "rb");}unsigned intXMLPlatformUtils::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// ---------------------------------------------------------------------------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);    // Use a local buffer that is big enough for the largest legal path    char absPath[PATH_MAX + 1];    //get the absolute path    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){    // Check for pathological case of empty path    if (!toCheck[0])        return false;    //    //  If it starts with a slash, then it cannot be relative. This covers    //  both something like "\Test\File.xml" and an NT Lan type remote path    //  that starts with a node like "\\MyNode\Test\File.xml".    //    if (toCheck[0] == XMLCh('/'))        return false;    // Else assume its a relative path    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(){#if defined(XML_HPUX_KAICC)         // should be reimplemented by someone with                                    // HP/UX and KAI knowledge.    return (unsigned long) 0;#else    timeb aTime;    ftime(&aTime);    return (unsigned long)(aTime.time*1000 + aTime.millitm);#endif}// -----------------------------------------------------------------------//  Mutex methods// -----------------------------------------------------------------------#if !defined(APP_NO_THREADS)// ---------------------------------------------------------------------------//  XMLPlatformUtils: Platform init method// ---------------------------------------------------------------------------static XMLMutex *atomicOpsMutex = 0;void XMLPlatformUtils::platformInit(){    //    // The atomicOps mutex needs to be created early.    // Normally, mutexes are created on first use, but there is a    // circular dependency between compareAndExchange() and    // mutex creation that must be broken.    if(!atomicOpsMutex)    {        atomicOpsMutex = new (fgMemoryManager) XMLMutex();        if (atomicOpsMutex->fHandle == 0)            atomicOpsMutex->fHandle = XMLPlatformUtils::makeMutex();    }}void* XMLPlatformUtils::makeMutex(){    pthread_mutex_t* mutex = new pthread_mutex_t;    pthread_mutexattr_t*  attr = new pthread_mutexattr_t;#if defined(XML_USE_DCE)    pthread_mutexattr_create(attr);    pthread_mutexattr_setkind_np(attr, MUTEX_RECURSIVE_NP);    if (pthread_mutex_init(mutex, *attr))    {        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);    }    pthread_mutexattr_delete(attr);#else    pthread_mutexattr_init(attr);    pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);    if (pthread_mutex_init(mutex, attr))    {        ThrowXMLwithMemMgr(XMLPlatformUtilsException,                 XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);    }    pthread_mutexattr_destroy(attr);#endif    delete attr;    return (void*) mutex;}void XMLPlatformUtils::closeMutex(void* const mtxHandle){    pthread_mutex_t* mutex = (pthread_mutex_t *) mtxHandle;    if (mutex != NULL)    {        if (pthread_mutex_destroy(mutex))            ThrowXMLwithMemMgr(XMLPlatformUtilsException,                  XMLExcepts::Mutex_CouldNotDestroy, fgMemoryManager);        delete mutex;    }}void XMLPlatformUtils::lockMutex(void* const mtxHandle){    if (mtxHandle != NULL)    {        if (pthread_mutex_lock((pthread_mutex_t *) mtxHandle))        {            ThrowXMLwithMemMgr(XMLPlatformUtilsException,                     XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);        }    }}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){    if (mtxHandle != NULL)    {        if (pthread_mutex_unlock((pthread_mutex_t *) mtxHandle))        {            ThrowXMLwithMemMgr(XMLPlatformUtilsException,                     XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);        }    }}// -----------------------------------------------------------------------//  Miscellaneous synchronization methods// -----------------------------------------------------------------------void* XMLPlatformUtils::compareAndSwap ( void**      toFill,                                   const void* const newValue,                                   const void* const toCompare){    XMLMutexLock  localLock(atomicOpsMutex);    void *retVal = *toFill;    if (*toFill == toCompare)    {       *toFill = (void *)newValue;    }    return retVal;}int XMLPlatformUtils::atomicIncrement(int &location){    XMLMutexLock localLock(atomicOpsMutex);    return ++location;}int XMLPlatformUtils::atomicDecrement(int &location){    XMLMutexLock localLock(atomicOpsMutex);    return --location;}#else // #if !defined (APP_NO_THREADS)void XMLPlatformUtils::platformInit(){}void XMLPlatformUtils::closeMutex(void* const mtxHandle){}void XMLPlatformUtils::lockMutex(void* const mtxHandle){}void* XMLPlatformUtils::makeMutex(){    return 0;}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){}void* XMLPlatformUtils::compareAndSwap (void**             toFill,                                        const void* const  newValue,                                        const void* const  toCompare){    void *retVal = *toFill;    if (*toFill == toCompare)       *toFill = (void *)newValue;    return retVal;}int XMLPlatformUtils::atomicIncrement(int &location){    return ++location;}int XMLPlatformUtils::atomicDecrement(int &location){    return --location;}#endif // APP_NO_THREADSvoid XMLPlatformUtils::platformTerm(){#if !defined(APP_NO_THREADS)    // delete the mutex we created	closeMutex(atomicOpsMutex->fHandle);	atomicOpsMutex->fHandle = 0;    delete atomicOpsMutex;    atomicOpsMutex = 0;#endif}#include <xercesc/util/LogicalPath.c>XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品视频网| 亚洲国产精品精华液ab| 亚洲成人自拍偷拍| 欧美日韩一区精品| 麻豆成人91精品二区三区| 精品国产亚洲一区二区三区在线观看| 日本特黄久久久高潮| 欧美va亚洲va| 成人免费毛片a| 亚洲欧美一区二区三区久本道91| 欧美丝袜丝交足nylons图片| 日本一道高清亚洲日美韩| 欧美一级夜夜爽| 国产乱码精品一区二区三区av | 国产aⅴ精品一区二区三区色成熟| 日韩美女主播在线视频一区二区三区 | 国产精品538一区二区在线| 国产精品剧情在线亚洲| 欧美日韩视频在线一区二区| 老司机精品视频线观看86| 中文一区二区在线观看| 欧美午夜一区二区三区| 狠狠v欧美v日韩v亚洲ⅴ| 一区免费观看视频| 欧美电影在哪看比较好| 国产盗摄视频一区二区三区| 亚洲黄色免费网站| 2024国产精品| 欧美午夜电影一区| 国产精品一卡二卡在线观看| 亚洲亚洲人成综合网络| 国产婷婷色一区二区三区| 欧美午夜精品一区| 国产精品99久| 日本特黄久久久高潮| 中文字幕一区二区三区视频 | 国产精品88av| 日韩在线一区二区三区| 亚洲国产成人自拍| 欧美一二三四在线| 色8久久人人97超碰香蕉987| 国产东北露脸精品视频| 午夜视频一区二区三区| 国产精品第13页| 精品sm捆绑视频| 欧美色综合影院| av电影天堂一区二区在线| 蜜臀精品一区二区三区在线观看 | 国产精品一二一区| 亚洲chinese男男1069| 国产精品热久久久久夜色精品三区| 欧美日本高清视频在线观看| 99国产精品久久久| 国产成人精品免费在线| 美日韩一级片在线观看| 五月天亚洲婷婷| 亚洲激情在线激情| 国产精品少妇自拍| 久久久久久久久99精品| 日韩视频国产视频| 欧美理论电影在线| 色欲综合视频天天天| 成人免费观看视频| 国产麻豆精品久久一二三| 免费在线观看日韩欧美| 亚洲成a人片综合在线| 亚洲综合在线免费观看| 亚洲欧洲日韩av| 国产精品午夜电影| 国产欧美一区二区三区在线看蜜臀 | 亚洲视频一区二区免费在线观看| 久久久久国产精品麻豆ai换脸| 欧美一区永久视频免费观看| 欧美日韩视频在线一区二区| 欧美日韩一区二区欧美激情| 色94色欧美sute亚洲线路一ni | 精品国产乱码久久久久久老虎 | 午夜精品在线看| 亚洲一区二区免费视频| 亚洲综合视频在线观看| 一区二区三区在线播| 亚洲一区二区五区| 亚洲一区二区欧美激情| 午夜影院久久久| 天堂va蜜桃一区二区三区漫画版| 性感美女久久精品| 日本午夜精品视频在线观看| 精品在线播放午夜| 国产sm精品调教视频网站| av中文字幕一区| 一本大道久久a久久综合| 欧美日韩一区二区不卡| 538prom精品视频线放| 日韩色视频在线观看| 精品成人一区二区| 欧美经典一区二区| 亚洲欧美另类图片小说| 亚洲二区视频在线| 精品亚洲aⅴ乱码一区二区三区| 韩国欧美国产1区| av一区二区三区四区| 91福利社在线观看| 欧美一区二区三区婷婷月色| 精品国产1区二区| 国产精品女人毛片| 亚洲午夜在线电影| 麻豆精品在线视频| 粉嫩蜜臀av国产精品网站| 色av一区二区| 久久综合99re88久久爱| 国产精品国产三级国产专播品爱网| 一区二区三区日本| 久久国产三级精品| www.亚洲色图.com| 欧美福利电影网| 中文字幕中文字幕在线一区 | 亚洲欧美在线观看| 亚洲图片一区二区| 九九热在线视频观看这里只有精品| 成人a级免费电影| 欧美色图一区二区三区| 精品成人私密视频| 亚洲一区二区三区视频在线| 国产激情视频一区二区三区欧美| 在线视频你懂得一区| 国产亚洲婷婷免费| 午夜精品久久久| eeuss影院一区二区三区| 日韩女优毛片在线| 亚洲综合清纯丝袜自拍| 国产成人综合在线| 欧美一区二区三区视频在线| 自拍偷拍欧美激情| 另类小说图片综合网| 91国偷自产一区二区三区成为亚洲经典 | 日韩一区二区在线免费观看| 成人欧美一区二区三区小说| 国内久久精品视频| 4438x亚洲最大成人网| 亚洲人成在线播放网站岛国| 精品亚洲国产成人av制服丝袜| 欧美午夜免费电影| 亚洲色图20p| 成人一区二区三区视频在线观看| 日韩欧美一二三区| 五月天激情综合网| 欧美在线不卡视频| 日韩一区欧美一区| 国产aⅴ精品一区二区三区色成熟| 日韩午夜在线播放| 舔着乳尖日韩一区| 欧洲亚洲国产日韩| 亚洲啪啪综合av一区二区三区| 国产成人在线免费观看| 欧美大片一区二区| 日本成人中文字幕在线视频 | www.色精品| 国产午夜精品久久| 国产剧情一区在线| 精品少妇一区二区三区在线视频| 水蜜桃久久夜色精品一区的特点| 色哟哟国产精品| 亚洲人妖av一区二区| 不卡的电影网站| 国产精品久久久爽爽爽麻豆色哟哟| 国产一区二三区| 久久综合九色综合97婷婷 | 成人国产精品免费观看动漫| 久久婷婷国产综合国色天香 | 日本午夜一区二区| 日韩欧美中文一区二区| 日韩国产精品大片| 91麻豆精品久久久久蜜臀| 亚洲成a人片在线不卡一二三区| 欧美性三三影院| 天天做天天摸天天爽国产一区| 欧美日韩亚洲综合一区二区三区| 亚洲五码中文字幕| 欧美自拍偷拍午夜视频| 天天综合网天天综合色| 日韩三级中文字幕| 国内精品国产成人国产三级粉色 | 亚洲激情自拍视频| 欧美日韩综合在线免费观看| 天堂成人国产精品一区| 欧美成人一区二区三区在线观看| 国产一区二区在线视频| 国产精品欧美久久久久无广告 | 91免费国产在线| 亚洲最大成人综合| 91精品国产一区二区| 国产麻豆午夜三级精品| 国产精品久久久久久久久图文区 | 懂色一区二区三区免费观看| 中文字幕第一区二区| 91久久一区二区| 免费人成在线不卡| 国产精品青草久久| 制服丝袜亚洲色图| 国产99精品国产|