Xalan-C++ API Reference 1.12.0
PrintWriter.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(PRINTWRITER_HEADER_GUARD_1357924680)
19#define PRINTWRITER_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
25
26
27
28// Base class header file.
30
31
32
33namespace XALAN_CPP_NAMESPACE {
34
35
36
38{
39public:
40
41 /**
42 * Constructor
43 *
44 * @param fAutoFlush if true, the output will not be buffered
45 */
46 PrintWriter( bool fAutoFlush = false, MemoryManager& theManager XALAN_DEFAULT_MEMMGR);
47
48 MemoryManager&
50 {
51 return m_memoryManager;
52 }
53
54 virtual
56
57 /**
58 * Flush the stream, then check the error status.
59 *
60 * @return true if no errors
61 */
62 virtual bool
63 checkError() const = 0;
64
65 // Functions inherited from Writer...
66
67 virtual void
68 close() = 0;
69
70 virtual void
71 flush() = 0;
72
73
74 // Output functions inherited from Writer...
75
76 virtual void
78 const char* s,
79 size_t theOffset = 0,
80 size_t theLength = npos) = 0;
81
82 virtual void
84 const XalanDOMChar* s,
86 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0;
87
88 virtual void
90
91 virtual void
93 const XalanDOMString& s,
95 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0;
96
97 // Output functions which are new...
98
99#if !defined(XALAN_BOOL_AS_INT)
100 virtual void
101 print(bool b) = 0;
102#endif
103
104 virtual void
105 print(char c) = 0;
106
107 virtual void
109 const char* s,
110 size_t theLength = npos) = 0;
111
112 virtual void
114 const XalanDOMChar* s,
115 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0;
116
117 virtual void
118 print(double d) = 0;
119
120 virtual void
122
123 virtual void
125
126 virtual void
127 print(const XalanDOMString& s) = 0;
128
129 virtual void
130 println() = 0;
131
132#if !defined(XALAN_BOOL_AS_INT)
133 virtual void
134 println(bool b) = 0;
135#endif
136
137 virtual void
138 println(char x) = 0;
139
140 virtual void
142 const char* s,
143 size_t theLength = npos) = 0;
144
145 virtual void
147 const XalanDOMChar* s,
148 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0;
149
150 virtual void
151 println(double x) = 0;
152
153 virtual void
155
156 virtual void
158
159 virtual void
161
162protected:
163
164 const bool m_fAutoFlush;
165
166 MemoryManager& m_memoryManager;
167
168 // Some static strings to help derived classes...
169 static const XalanDOMChar s_trueString[];
170
171 static const XalanDOMChar s_falseString[];
172
173 static const XalanDOMChar s_newlineString[];
174
175private:
176
177 // Not implemented
178 PrintWriter(const PrintWriter&);
179
181 operator=(const PrintWriter&);
182
183 bool
184 operator==(const PrintWriter&);
185};
186
187
188
189}
190
191
192
193#endif // PRINTWRITER_HEADER_GUARD_1357924680
#define XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_DEFAULT_MEMMGR
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual void println(char x)=0
virtual void write(const char *s, size_t theOffset=0, size_t theLength=npos)=0
Writes a string.
virtual void write(const XalanDOMString &s, XalanDOMString::size_type theOffset=0, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
Writes a string.
virtual void write(XalanDOMChar c)=0
Writes a character.
virtual void write(const XalanDOMChar *s, XalanDOMString::size_type theOffset=0, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
Writes a string.
virtual ~PrintWriter()
virtual void print(const XalanDOMChar *s, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
virtual void print(XMLInt64 l)=0
virtual void println(bool b)=0
virtual bool checkError() const =0
Flush the stream, then check the error status.
virtual void println(const XalanDOMChar *s, XalanDOMString::size_type theLength=XalanDOMString::npos)=0
virtual void println(XMLInt64 x)=0
virtual void println(double x)=0
virtual void print(const XalanDOMString &s)=0
PrintWriter(bool fAutoFlush=false, MemoryManager &theManager XALAN_DEFAULT_MEMMGR)
Constructor.
virtual void print(bool b)=0
virtual void flush()=0
Flush the stream.
virtual void print(char c)=0
virtual void print(const char *s, size_t theLength=npos)=0
virtual void println(const XalanDOMString &s)=0
MemoryManager & m_memoryManager
MemoryManager & getMemoryManager()
virtual void close()=0
Close the stream.
virtual void println(const char *s, size_t theLength=npos)=0
virtual void println(XMLInt32 x)=0
virtual void print(XMLInt32 i)=0
virtual void print(double d)=0
virtual void println()=0
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)