Xalan-C++ API Reference  1.12.0
XalanOutputStreamPrintWriter.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALANOUTPUTSTREAMPRINTWRITER_HEADER_GUARD_1357924680)
19 #define XALANOUTPUTSTREAMPRINTWRITER_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
29 
30 
31 
33 
34 
35 
36 namespace XALAN_CPP_NAMESPACE {
37 
38 
39 
40 class XalanOutputStream;
41 
42 
43 
45 {
46 public:
47 
48  /**
49  * Construct a XalanOutputStreamPrintWriter instance.
50  *
51  * @param theOutputStream output stream to write
52  * @param fAutoFlush if true, the output will not be buffered
53  */
55  XalanOutputStream& theOutputStream,
56  bool fAutoFlush = false);
57 
60  XalanOutputStream& theOutputStream,
61  bool fAutoFlush = false);
62 
63  virtual
65 
66 
67  virtual bool
68  checkError() const;
69 
70  virtual void
71  close();
72 
73  virtual void
74  flush();
75 
76  virtual XalanOutputStream*
78 
79  virtual const XalanOutputStream*
80  getStream() const;
81 
82 
83  virtual void
85  const char* s,
86  size_t theOffset = 0,
87  size_t theLength = npos);
88 
89  virtual void
91  const XalanDOMChar* s,
92  XalanDOMString::size_type theOffset = 0,
93  XalanDOMString::size_type theLength = XalanDOMString::npos);
94 
95  virtual void
96  write(XalanDOMChar c);
97 
98  virtual void
100  const XalanDOMString& s,
101  XalanDOMString::size_type theOffset = 0,
102  XalanDOMString::size_type theLength = XalanDOMString::npos);
103 
104 #if !defined(XALAN_BOOL_AS_INT)
105  virtual void
106  print(bool b);
107 #endif
108 
109  virtual void
110  print(char c);
111 
112  virtual void
114  const char* s,
115  size_t theLength = npos);
116 
117  virtual void
119  const XalanDOMChar* s,
120  XalanDOMString::size_type theLength = XalanDOMString::npos);
121 
122  virtual void
123  print(double d);
124 
125  virtual void
126  print(XMLInt32 i);
127 
128  virtual void
129  print(XMLInt64 l);
130 
131  virtual void
133 
134  virtual void
136 
137 #if !defined(XALAN_BOOL_AS_INT)
138  virtual void
139  println(bool x);
140 #endif
141 
142  virtual void
143  println(char x);
144 
145  virtual void
147  const char* s,
148  size_t theLength = npos);
149 
150  virtual void
152  const XalanDOMChar* s,
153  XalanDOMString::size_type theLength = XalanDOMString::npos);
154 
155  virtual void
156  println(double x);
157 
158  virtual void
159  println(XMLInt32 x);
160 
161  virtual void
162  println(XMLInt64 x);
163 
164  virtual void
166 
167 private:
168 
169  void
170  flushWideChars();
171 
172 
173  // Not implemented
175 
177  operator=(const XalanOutputStreamPrintWriter&);
178 
179  bool
181 
182  // Data members...
183  XalanOutputStream& m_outputStream;
184 
185  XalanDOMString m_buffer;
186 
187  bool m_flushWideChars;
188 };
189 
190 
191 
192 }
193 
194 
195 
196 #endif // XALANOUTPUTSTREAMPRINTWRITER_HEADER_GUARD_1357924680
#define XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual void println(XMLInt64 x)
static XalanOutputStreamPrintWriter * create(XalanOutputStream &theOutputStream, bool fAutoFlush=false)
virtual void write(const XalanDOMChar *s, XalanDOMString::size_type theOffset=0, XalanDOMString::size_type theLength=XalanDOMString::npos)
Writes a string.
virtual void println(double x)
virtual bool checkError() const
Flush the stream, then check the error status.
virtual void println(const char *s, size_t theLength=npos)
virtual void flush()
Flush the stream.
virtual void println(const XalanDOMString &s)
virtual void write(const XalanDOMString &s, XalanDOMString::size_type theOffset=0, XalanDOMString::size_type theLength=XalanDOMString::npos)
Writes a string.
virtual void write(XalanDOMChar c)
Writes a character.
virtual void print(const XalanDOMString &s)
virtual void print(XMLInt64 l)
virtual void write(const char *s, size_t theOffset=0, size_t theLength=npos)
Writes a string.
virtual void println(const XalanDOMChar *s, XalanDOMString::size_type theLength=XalanDOMString::npos)
virtual XalanOutputStream * getStream()
Get the stream associated with the writer...
virtual void println(XMLInt32 x)
XalanOutputStreamPrintWriter(XalanOutputStream &theOutputStream, bool fAutoFlush=false)
Construct a XalanOutputStreamPrintWriter instance.
virtual void print(const XalanDOMChar *s, XalanDOMString::size_type theLength=XalanDOMString::npos)
virtual void print(const char *s, size_t theLength=npos)
virtual void close()
Close the stream.
virtual void print(XMLInt32 i)
virtual const XalanOutputStream * getStream() const
Get the stream associated with the writer...
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)