1 | /*
|
---|
2 | * Copyright 2002,2004 The Apache Software Foundation.
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | */
|
---|
16 |
|
---|
17 | /*
|
---|
18 | * $Id: DOMPrintFilter.hpp,v 1.5 2004/09/08 13:55:31 peiyongz Exp $
|
---|
19 | * $Log: DOMPrintFilter.hpp,v $
|
---|
20 | * Revision 1.5 2004/09/08 13:55:31 peiyongz
|
---|
21 | * Apache License Version 2.0
|
---|
22 | *
|
---|
23 | * Revision 1.4 2002/11/05 21:46:19 tng
|
---|
24 | * Explicit code using namespace in application.
|
---|
25 | *
|
---|
26 | * Revision 1.3 2002/06/04 14:22:51 peiyongz
|
---|
27 | * Implement setter/getter from DOMWriterFilter
|
---|
28 | *
|
---|
29 | * Revision 1.2 2002/06/03 22:40:07 peiyongz
|
---|
30 | * *** empty log message ***
|
---|
31 | *
|
---|
32 | * Revision 1.1 2002/05/29 13:33:32 peiyongz
|
---|
33 | * DOM3 Save Interface: DOMWriter/DOMWriterFilter
|
---|
34 | *
|
---|
35 | */
|
---|
36 |
|
---|
37 | //////////////////////////////////////////////////////////////////////
|
---|
38 | // DOMPrintFilter.hpp: a sample implementation of DOMWriterFilter.
|
---|
39 | //
|
---|
40 | //////////////////////////////////////////////////////////////////////
|
---|
41 |
|
---|
42 | #ifndef DOMPrintFilter_HEADER_GUARD_
|
---|
43 | #define DOMPrintFilter_HEADER_GUARD_
|
---|
44 |
|
---|
45 | #include <xercesc/dom/DOMWriterFilter.hpp>
|
---|
46 |
|
---|
47 | XERCES_CPP_NAMESPACE_USE
|
---|
48 |
|
---|
49 | class DOMPrintFilter : public DOMWriterFilter {
|
---|
50 | public:
|
---|
51 |
|
---|
52 | /** @name Constructors */
|
---|
53 | DOMPrintFilter(unsigned long whatToShow = DOMNodeFilter::SHOW_ALL);
|
---|
54 | //@{
|
---|
55 |
|
---|
56 | /** @name Destructors */
|
---|
57 | ~DOMPrintFilter(){};
|
---|
58 | //@{
|
---|
59 |
|
---|
60 | /** @ interface from DOMWriterFilter */
|
---|
61 | virtual short acceptNode(const DOMNode*) const;
|
---|
62 | //@{
|
---|
63 |
|
---|
64 | virtual unsigned long getWhatToShow() const {return fWhatToShow;};
|
---|
65 |
|
---|
66 | virtual void setWhatToShow(unsigned long toShow) {fWhatToShow = toShow;};
|
---|
67 |
|
---|
68 | private:
|
---|
69 | // unimplemented copy ctor and assignement operator
|
---|
70 | DOMPrintFilter(const DOMPrintFilter&);
|
---|
71 | DOMPrintFilter & operator = (const DOMPrintFilter&);
|
---|
72 |
|
---|
73 | unsigned long fWhatToShow;
|
---|
74 |
|
---|
75 | };
|
---|
76 |
|
---|
77 | #endif
|
---|