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