SourceForge.net Logo

DOMTreeWalker.hpp

Go to the documentation of this file.
00001 #ifndef DOMTreeWalker_HEADER_GUARD_
00002 #define DOMTreeWalker_HEADER_GUARD_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one or more
00006  * contributor license agreements.  See the NOTICE file distributed with
00007  * this work for additional information regarding copyright ownership.
00008  * The ASF licenses this file to You under the Apache License, Version 2.0
00009  * (the "License"); you may not use this file except in compliance with
00010  * the License.  You may obtain a copy of the License at
00011  * 
00012  *      http://www.apache.org/licenses/LICENSE-2.0
00013  * 
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  */
00020 
00021 /*
00022  * $Id: DOMTreeWalker.hpp 568078 2007-08-21 11:43:25Z amassari $
00023  */
00024 
00025 #include <xercesc/dom/DOMNode.hpp>
00026 #include <xercesc/dom/DOMNodeFilter.hpp>
00027 
00028 XERCES_CPP_NAMESPACE_BEGIN
00029 
00030 
00050 class CDOM_EXPORT DOMTreeWalker {
00051 protected:
00052     // -----------------------------------------------------------------------
00053     //  Hidden constructors
00054     // -----------------------------------------------------------------------
00057     DOMTreeWalker() {}
00058     DOMTreeWalker(const DOMTreeWalker &) {}
00060 
00061 private:
00062     // -----------------------------------------------------------------------
00063     // Unimplemented constructors and operators
00064     // -----------------------------------------------------------------------
00067     DOMTreeWalker & operator = (const DOMTreeWalker &);
00069 
00070 public:
00071     // -----------------------------------------------------------------------
00072     //  All constructors are hidden, just the destructor is available
00073     // -----------------------------------------------------------------------
00080     virtual ~DOMTreeWalker() {};
00082 
00083     // -----------------------------------------------------------------------
00084     //  Virtual DOMTreeWalker interface
00085     // -----------------------------------------------------------------------
00088     // -----------------------------------------------------------------------
00089     //  Getter methods
00090     // -----------------------------------------------------------------------
00091 
00098     virtual DOMNode*          getRoot() = 0;
00109     virtual unsigned long       getWhatToShow()= 0;
00110 
00116     virtual DOMNodeFilter*         getFilter()= 0;
00117 
00135     virtual bool              getExpandEntityReferences()= 0;
00136 
00142     virtual DOMNode*          getCurrentNode()= 0;
00143 
00144     // -----------------------------------------------------------------------
00145     //  Query methods
00146     // -----------------------------------------------------------------------
00158     virtual DOMNode*          parentNode()= 0;
00159 
00170     virtual DOMNode*          firstChild()= 0;
00171 
00182     virtual DOMNode*          lastChild()= 0;
00183 
00194     virtual DOMNode*          previousSibling()= 0;
00195 
00205     virtual DOMNode*          nextSibling()= 0;
00206 
00219     virtual DOMNode*          previousNode()= 0;
00220 
00232     virtual DOMNode*          nextNode()= 0;
00233 
00234     // -----------------------------------------------------------------------
00235     //  Setter methods
00236     // -----------------------------------------------------------------------
00254     virtual void              setCurrentNode(DOMNode* currentNode)= 0;
00256 
00257     // -----------------------------------------------------------------------
00258     //  Non-standard Extension
00259     // -----------------------------------------------------------------------
00268     virtual void              release() = 0;
00270 };
00271 
00272 #define GetDOMTreeWalkerMemoryManager GET_INDIRECT_MM(fCurrentNode)
00273 
00274 XERCES_CPP_NAMESPACE_END
00275 
00276 #endif

Generated on Mon Apr 28 16:41:16 2008 for XQilla DOM Level 3 API by  doxygen 1.5.1