Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

FormatterToText.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-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 #if !defined(FORMATTERTOTEXT_HEADER_GUARD_1357924680)
17 #define FORMATTERTOTEXT_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
27 
28 
29 
30 // Base class header file.
32 
33 
34 
35 XALAN_CPP_NAMESPACE_BEGIN
36 
37 
38 
39 class Writer;
40 
41 
42 
48 {
49 public:
50 
55 
64  Writer& writer,
65  bool normalizeLinefeed = true,
66  bool handleIgnorableWhitespace = true,
68 
78  Writer& writer,
79  const XalanDOMString& encoding,
80  bool normalizeLinefeed = true,
81  bool handleIgnorableWhitespace = true,
82  MemoryManagerType& theManager XALAN_DEFAULT_MEMMGR);
83 
84  static FormatterToText*
85  create(
86  MemoryManagerType& theManager,
87  Writer& writer,
88  const XalanDOMString& encoding,
89  bool normalizeLinefeed = true,
90  bool handleIgnorableWhitespace = true);
91 
92  virtual
93  ~FormatterToText();
94 
96  getMemoryManager()
97  {
98  return m_encoding.getMemoryManager();
99  }
100 
101  Writer*
102  getWriter() const
103  {
104  return m_writer;
105  }
106 
107  void
108  setWriter(Writer* theWriter)
109  {
110  m_writer = theWriter;
111 
112  update(false);
113  }
114 
115  void
116  clearEncoding();
117 
118  const XalanDOMString&
119  getEncoding() const
120  {
121  return m_encoding;
122  }
123 
124  void
125  setEncoding(const XalanDOMString& theEncoding)
126  {
127  m_encoding = theEncoding;
128 
129  update(false);
130  }
131 
132  XalanDOMChar
133  getMaxCharacter() const
134  {
135  return m_maxCharacter;
136  }
137 
138  void
139  setMaxCharacter(XalanDOMChar theMaxChar)
140  {
141  m_maxCharacter = theMaxChar;
142  }
143 
144  bool
145  getNormalizeLinefeed() const
146  {
147  return m_normalize;
148  }
149 
150  void
151  setNormalizeLinefeed(bool fNormalize)
152  {
153  m_normalize = fNormalize;
154  }
155 
156  bool
157  getHandleIgnorableWhitespace() const
158  {
159  return m_handleIgnorableWhitespace;
160  }
161 
162  void
163  setHandleIgnorableWhitespace(bool fHandle)
164  {
165  m_handleIgnorableWhitespace = fHandle;
166  }
167 
168  // These methods are inherited from FormatterListener ...
169 
170  virtual void
171  setDocumentLocator(const LocatorType* const locator);
172 
173  virtual void
174  startDocument();
175 
176  virtual void
177  endDocument();
178 
179  virtual void
180  startElement(
181  const XMLCh* const name,
182  AttributeListType& attrs);
183 
184  virtual void
185  endElement(const XMLCh* const name);
186 
187  virtual void
188  characters(
189  const XMLCh* const chars,
190  const unsigned int length);
191 
192  virtual void
194  const XMLCh* const chars,
195  const unsigned int length);
196 
197  virtual void
198  entityReference(const XMLCh* const name);
199 
200  virtual void
202  const XMLCh* const chars,
203  const unsigned int length);
204 
205  virtual void
207  const XMLCh* const target,
208  const XMLCh* const data);
209 
210  virtual void
211  resetDocument();
212 
213  virtual void
214  comment(const XMLCh* const data);
215 
216  virtual void
217  cdata(
218  const XMLCh* const ch,
219  const unsigned int length);
220 
221 private:
222 
223  // These are not implemented.
225 
227  operator=(const FormatterToText&);
228 
229  bool
230  operator==(const FormatterToText&) const;
231 
232  // Utility function to update various member variables
233  // when data changes.
234  void
235  update(bool fNormalizationOnly);
236 
237  // Data members...
238  Writer* m_writer;
239 
240  XalanDOMChar m_maxCharacter;
241 
242  XalanDOMString m_encoding;
243 
244  bool m_haveEncoding;
245 
246  bool m_normalize;
247 
248  bool m_handleIgnorableWhitespace;
249 
250  const XalanDOMChar* m_newlineString;
251 
252  XalanDOMString::size_type m_newlineStringLength;
253 };
254 
255 
256 
257 XALAN_CPP_NAMESPACE_END
258 
259 
260 
261 #endif // FORMATTERTOTEXT_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo