source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/dom/DOMWriterFilter.hpp @ 2674

Revision 2674, 4.7 KB checked in by mattausch, 16 years ago (diff)
Line 
1#ifndef DOMWriterFilter_HEADER_GUARD_
2#define DOMWriterFilter_HEADER_GUARD_
3
4/*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements.  See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License.  You may obtain a copy of the License at
11 *
12 *      http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21/*
22 * $Id: DOMWriterFilter.hpp 568078 2007-08-21 11:43:25Z amassari $
23 */
24
25/**
26 *
27 * DOMWriterFilter.hpp: interface for the DOMWriterFilter class.
28 *
29 * DOMWriterFilter provide applications the ability to examine nodes
30 * as they are being serialized.
31 *
32 * DOMWriterFilter lets the application decide what nodes should be
33 * serialized or not.
34 *
35 * The DOMDocument, DOMDocumentType, DOMNotation, and DOMEntity nodes are not passed
36 * to the filter.
37 *
38 * @since DOM Level 3
39 */
40
41
42#include <xercesc/dom/DOMNodeFilter.hpp>
43
44XERCES_CPP_NAMESPACE_BEGIN
45
46
47class CDOM_EXPORT DOMWriterFilter : public DOMNodeFilter {
48protected:
49    // -----------------------------------------------------------------------
50    //  Hidden constructors
51    // -----------------------------------------------------------------------
52    /** @name Hidden constructors */
53    //@{   
54    DOMWriterFilter() {};
55    //@}
56
57private:
58    // -----------------------------------------------------------------------
59    // Unimplemented constructors and operators
60    // -----------------------------------------------------------------------
61    /** @name Unimplemented constructors and operators */
62    //@{
63    DOMWriterFilter(const DOMWriterFilter &);
64    DOMWriterFilter & operator = (const DOMWriterFilter &);
65    //@}
66
67
68public:
69    // -----------------------------------------------------------------------
70    //  All constructors are hidden, just the destructor is available
71    // -----------------------------------------------------------------------
72    /** @name Destructor */
73    //@{
74    /**
75     * Destructor
76     *
77     */
78    virtual ~DOMWriterFilter() {};
79    //@}
80
81    // -----------------------------------------------------------------------
82    //  Virtual DOMWriterFilter interface
83    // -----------------------------------------------------------------------
84    /** @name Functions introduced in DOM Level 3 */
85    //@{
86         /**
87     * Interface from <code>DOMNodeFilter</code>,
88     * to be implemented by implementation (derived class)
89     */
90    virtual short acceptNode(const DOMNode* node) const = 0;
91
92    /**
93     * Tells the DOMWriter what types of nodes to show to the filter.
94     * See <code>DOMNodeFilter</code> for definition of the constants.
95     * The constant SHOW_ATTRIBUTE is meaningless here, attribute nodes will
96     * never be passed to a DOMWriterFilter.
97     *
98     *  <p><b>"Experimental - subject to change"</b></p>
99     *
100     * @return The constants of what types of nodes to show.
101     * @see   setWhatToShow
102     * @since DOM Level 3
103     */
104    virtual unsigned long getWhatToShow() const =0;
105
106    /**
107     * Set what types of nodes are to be presented.
108     * See <code>DOMNodeFilter</code> for definition of the constants.
109     *
110     *  <p><b>"Experimental - subject to change"</b></p>
111     *
112     * @param toShow The constants of what types of nodes to show.
113     * @see   getWhatToShow
114     * @since DOM Level 3
115     */
116    virtual void          setWhatToShow(unsigned long toShow) =0;
117    //@}
118
119private:
120
121    // -----------------------------------------------------------------------
122    //  Private data members
123    //
124    //  fWhatToShow
125    //
126    //      The whatToShow mask.
127    //      Tells the DOMWriter what types of nodes to show to the filter.
128    //      See NodeFilter for definition of the constants.
129    //      The constants
130    //      SHOW_ATTRIBUTE,
131    //      SHOW_DOCUMENT,
132    //      SHOW_DOCUMENT_TYPE,
133    //      SHOW_NOTATION, and
134    //      SHOW_DOCUMENT_FRAGMENT are meaningless here,
135    //      Entity nodes are not passed to the filter.
136    //
137    //      Those nodes will never be passed to a DOMWriterFilter.
138    //
139    //   Derived class shall add this data member:
140    //
141    //   unsigned long fWhatToShow;
142    // -----------------------------------------------------------------------
143
144};
145
146XERCES_CPP_NAMESPACE_END
147
148#endif
Note: See TracBrowser for help on using the repository browser.