source: NonGTP/Xerces/xercesc/dom/DOMWriterFilter.hpp @ 188

Revision 188, 7.7 KB checked in by mattausch, 19 years ago (diff)

added xercesc to support

Line 
1#ifndef DOMWriterFilter_HEADER_GUARD_
2#define DOMWriterFilter_HEADER_GUARD_
3
4/*
5 * The Apache Software License, Version 1.1
6 *
7 * Copyright (c) 2002 The Apache Software Foundation.  All rights
8 * reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 *
14 * 1. Redistributions of source code must retain the above copyright
15 *    notice, this list of conditions and the following disclaimer.
16 *
17 * 2. Redistributions in binary form must reproduce the above copyright
18 *    notice, this list of conditions and the following disclaimer in
19 *    the documentation and/or other materials provided with the
20 *    distribution.
21 *
22 * 3. The end-user documentation included with the redistribution,
23 *    if any, must include the following acknowledgment:
24 *       "This product includes software developed by the
25 *        Apache Software Foundation (http://www.apache.org/)."
26 *    Alternately, this acknowledgment may appear in the software itself,
27 *    if and wherever such third-party acknowledgments normally appear.
28 *
29 * 4. The names "Xerces" and "Apache Software Foundation" must
30 *    not be used to endorse or promote products derived from this
31 *    software without prior written permission. For written
32 *    permission, please contact apache\@apache.org.
33 *
34 * 5. Products derived from this software may not be called "Apache",
35 *    nor may "Apache" appear in their name, without prior written
36 *    permission of the Apache Software Foundation.
37 *
38 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
39 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
40 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
42 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
44 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
45 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
46 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
47 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
48 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
49 * SUCH DAMAGE.
50 * ====================================================================
51 *
52 * This software consists of voluntary contributions made by many
53 * individuals on behalf of the Apache Software Foundation, and was
54 * originally based on software copyright (c) 2001, International
55 * Business Machines, Inc., http://www.ibm.com .  For more information
56 * on the Apache Software Foundation, please see
57 * <http://www.apache.org/>.
58 */
59
60/*
61 * $Id: DOMWriterFilter.hpp,v 1.9 2003/03/07 19:59:09 tng Exp $
62 * $Log: DOMWriterFilter.hpp,v $
63 * Revision 1.9  2003/03/07 19:59:09  tng
64 * [Bug 11692] Unimplement the hidden constructors and assignment operator to remove warnings from gcc.
65 *
66 * Revision 1.8  2002/11/04 15:09:25  tng
67 * C++ Namespace Support.
68 *
69 * Revision 1.7  2002/08/22 15:04:57  tng
70 * Remove unused parameter variables in inline functions.
71 *
72 * Revision 1.6  2002/06/06 20:53:07  tng
73 * Documentation Fix: Update the API Documentation for DOM headers
74 *
75 * Revision 1.5  2002/06/04 14:24:04  peiyongz
76 * Make DOMWriterFilter pure abstract class w/o implementing any method
77 * and data
78 *
79 * Revision 1.4  2002/06/03 22:34:53  peiyongz
80 * DOMWriterFilter: setter provided, and allows any SHOW setting
81 *
82 * Revision 1.3  2002/05/31 20:59:40  peiyongz
83 * Add "introduced in DOM3"
84 *
85 * Revision 1.2  2002/05/30 16:25:33  tng
86 * Fix doxygen warning message.
87 *
88 * Revision 1.1  2002/05/28 22:38:55  peiyongz
89 * DOM3 Save Interface: DOMWriter/DOMWriterFilter
90 *
91 */
92
93/**
94 *
95 * DOMWriterFilter.hpp: interface for the DOMWriterFilter class.
96 *
97 * DOMWriterFilter provide applications the ability to examine nodes
98 * as they are being serialized.
99 *
100 * DOMWriterFilter lets the application decide what nodes should be
101 * serialized or not.
102 *
103 * The DOMDocument, DOMDocumentType, DOMNotation, and DOMEntity nodes are not passed
104 * to the filter.
105 *
106 * @since DOM Level 3
107 */
108
109
110#include <xercesc/dom/DOMNodeFilter.hpp>
111
112XERCES_CPP_NAMESPACE_BEGIN
113
114
115class CDOM_EXPORT DOMWriterFilter : public DOMNodeFilter {
116protected:
117    // -----------------------------------------------------------------------
118    //  Hidden constructors
119    // -----------------------------------------------------------------------
120    /** @name Hidden constructors */
121    //@{   
122    DOMWriterFilter() {};
123    //@}
124
125private:
126    // -----------------------------------------------------------------------
127    // Unimplemented constructors and operators
128    // -----------------------------------------------------------------------
129    /** @name Unimplemented constructors and operators */
130    //@{
131    DOMWriterFilter(const DOMWriterFilter &);
132    DOMWriterFilter & operator = (const DOMWriterFilter &);
133    //@}
134
135
136public:
137    // -----------------------------------------------------------------------
138    //  All constructors are hidden, just the destructor is available
139    // -----------------------------------------------------------------------
140    /** @name Destructor */
141    //@{
142    /**
143     * Destructor
144     *
145     */
146    virtual ~DOMWriterFilter() {};
147    //@}
148
149    // -----------------------------------------------------------------------
150    //  Virtual DOMWriterFilter interface
151    // -----------------------------------------------------------------------
152    /** @name Functions introduced in DOM Level 3 */
153    //@{
154         /**
155     * Interface from <code>DOMNodeFilter</code>,
156     * to be implemented by implementation (derived class)
157     */
158    virtual short acceptNode(const DOMNode* node) const = 0;
159
160    /**
161     * Tells the DOMWriter what types of nodes to show to the filter.
162     * See <code>DOMNodeFilter</code> for definition of the constants.
163     * The constant SHOW_ATTRIBUTE is meaningless here, attribute nodes will
164     * never be passed to a DOMWriterFilter.
165     *
166     *  <p><b>"Experimental - subject to change"</b></p>
167     *
168     * @return The constants of what types of nodes to show.
169     * @see   setWhatToShow
170     * @since DOM Level 3
171     */
172    virtual unsigned long getWhatToShow() const =0;
173
174    /**
175     * Set what types of nodes are to be presented.
176     * See <code>DOMNodeFilter</code> for definition of the constants.
177     *
178     *  <p><b>"Experimental - subject to change"</b></p>
179     *
180     * @param toShow The constants of what types of nodes to show.
181     * @see   getWhatToShow
182     * @since DOM Level 3
183     */
184    virtual void          setWhatToShow(unsigned long toShow) =0;
185    //@}
186
187private:
188
189    // -----------------------------------------------------------------------
190    //  Private data members
191    //
192    //  fWhatToShow
193    //
194    //      The whatToShow mask.
195    //      Tells the DOMWriter what types of nodes to show to the filter.
196    //      See NodeFilter for definition of the constants.
197    //      The constants
198    //      SHOW_ATTRIBUTE,
199    //      SHOW_DOCUMENT,
200    //      SHOW_DOCUMENT_TYPE,
201    //      SHOW_NOTATION, and
202    //      SHOW_DOCUMENT_FRAGMENT are meaningless here,
203    //      Entity nodes are not passed to the filter.
204    //
205    //      Those nodes will never be passed to a DOMWriterFilter.
206    //
207    //   Derived class shall add this data member:
208    //
209    //   unsigned long fWhatToShow;
210    // -----------------------------------------------------------------------
211
212};
213
214XERCES_CPP_NAMESPACE_END
215
216#endif
Note: See TracBrowser for help on using the repository browser.