|
||||
File indexing completed on 2025-01-30 10:27:02
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMNODEITERATORIMPL_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DOMNODEITERATORIMPL_HPP 0024 0025 // 0026 // This file is part of the internal implementation of the C++ XML DOM. 0027 // It should NOT be included or used directly by application programs. 0028 // 0029 // Applications should include the file <xercesc/dom/DOM.hpp> for the entire 0030 // DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class 0031 // name is substituded for the *. 0032 // 0033 0034 ////////////////////////////////////////////////////////////////////// 0035 // DOMNodeIteratorImpl.hpp: interface for the DOMNodeIteratorImpl class. 0036 // 0037 ////////////////////////////////////////////////////////////////////// 0038 0039 #include <xercesc/dom/DOMNode.hpp> 0040 #include <xercesc/dom/DOMNodeIterator.hpp> 0041 0042 XERCES_CPP_NAMESPACE_BEGIN 0043 0044 class CDOM_EXPORT DOMNodeIteratorImpl : public DOMNodeIterator { 0045 protected: 0046 // 0047 // Data 0048 // 0049 // The root. 0050 DOMNode* fRoot; 0051 0052 // The Document used to create this iterator 0053 DOMDocument* fDocument; 0054 0055 // The whatToShow mask. 0056 DOMNodeFilter::ShowType fWhatToShow; 0057 0058 // The NodeFilter reference. 0059 DOMNodeFilter* fNodeFilter; 0060 0061 0062 // The expandEntity reference flag. 0063 bool fExpandEntityReferences; 0064 bool fDetached; 0065 0066 0067 // 0068 // Iterator state - current node and direction. 0069 // 0070 // Note: The current node and direction are sufficient to implement 0071 // the desired behaviour of the current pointer being _between_ 0072 // two nodes. The fCurrentNode is actually the last node returned, 0073 // and the 0074 // direction is whether the pointer is in front or behind this node. 0075 // (usually akin to whether the node was returned via nextNode()) 0076 // (eg fForward = true) or previousNode() (eg fForward = false). 0077 // The last Node returned. 0078 DOMNode* fCurrentNode; 0079 0080 // The direction of the iterator on the fCurrentNode. 0081 // <code> 0082 // nextNode() == fForward = true;<br> 0083 // previousNode() == fForward = false;<br> 0084 // </code> 0085 bool fForward; 0086 0087 public: 0088 virtual ~DOMNodeIteratorImpl (); 0089 DOMNodeIteratorImpl ( 0090 DOMDocument* fDocument, 0091 DOMNode* root, 0092 DOMNodeFilter::ShowType whatToShow, 0093 DOMNodeFilter* nodeFilter, 0094 bool expandEntityRef); 0095 0096 DOMNodeIteratorImpl ( const DOMNodeIteratorImpl& toCopy); 0097 DOMNodeIteratorImpl& operator= (const DOMNodeIteratorImpl& other); 0098 0099 virtual DOMNode* getRoot (); 0100 virtual DOMNodeFilter::ShowType getWhatToShow (); 0101 virtual DOMNodeFilter* getFilter (); 0102 // Get the expandEntity reference flag. 0103 virtual bool getExpandEntityReferences(); 0104 0105 virtual DOMNode* nextNode (); 0106 virtual DOMNode* previousNode (); 0107 virtual void detach (); 0108 0109 virtual void release(); 0110 void removeNode (DOMNode* node); 0111 0112 protected: 0113 DOMNode* matchNodeOrParent (DOMNode* node); 0114 DOMNode* nextNode (DOMNode* node, bool visitChildren); 0115 DOMNode* previousNode (DOMNode* node); 0116 bool acceptNode (DOMNode* node); 0117 0118 }; 0119 0120 XERCES_CPP_NAMESPACE_END 0121 0122 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |