DOMTreeWalker.hpp

Go to the documentation of this file.
00001 #ifndef DOMTreeWalker_HEADER_GUARD_
00002 #define DOMTreeWalker_HEADER_GUARD_
00003 
00004 /*
00005  * Copyright 2001-2002,2004 The Apache Software Foundation.
00006  * 
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  * 
00011  *      http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  */
00019 
00020 /*
00021  * $Id: DOMTreeWalker.hpp 176280 2005-01-07 15:32:34Z amassari $
00022  */
00023 
00024 #include <xercesc/dom/DOMNode.hpp>
00025 #include <xercesc/dom/DOMNodeFilter.hpp>
00026 
00027 XERCES_CPP_NAMESPACE_BEGIN
00028 
00029 
00049 class CDOM_EXPORT DOMTreeWalker {
00050 protected:
00051     // -----------------------------------------------------------------------
00052     //  Hidden constructors
00053     // -----------------------------------------------------------------------
00056     DOMTreeWalker() {}
00057     DOMTreeWalker(const DOMTreeWalker &) {}
00059 
00060 private:
00061     // -----------------------------------------------------------------------
00062     // Unimplemented constructors and operators
00063     // -----------------------------------------------------------------------
00066     DOMTreeWalker & operator = (const DOMTreeWalker &);
00068 
00069 public:
00070     // -----------------------------------------------------------------------
00071     //  All constructors are hidden, just the destructor is available
00072     // -----------------------------------------------------------------------
00079     virtual ~DOMTreeWalker() {};
00081 
00082     // -----------------------------------------------------------------------
00083     //  Virtual DOMTreeWalker interface
00084     // -----------------------------------------------------------------------
00087     // -----------------------------------------------------------------------
00088     //  Getter methods
00089     // -----------------------------------------------------------------------
00090 
00097     virtual DOMNode*          getRoot() = 0;
00108     virtual unsigned long       getWhatToShow()= 0;
00109 
00115     virtual DOMNodeFilter*         getFilter()= 0;
00116 
00134     virtual bool              getExpandEntityReferences()= 0;
00135 
00141     virtual DOMNode*          getCurrentNode()= 0;
00142 
00143     // -----------------------------------------------------------------------
00144     //  Query methods
00145     // -----------------------------------------------------------------------
00157     virtual DOMNode*          parentNode()= 0;
00158 
00169     virtual DOMNode*          firstChild()= 0;
00170 
00181     virtual DOMNode*          lastChild()= 0;
00182 
00193     virtual DOMNode*          previousSibling()= 0;
00194 
00204     virtual DOMNode*          nextSibling()= 0;
00205 
00218     virtual DOMNode*          previousNode()= 0;
00219 
00231     virtual DOMNode*          nextNode()= 0;
00232 
00233     // -----------------------------------------------------------------------
00234     //  Setter methods
00235     // -----------------------------------------------------------------------
00253     virtual void              setCurrentNode(DOMNode* currentNode)= 0;
00255 
00256     // -----------------------------------------------------------------------
00257     //  Non-standard Extension
00258     // -----------------------------------------------------------------------
00267     virtual void              release() = 0;
00269 };
00270 
00271 #define GetDOMTreeWalkerMemoryManager GET_INDIRECT_MM(fCurrentNode)
00272 
00273 XERCES_CPP_NAMESPACE_END
00274 
00275 #endif

Generated on Fri Jan 19 15:31:05 2007 for XQilla DOM Level 3 API by  doxygen 1.4.6