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

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

?? domnodeiteratorimpl.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
字號:
/* * Copyright 2001-2002,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: DOMNodeIteratorImpl.cpp,v 1.8 2004/09/08 13:55:52 peiyongz Exp $ *///////////////////////////////////////////////////////////////////////// DOMNodeIteratorImpl.cpp: implementation of the DOMNodeIteratorImpl class.////////////////////////////////////////////////////////////////////////#include "DOMNodeIteratorImpl.hpp"#include "DOMDocumentImpl.hpp"#include <xercesc/dom/DOMDocument.hpp>#include <xercesc/dom/DOMException.hpp>XERCES_CPP_NAMESPACE_BEGIN//////////////////////////////////////////////////////////////////////// Construction/Destruction//////////////////////////////////////////////////////////////////////DOMNodeIteratorImpl::DOMNodeIteratorImpl (DOMDocument* doc,                                    DOMNode* root,                                    unsigned long whatToShow,                                    DOMNodeFilter* nodeFilter,                                    bool expandEntityRef):   fRoot(root),    fDocument(doc),    fWhatToShow(whatToShow),    fNodeFilter(nodeFilter),    fExpandEntityReferences(expandEntityRef),    fDetached(false),    fCurrentNode(0),    fForward(true)    {	}DOMNodeIteratorImpl::DOMNodeIteratorImpl ( const DOMNodeIteratorImpl& toCopy)    :   fRoot(toCopy.fRoot),    fDocument(toCopy.fDocument),    fWhatToShow(toCopy.fWhatToShow),    fNodeFilter(toCopy.fNodeFilter),    fExpandEntityReferences(toCopy.fExpandEntityReferences),    fDetached(toCopy.fDetached),    fCurrentNode(toCopy.fCurrentNode),    fForward(toCopy.fForward){}DOMNodeIteratorImpl& DOMNodeIteratorImpl::operator= (const DOMNodeIteratorImpl& other) {    fRoot                   = other.fRoot;    fCurrentNode            = other.fRoot;    fWhatToShow             = other.fWhatToShow;    fNodeFilter             = other.fNodeFilter;    fForward                = other.fForward;    fDetached               = other.fDetached;    fExpandEntityReferences = other.fExpandEntityReferences;    fDocument               = other.fDocument;    return *this;}DOMNodeIteratorImpl::~DOMNodeIteratorImpl (){	fDetached = false;}void DOMNodeIteratorImpl::detach (){	fDetached = true;   ((DOMDocumentImpl *)fDocument)->removeNodeIterator(this);}DOMNode* DOMNodeIteratorImpl::getRoot() {    return fRoot;}// Implementation Note: Note that the iterator looks at whatToShow// and filter values at each call, and therefore one _could_ add// setters for these values and alter them while iterating!/** Return the whatToShow value */unsigned long DOMNodeIteratorImpl::getWhatToShow () {    return fWhatToShow;}/** Return the filter */DOMNodeFilter* DOMNodeIteratorImpl::getFilter () {    return fNodeFilter;}/** Get the expandEntity reference flag. */bool DOMNodeIteratorImpl::getExpandEntityReferences(){    return fExpandEntityReferences;}/** Return the next DOMNode* in the Iterator. The node is the next node in *  depth-first order which also passes the filter, and whatToShow. *  A 0 return means either that */DOMNode* DOMNodeIteratorImpl::nextNode () {	if (fDetached)		throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeIteratorMemoryManager);    // if root is 0 there is no next node->    if (!fRoot)			return 0;    DOMNode* aNextNode = fCurrentNode;    bool accepted = false; // the next node has not been accepted.    while (!accepted) {        // if last direction is not forward, repeat node->        if (!fForward && (aNextNode != 0)) {            //System.out.println("nextNode():!fForward:"+fCurrentNode.getNodeName());            aNextNode = fCurrentNode;        } else {        // else get the next node via depth-first            aNextNode = nextNode(aNextNode, true);        }        fForward = true; //REVIST: should direction be set forward before 0 check?        // nothing in the list. return 0.        if (!aNextNode) return 0;        // does node pass the filters and whatToShow?        accepted = acceptNode(aNextNode);        if (accepted) {            // if so, then the node is the current node->            fCurrentNode = aNextNode;            return fCurrentNode;        }    }    // no nodes, or no accepted nodes.    return 0;}/** Return the previous Node in the Iterator. The node is the next node in *  _backwards_ depth-first order which also passes the filter, and whatToShow. */DOMNode* DOMNodeIteratorImpl::previousNode () {	if (fDetached)		throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeIteratorMemoryManager);		    // if the root is 0, or the current node is 0, return 0.    if (!fRoot || !fCurrentNode) return 0;    DOMNode* aPreviousNode = fCurrentNode;    bool accepted = false;    while (!accepted) {        if (fForward && (aPreviousNode != 0)) {            //repeat last node->            aPreviousNode = fCurrentNode;        } else {            // get previous node in backwards depth first order.            aPreviousNode = previousNode(aPreviousNode);        }        // we are going backwards        fForward = false;        // if the new previous node is 0, we're at head or past the root,        // so return 0.        if (!aPreviousNode) return 0;        // check if node passes filters and whatToShow.        accepted = acceptNode(aPreviousNode);        if (accepted) {            // if accepted, update the current node, and return it.            fCurrentNode = aPreviousNode;            return fCurrentNode;        }    }    // there are no nodes?    return 0;}/** The node is accepted if it passes the whatToShow and the filter. */bool DOMNodeIteratorImpl::acceptNode (DOMNode* node) {	if (fDetached)		throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeIteratorMemoryManager);    if (fNodeFilter == 0) {        return ((fWhatToShow & (1 << (node->getNodeType() - 1))) != 0);    } else {        return ((fWhatToShow & (1 << (node->getNodeType() - 1))) != 0)            && fNodeFilter->acceptNode(node) == DOMNodeFilter::FILTER_ACCEPT;    }}/** Return node, if matches or any parent if matches. */DOMNode* DOMNodeIteratorImpl::matchNodeOrParent (DOMNode* node) {    for (DOMNode* n = fCurrentNode; n != fRoot; n = n->getParentNode()) {        if (node == n) return n;    }    return 0;}/** The method nextNode(DOMNode, bool) returns the next node *  from the actual DOM tree. * *  The bool visitChildren determines whether to visit the children. *  The result is the nextNode. */DOMNode* DOMNodeIteratorImpl::nextNode (DOMNode* node, bool visitChildren) {	if (fDetached)		throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeIteratorMemoryManager);    if (!node) return fRoot;    DOMNode* result = 0;    // only check children if we visit children.    if (visitChildren) {        //if hasChildren, return 1st child.        if (node->hasChildNodes()) {            result = node->getFirstChild();            return result;        }    }    // if hasSibling, return sibling    if (node != fRoot) {        result = node->getNextSibling();        if (result != 0) return result;        // return parent's 1st sibling.        DOMNode* parent = node->getParentNode();        while ((parent != 0) && parent != fRoot) {            result = parent->getNextSibling();            if (result != 0) {                return result;            } else {                parent = parent->getParentNode();            }        } // while (parent != 0 && parent != fRoot) {    }    // end of list, return 0    return 0;}/** The method previousNode(DOMNode) returns the previous node *  from the actual DOM tree. */DOMNode* DOMNodeIteratorImpl::previousNode (DOMNode* node) {	if (fDetached)		throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeIteratorMemoryManager);    DOMNode* result = 0;    // if we're at the root, return 0.    if (node == fRoot)			return 0;    // get sibling    result = node->getPreviousSibling();    if (!result) {        //if 1st sibling, return parent        result = node->getParentNode();        return result;    }    // if sibling has children, keep getting last child of child.    if (result->hasChildNodes()) {        while (result->hasChildNodes()) {            result = result->getLastChild();        }    }    return result;}/** Fix-up the iterator on a remove. Called by DOM or otherwise, *  before an actual DOM remove. */void DOMNodeIteratorImpl::removeNode (DOMNode* node) {	if (fDetached)		throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeIteratorMemoryManager);    // Implementation note: Fix-up means setting the current node properly    // after a remove.    if (!node) return;    DOMNode* deleted = matchNodeOrParent(node);    if (!deleted) return;    if (fForward) {        fCurrentNode = previousNode(deleted);    } else    // if (!fForward)    {        DOMNode* next = nextNode(deleted, false);        if (next != 0) {            // normal case: there _are_ nodes following this in the iterator.            fCurrentNode = next;        } else {            // the last node in the iterator is to be removed,            // so we set the current node to be the previous one.            fCurrentNode = previousNode(deleted);            fForward = true;        }    }}void DOMNodeIteratorImpl::release(){    detach();    // for performance reason, do not recycle pointer    // chance that this is allocated again and again is not usual}XERCES_CPP_NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品白丝在线| 久久久国产综合精品女国产盗摄| 欧美精品一级二级| 26uuu精品一区二区在线观看| 亚洲毛片av在线| 国产精品综合网| 欧美日韩精品一区二区三区蜜桃| 国产欧美日韩一区二区三区在线观看 | 国产精品女同互慰在线看| 亚洲第一电影网| 99久久精品国产一区二区三区 | 国产一区亚洲一区| 欧美狂野另类xxxxoooo| 国产精品九色蝌蚪自拍| 日本va欧美va欧美va精品| 91国偷自产一区二区三区成为亚洲经典 | 国产精品国产三级国产aⅴ中文| 日本美女一区二区三区视频| 日本电影亚洲天堂一区| 国产清纯在线一区二区www| 日产精品久久久久久久性色| 色婷婷精品大在线视频| 成人欧美一区二区三区| 成人在线综合网| 国产日韩欧美精品电影三级在线| 美女网站在线免费欧美精品| 欧美一区二区视频在线观看2022| 亚洲一区欧美一区| 欧美性生交片4| 亚洲黄网站在线观看| 91麻豆.com| 一区二区在线看| 日本高清免费不卡视频| 一区二区在线观看视频 | 国产成人精品一区二区三区四区| 欧美成人女星排名| 精品一区二区在线免费观看| 欧美成人伊人久久综合网| 麻豆精品在线看| 2020国产精品自拍| 国产精品99久久久久久有的能看| 国产午夜精品福利| 91麻豆免费看| 亚洲狠狠爱一区二区三区| 91精品福利视频| 午夜精品久久久久久久蜜桃app| 欧美精品久久一区二区三区| 日本少妇一区二区| 久久久久久免费网| 波波电影院一区二区三区| 亚洲摸摸操操av| 欧美精品xxxxbbbb| 韩国理伦片一区二区三区在线播放| 欧美成人官网二区| 成人性视频免费网站| 亚洲视频 欧洲视频| 欧美日韩不卡视频| 国产精品资源网| 一区二区三区日韩在线观看| 欧美日韩高清一区二区三区| 精品一区二区三区视频| 国产精品久久久久久久浪潮网站 | 亚洲一区二区欧美| 欧美精品久久一区| 国产精品伊人色| 亚洲欧洲综合另类| 日韩欧美中文字幕制服| 成人综合在线观看| 三级亚洲高清视频| 国产色91在线| 欧美片网站yy| 成人理论电影网| 日本欧美在线看| 日韩理论电影院| 日韩午夜av电影| 成人h版在线观看| 老司机精品视频一区二区三区| 国产精品婷婷午夜在线观看| 欧美精品在线观看一区二区| 成人免费观看男女羞羞视频| 秋霞成人午夜伦在线观看| 国产日韩欧美精品电影三级在线| 欧美性xxxxxxxx| 成人精品免费看| 美女被吸乳得到大胸91| 一区二区三区蜜桃网| 久久免费精品国产久精品久久久久| 欧美色老头old∨ideo| 粉嫩av一区二区三区在线播放| 丝袜亚洲另类欧美| 亚洲欧美另类综合偷拍| 久久蜜臀中文字幕| 欧美精品在欧美一区二区少妇| 91美女在线看| 成人免费视频一区| 国产精品资源在线看| 久久国产麻豆精品| 日日夜夜精品视频免费| 一片黄亚洲嫩模| 1区2区3区精品视频| 国产亚洲一区字幕| 精品播放一区二区| 日韩欧美一区二区久久婷婷| 欧美午夜一区二区| 在线日韩一区二区| 日本高清不卡aⅴ免费网站| 国产成人h网站| 国产99精品视频| 国产mv日韩mv欧美| 成人国产精品免费网站| 成人免费视频视频在线观看免费| 极品少妇xxxx精品少妇| 经典三级视频一区| 国产乱码精品1区2区3区| 激情综合色丁香一区二区| 久久精品国产一区二区三| 另类专区欧美蜜桃臀第一页| 日韩高清中文字幕一区| 日本视频一区二区三区| 麻豆成人免费电影| 国产在线精品一区二区不卡了| 狠狠狠色丁香婷婷综合久久五月| 久久99久久久久久久久久久| 激情综合网激情| 成人app网站| 色天使色偷偷av一区二区| 欧美视频一区在线| 欧美一级艳片视频免费观看| 日韩精品一区二区三区视频 | 欧美大片国产精品| 久久综合久色欧美综合狠狠| 国产亚洲精品bt天堂精选| 一区二区三区欧美日韩| 欧美在线影院一区二区| 欧美日韩激情一区二区三区| 制服丝袜在线91| 精品国产乱码久久久久久免费 | 亚洲成人自拍网| 蜜臀精品久久久久久蜜臀| 国产伦理精品不卡| 99久久久精品免费观看国产蜜| 中文字幕综合网| 国产精品一区二区x88av| 成人黄色av电影| 欧美欧美午夜aⅴ在线观看| 久久婷婷成人综合色| 亚洲日本在线观看| 日韩电影在线免费看| 国产成人免费视频网站高清观看视频| 白白色 亚洲乱淫| 7777精品伊人久久久大香线蕉的 | 亚洲美女少妇撒尿| 美腿丝袜亚洲三区| 国产人成亚洲第一网站在线播放| 日韩三级在线观看| 成人免费一区二区三区在线观看| 亚洲女爱视频在线| 国产主播一区二区三区| 99这里都是精品| 欧美大白屁股肥臀xxxxxx| 亚洲国产电影在线观看| 日韩激情中文字幕| 成年人国产精品| 精品少妇一区二区三区在线视频| 美美哒免费高清在线观看视频一区二区| 美国欧美日韩国产在线播放| 成人av中文字幕| 日韩欧美一二三四区| 成人欧美一区二区三区白人| 久久国产精品无码网站| 欧美性感一类影片在线播放| 国产视频在线观看一区二区三区| 天堂成人国产精品一区| 91亚洲永久精品| 久久精品亚洲麻豆av一区二区| 日韩avvvv在线播放| 色丁香久综合在线久综合在线观看| 精品国产伦一区二区三区免费| 亚洲国产另类av| 色综合久久天天综合网| 国产精品视频yy9299一区| 韩国女主播成人在线| 日韩亚洲欧美在线观看| 午夜精品国产更新| 色国产综合视频| 悠悠色在线精品| 91蜜桃网址入口| 国产精品久久久久久妇女6080| 国产一区久久久| 精品国一区二区三区| 免费xxxx性欧美18vr| 91精品国产高清一区二区三区蜜臀| 亚洲免费观看在线观看| 成人黄色电影在线| 中文字幕亚洲不卡| 97久久超碰精品国产| 亚洲欧美经典视频| 91在线精品一区二区| 亚洲欧美日韩综合aⅴ视频| 99精品久久久久久|