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(PRINTWRITER_HEADER_GUARD_1357924680) 00019 #define PRINTWRITER_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00025 00026 00027 00028 // Base class header file. 00029 #include <xalanc/PlatformSupport/Writer.hpp> 00030 00031 00032 00033 XALAN_CPP_NAMESPACE_BEGIN 00034 00035 00036 00037 class XALAN_PLATFORMSUPPORT_EXPORT PrintWriter : public Writer 00038 { 00039 public: 00040 00041 /** 00042 * Constructor 00043 * 00044 * @param fAutoFlush if true, the output will not be buffered 00045 */ 00046 PrintWriter( bool fAutoFlush = false, MemoryManager& theManager XALAN_DEFAULT_MEMMGR); 00047 00048 MemoryManager& 00049 getMemoryManager() 00050 { 00051 return m_memoryManager; 00052 } 00053 00054 virtual 00055 ~PrintWriter(); 00056 00057 /** 00058 * Flush the stream, then check the error status. 00059 * 00060 * @return true if no errors 00061 */ 00062 virtual bool 00063 checkError() const = 0; 00064 00065 // Functions inherited from Writer... 00066 00067 virtual void 00068 close() = 0; 00069 00070 virtual void 00071 flush() = 0; 00072 00073 00074 // Output functions inherited from Writer... 00075 00076 virtual void 00077 write( 00078 const char* s, 00079 size_t theOffset = 0, 00080 size_t theLength = npos) = 0; 00081 00082 virtual void 00083 write( 00084 const XalanDOMChar* s, 00085 XalanDOMString::size_type theOffset = 0, 00086 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00087 00088 virtual void 00089 write(XalanDOMChar c) = 0; 00090 00091 virtual void 00092 write( 00093 const XalanDOMString& s, 00094 XalanDOMString::size_type theOffset = 0, 00095 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00096 00097 // Output functions which are new... 00098 00099 #if !defined(XALAN_BOOL_AS_INT) 00100 virtual void 00101 print(bool b) = 0; 00102 #endif 00103 00104 virtual void 00105 print(char c) = 0; 00106 00107 virtual void 00108 print( 00109 const char* s, 00110 size_t theLength = npos) = 0; 00111 00112 virtual void 00113 print( 00114 const XalanDOMChar* s, 00115 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00116 00117 virtual void 00118 print(double d) = 0; 00119 00120 virtual void 00121 print(int i) = 0; 00122 00123 virtual void 00124 print(long l) = 0; 00125 00126 virtual void 00127 print(const XalanDOMString& s) = 0; 00128 00129 virtual void 00130 println() = 0; 00131 00132 #if !defined(XALAN_BOOL_AS_INT) 00133 virtual void 00134 println(bool b) = 0; 00135 #endif 00136 00137 virtual void 00138 println(char x) = 0; 00139 00140 virtual void 00141 println( 00142 const char* s, 00143 size_t theLength = npos) = 0; 00144 00145 virtual void 00146 println( 00147 const XalanDOMChar* s, 00148 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00149 00150 virtual void 00151 println(double x) = 0; 00152 00153 virtual void 00154 println(int x) = 0; 00155 00156 virtual void 00157 println(long x) = 0; 00158 00159 virtual void 00160 println(const XalanDOMString& s) = 0; 00161 00162 protected: 00163 00164 const bool m_fAutoFlush; 00165 00166 MemoryManager& m_memoryManager; 00167 00168 // Some static strings to help derived classes... 00169 static const XalanDOMChar s_trueString[]; 00170 00171 static const XalanDOMChar s_falseString[]; 00172 00173 static const XalanDOMChar s_newlineString[]; 00174 00175 private: 00176 00177 // Not implemented 00178 PrintWriter(const PrintWriter&); 00179 00180 PrintWriter& 00181 operator=(const PrintWriter&); 00182 00183 bool 00184 operator==(const PrintWriter&); 00185 }; 00186 00187 00188 00189 XALAN_CPP_NAMESPACE_END 00190 00191 00192 00193 #endif // PRINTWRITER_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 |
|