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

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

?? tandemplatformutils.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
字號:
/* * Copyright 1999-2000,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. *//* * $Log: TandemPlatformUtils.cpp,v $ * Revision 1.13  2004/09/08 13:56:43  peiyongz * Apache License Version 2.0 * * Revision 1.12  2003/12/17 15:16:10  cargilld * Platform update for memory management so that the static memory manager (one * used to call Initialize) is only for static data. * * Revision 1.11  2003/12/17 13:58:03  cargilld * Platform update for memory management so that the static memory manager (one * used to call Initialize) is only for static data. * * Revision 1.10  2003/10/01 16:32:40  neilg * improve handling of out of memory conditions, bug #23415.  Thanks to David Cargill. * * Revision 1.9  2003/05/15 18:37:49  knoaman * Partial implementation of the configurable memory manager. * * Revision 1.8  2003/04/24 02:58:31  peiyongz * Logical Path Resolution * * Revision 1.7  2003/03/09 17:00:11  peiyongz * PanicHandler * * Revision 1.6  2003/02/05 18:29:27  tng * [Bug 13437] Incorrect memory management in XXXPlatformUtils.cpp. * * Revision 1.5  2003/01/09 15:30:39  tng * Missing panic function in Tandem * * Revision 1.4  2002/12/12 16:29:30  peiyongz * loadAMsgSet() added * * Revision 1.3  2002/11/04 15:13:01  tng * C++ Namespace Support. * * Revision 1.2  2002/05/21 20:31:48  tng * Minor update: Remove obsolete code * * Revision 1.1.1.1  2002/02/01 22:22:26  peiyongz * sane_include * * Revision 1.4  2000/03/02 21:10:38  abagchi * Added empty function platformTerm() * * Revision 1.3  2000/03/02 19:55:32  roddey * This checkin includes many changes done while waiting for the * 1.1.0 code to be finished. I can't list them all here, but a list is * available elsewhere. * * Revision 1.2  2000/02/06 07:48:30  rahulj * Year 2K copyright swat. * * Revision 1.1.1.1  1999/11/09 01:06:24  twl * Initial checkin * * Revision 1.2  1999/11/08 20:45:32  rahul * Swat for adding in Product name and CVS comment log variable. * */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------// XXX #include    <pthread.h>// XXX #include    <sys/atomic_op.h>#include    <xercesc/util/PlatformUtils.hpp>#include    <xercesc/util/RuntimeException.hpp>#include    <xercesc/util/Janitor.hpp>#include    <xercesc/util/PanicHandler.hpp>#include    <stdio.h>#include    <stdlib.h>#include    <errno.h>#include    <libgen.h>#include    <sys/timeb.h>#include    <string.h>#include    <xercesc/util/OutOfMemoryException.hpp>#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>#endifXERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  XMLPlatformUtils: Platform init method// ---------------------------------------------------------------------------void XMLPlatformUtils::platformInit(){}////  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;}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)        throw XMLPlatformUtilsException("XMLPlatformUtils::curFilePos - Could not get current pos");    return (unsigned int)curPos;}void XMLPlatformUtils::closeFile(FileHandle theFile                                 , MemoryManager* const manager){    if (fclose((FILE*)theFile))        throw XMLPlatformUtilsException("XMLPlatformUtils::closeFile - Could not close the file handle");}unsigned int XMLPlatformUtils::fileSize(FileHandle theFile                                        , MemoryManager* const manager){    // Get the current position    long  int curPos = ftell((FILE*)theFile);    if (curPos == -1)        throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not get current pos");    // Seek to the end and save that value for return     if (fseek( (FILE*)theFile, 0, SEEK_END) )        throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not seek to end");    long int retVal = ftell( (FILE*)theFile);    if (retVal == -1)        throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not get the file size");    // And put the pointer back    if (fseek( (FILE*)theFile, curPos, SEEK_SET) )        throw XMLPlatformUtilsException("XMLPlatformUtils::fileSize - Could not seek back to original pos");    return (unsigned int)retVal;}FileHandle XMLPlatformUtils::openFile(const unsigned short* const fileName                                      , MemoryManager* const manager){    const char* tmpFileName = XMLString::transcode(fileName, manager);    ArrayJanitor<char> tmpFileNameJan((char*)tmpFileName , manager);    FileHandle retVal = (FILE*)fopen( tmpFileName , "rb" );    if (retVal == NULL)        return 0;    return retVal;}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))    {        throw XMLPlatformUtilsException("XMLPlatformUtils::readFileBuffer - Read failed");    }    return (unsigned int)noOfItemsRead;}void XMLPlatformUtils::resetFile(FileHandle theFile                                 , MemoryManager* const manager){    // Seek to the start of the file    if (fseek((FILE*)theFile, 0, SEEK_SET) )        throw XMLPlatformUtilsException("XMLPlatformUtils::resetFile - Could not seek to beginning");}// ---------------------------------------------------------------------------//  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, fgMemoryManager);    // Use a local buffer that is big enough for the largest legal path     char* tmpPath = dirname((char*)newSrc);    if (!tmpPath)    {        throw XMLPlatformUtilsException("XMLPlatformUtils::resetFile - Could not get the base path name");    }    char* newXMLString = (char*) fgMemoryManager->allocate    (        (strlen(tmpPath) +1) * sizeof(char)    );//new char [strlen(tmpPath) +1];    ArrayJanitor<char> newJanitor(newXMLString, fgMemoryManager);    strcpy(newXMLString, tmpPath);        strcat(newXMLString , "/");    // Return a copy of the path, in Unicode format    return XMLString::transcode(newXMLString, manager);}bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck){    // 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(){    /***      *  REVISIT:     *      *   To be implemented later    ***/    XMLCh curDir[]={ chPeriod, chForwardSlash, chNull};    return getFullPath(curDir);}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);}#ifndef __TANDEM// -----------------------------------------------------------------------//  Mutex methods// -----------------------------------------------------------------------void XMLPlatformUtils::closeMutex(void* const mtxHandle){    if (mtxHandle == NULL)        return;    if (pthread_mutex_destroy( (pthread_mutex_t*)mtxHandle))    {        throw XMLPlatformUtilsException("Could not destroy a mutex");    }    if ( (pthread_mutex_t*)mtxHandle)        delete (pthread_mutex_t*) mtxHandle;}void XMLPlatformUtils::lockMutex(void* const mtxHandle){    if (mtxHandle == NULL)        return;    if (pthread_mutex_lock( (pthread_mutex_t*)mtxHandle))    {        throw XMLPlatformUtilsException("Could not lock a mutex");    }}void* XMLPlatformUtils::makeMutex(){    pthread_mutex_t* mutex = new pthread_mutex_t;    if (mutex == NULL)    {        throw XMLPlatformUtilsException("Could not initialize a mutex");    }    if (pthread_mutex_init(mutex, NULL))    {        throw XMLPlatformUtilsException("Could not create a mutex");    }    return (void*)(mutex);}void XMLPlatformUtils::unlockMutex(void* const mtxHandle){    if (mtxHandle == NULL)        return;    if (pthread_mutex_unlock( (pthread_mutex_t*)mtxHandle))    {        throw XMLPlatformUtilsException("Could not unlock a mutex");    }}// -----------------------------------------------------------------------//  Miscellaneous synchronization methods// -----------------------------------------------------------------------void* XMLPlatformUtils::compareAndSwap ( void**      toFill ,                    const void* const newValue ,                    const void* const toCompare){    boolean_t boolVar = compare_and_swap((atomic_p)toFill, (int *)&toCompare, (int)newValue );    return (void *)toCompare;}int XMLPlatformUtils::atomicIncrement(int &location){    int retVal = fetch_and_add( (atomic_p)&location, 1);    return retVal+1;}int XMLPlatformUtils::atomicDecrement(int &location){    int retVal = fetch_and_add( (atomic_p)&location, -1);    return retVal-1;}FileHandle XMLPlatformUtils::openStdInHandle(MemoryManager* const manager){    return (FileHandle)fdopen(dup(0), "rb");}#endifvoid XMLPlatformUtils::platformTerm(){    // We don't have any termination requirements at this time}#include <xercesc/util/LogicalPath.c>XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产手机| 亚洲综合免费观看高清完整版| 亚洲精品在线电影| 中文字幕日本乱码精品影院| 亚洲国产婷婷综合在线精品| 国产美女精品人人做人人爽| 欧美日韩视频第一区| 国产精品美女久久久久aⅴ国产馆| 亚洲成av人片在线观看| 国产激情视频一区二区三区欧美 | 国产在线播放一区| 欧美日韩国产首页在线观看| 国产日韩欧美一区二区三区乱码 | 中文字幕永久在线不卡| 蜜臀av性久久久久蜜臀aⅴ| 一本大道久久a久久综合 | 欧美日韩国产高清一区| 国产精品高潮呻吟久久| 国产福利一区二区三区视频在线 | 蜜臀av性久久久久蜜臀aⅴ流畅| 一本色道久久加勒比精品| 国产精品久线观看视频| 国产剧情一区二区三区| 精品国产乱码久久久久久久久| 日日骚欧美日韩| 欧美日韩免费电影| 亚洲一二三专区| 色综合久久88色综合天天6| 中文字幕中文字幕在线一区| 国产99久久久国产精品潘金| 久久久久久久久久久99999| 国产老妇另类xxxxx| 国产日韩欧美高清在线| 国产乱码字幕精品高清av | 亚洲天天做日日做天天谢日日欢 | 国产精品久久国产精麻豆99网站| 极品美女销魂一区二区三区 | 色素色在线综合| 亚洲黄一区二区三区| 日本精品裸体写真集在线观看 | 久久日韩精品一区二区五区| 精品一区二区三区在线播放视频 | 欧美日韩国产影片| 亚洲不卡一区二区三区| 欧美午夜在线观看| 日日骚欧美日韩| 日韩久久久久久| 国产精华液一区二区三区| 日韩中文字幕亚洲一区二区va在线 | 国产午夜精品一区二区三区视频| 蜜臀av一级做a爰片久久| 精品奇米国产一区二区三区| 老司机精品视频在线| 久久久久国产免费免费| 成人免费视频一区二区| 亚洲精品va在线观看| 欧美情侣在线播放| 激情文学综合网| 成人免费在线视频观看| 欧美日韩在线免费视频| 久久精品国产精品亚洲红杏| 中文子幕无线码一区tr| 欧美日韩精品系列| 精品一区二区三区在线观看国产| 亚洲国产成人一区二区三区| 欧美特级限制片免费在线观看| 日本色综合中文字幕| 欧美激情一区在线观看| 欧美在线不卡一区| 国产在线观看免费一区| 一区二区三区四区不卡视频| 日韩精品一区二区三区在线播放| 粉嫩绯色av一区二区在线观看 | 色就色 综合激情| 日本免费在线视频不卡一不卡二| 国产亚洲一区字幕| 久久久久久免费网| 色婷婷精品大在线视频| 久久99精品久久久久久动态图| 18成人在线观看| 久久久久久久电影| 欧美精品aⅴ在线视频| 成人美女在线视频| 美女视频一区二区三区| 一区二区久久久久久| 久久你懂得1024| 欧美一区二区在线看| 成人app网站| 韩国在线一区二区| 日韩国产高清在线| 一区二区免费看| 亚洲欧美在线另类| 国产三级一区二区三区| 777亚洲妇女| 欧美最猛黑人xxxxx猛交| 岛国精品在线观看| 狠狠久久亚洲欧美| 亚洲影视在线观看| 综合亚洲深深色噜噜狠狠网站| 精品国产一区二区亚洲人成毛片| 欧美另类z0zxhd电影| 91福利社在线观看| 91网站最新网址| 成人app网站| 成人久久视频在线观看| 国产激情一区二区三区| 激情六月婷婷久久| 久久er精品视频| 久久精品国产精品亚洲综合| 视频一区视频二区中文字幕| 一区二区三区免费看视频| 综合久久一区二区三区| 国产精品久久久久毛片软件| 国产三区在线成人av| 久久久99精品久久| 久久精品视频免费| 日本一区二区三区四区| 国产亚洲午夜高清国产拍精品| 日韩视频免费观看高清完整版| 91精品国产综合久久久蜜臀粉嫩 | 欧美主播一区二区三区| 色婷婷综合激情| 欧美视频一区二区| 欧美精品久久久久久久久老牛影院| 欧美亚洲日本国产| 91精品国产综合久久久蜜臀图片| 91精品国产一区二区三区| 日韩欧美亚洲一区二区| 精品国产在天天线2019| 国产亚洲精久久久久久| 国产精品久久午夜| 一区二区三区免费| 天堂一区二区在线| 久久99国产精品久久99果冻传媒| 国产一区二区三区免费在线观看| 国产乱码精品一区二区三区av| 成人晚上爱看视频| 在线亚洲精品福利网址导航| 欧美一区二区福利在线| 国产日韩成人精品| 一区二区三区免费看视频| 免费看日韩a级影片| 国产精品一区二区久激情瑜伽| 不卡视频一二三| 欧美疯狂性受xxxxx喷水图片| 日韩欧美激情在线| 亚洲欧洲另类国产综合| 午夜激情久久久| 极品少妇xxxx精品少妇| 一本大道av一区二区在线播放| 欧美日本一区二区| 国产精品入口麻豆九色| 亚洲一区二区黄色| 国产精品1区二区.| 欧美午夜一区二区三区| 久久综合色婷婷| 亚洲影视资源网| 国产激情精品久久久第一区二区| 欧洲精品一区二区| 精品少妇一区二区三区日产乱码| 自拍偷拍欧美精品| 久久99蜜桃精品| 欧美视频中文字幕| 国产女人18水真多18精品一级做| 亚洲一区电影777| 成人黄色在线网站| 日韩天堂在线观看| 亚洲一区二区精品久久av| 国产福利一区二区三区视频在线| 欧美精三区欧美精三区| 亚洲欧洲av在线| 国产一区二区免费在线| 777奇米成人网| 亚洲精品美国一| 国产成人鲁色资源国产91色综| 欧美一区二区三区免费| 一区二区三区免费| 91麻豆.com| 欧美高清在线一区二区| 精品一区二区综合| 91精品国产综合久久精品图片| 亚洲人123区| 99久久精品国产精品久久| 久久久久久久久蜜桃| 毛片一区二区三区| 777午夜精品免费视频| 亚洲va韩国va欧美va精品| 色婷婷av一区二区三区大白胸| 中文字幕中文在线不卡住| 国产精品99久久久久久宅男| 精品区一区二区| 精品一区二区三区在线视频| 日韩欧美一区在线观看| 日韩精品久久理论片| 欧美日韩精品一区二区在线播放 | 国产精品久久777777| 国产盗摄女厕一区二区三区| 精品精品欲导航| 精品无码三级在线观看视频| 日韩亚洲欧美中文三级|