00001 /* 00002 * Copyright 1999-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #if !defined(XALANOUTPUTSTREAMPRINTWRITER_HEADER_GUARD_1357924680) 00017 #define XALANOUTPUTSTREAMPRINTWRITER_HEADER_GUARD_1357924680 00018 00019 00020 00021 // Base include file. Must be first. 00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00023 00024 00025 00026 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00027 00028 00029 00030 #include <xalanc/PlatformSupport/PrintWriter.hpp> 00031 00032 00033 00034 XALAN_CPP_NAMESPACE_BEGIN 00035 00036 00037 00038 class XalanOutputStream; 00039 00040 00041 00042 class XALAN_PLATFORMSUPPORT_EXPORT XalanOutputStreamPrintWriter : public PrintWriter 00043 { 00044 public: 00045 00052 XalanOutputStreamPrintWriter( 00053 XalanOutputStream& theOutputStream, 00054 bool fAutoFlush = false); 00055 00056 static XalanOutputStreamPrintWriter* 00057 create( 00058 XalanOutputStream& theOutputStream, 00059 bool fAutoFlush = false); 00060 00061 virtual 00062 ~XalanOutputStreamPrintWriter(); 00063 00064 00065 virtual bool 00066 checkError() const; 00067 00068 virtual void 00069 close(); 00070 00071 virtual void 00072 flush(); 00073 00074 virtual XalanOutputStream* 00075 getStream(); 00076 00077 virtual const XalanOutputStream* 00078 getStream() const; 00079 00080 00081 virtual void 00082 write( 00083 const char* s, 00084 size_t theOffset = 0, 00085 size_t theLength = npos); 00086 00087 virtual void 00088 write( 00089 const XalanDOMChar* s, 00090 XalanDOMString::size_type theOffset = 0, 00091 XalanDOMString::size_type theLength = XalanDOMString::npos); 00092 00093 virtual void 00094 write(XalanDOMChar c); 00095 00096 virtual void 00097 write( 00098 const XalanDOMString& s, 00099 XalanDOMString::size_type theOffset = 0, 00100 XalanDOMString::size_type theLength = XalanDOMString::npos); 00101 00102 #if !defined(XALAN_BOOL_AS_INT) 00103 virtual void 00104 print(bool b); 00105 #endif 00106 00107 virtual void 00108 print(char c); 00109 00110 virtual void 00111 print( 00112 const char* s, 00113 size_t theLength = npos); 00114 00115 virtual void 00116 print( 00117 const XalanDOMChar* s, 00118 XalanDOMString::size_type theLength = XalanDOMString::npos); 00119 00120 virtual void 00121 print(double d); 00122 00123 virtual void 00124 print(int i); 00125 00126 virtual void 00127 print(long l); 00128 00129 virtual void 00130 print(const XalanDOMString& s); 00131 00132 virtual void 00133 println(); 00134 00135 #if !defined(XALAN_BOOL_AS_INT) 00136 virtual void 00137 println(bool x); 00138 #endif 00139 00140 virtual void 00141 println(char x); 00142 00143 virtual void 00144 println( 00145 const char* s, 00146 size_t theLength = npos); 00147 00148 virtual void 00149 println( 00150 const XalanDOMChar* s, 00151 XalanDOMString::size_type theLength = XalanDOMString::npos); 00152 00153 virtual void 00154 println(double x); 00155 00156 virtual void 00157 println(int x); 00158 00159 virtual void 00160 println(long x); 00161 00162 virtual void 00163 println(const XalanDOMString& s); 00164 00165 private: 00166 00167 void 00168 flushWideChars(); 00169 00170 00171 // Not implemented 00172 XalanOutputStreamPrintWriter(const XalanOutputStreamPrintWriter&); 00173 00174 XalanOutputStreamPrintWriter& 00175 operator=(const XalanOutputStreamPrintWriter&); 00176 00177 bool 00178 operator==(const XalanOutputStreamPrintWriter&); 00179 00180 // Data members... 00181 XalanOutputStream& m_outputStream; 00182 00183 XalanDOMString m_buffer; 00184 00185 bool m_flushWideChars; 00186 }; 00187 00188 00189 00190 XALAN_CPP_NAMESPACE_END 00191 00192 00193 00194 #endif // XALANOUTPUTSTREAMPRINTWRITER_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.10 |
|