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(DOMSTRING_PRINTWRITER_HEADER_GUARD_1357924680) 00019 #define DOMSTRING_PRINTWRITER_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/PlatformSupport/PrintWriter.hpp> 00029 00030 00031 00032 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00033 00034 00035 00036 XALAN_CPP_NAMESPACE_BEGIN 00037 00038 00039 00040 class XALAN_PLATFORMSUPPORT_EXPORT DOMStringPrintWriter : public PrintWriter 00041 { 00042 public: 00043 00044 DOMStringPrintWriter(XalanDOMString& theString); 00045 00046 virtual 00047 ~DOMStringPrintWriter(); 00048 00049 XalanDOMString& 00050 getString() const 00051 { 00052 return *m_outputString; 00053 } 00054 00055 void 00056 setString(XalanDOMString& newString) 00057 { 00058 m_outputString = &newString; 00059 } 00060 00061 // Output functions inherited from PrintWriter... 00062 00063 virtual bool 00064 checkError() const; 00065 00066 virtual void 00067 close(); 00068 00069 virtual void 00070 flush(); 00071 00072 virtual void 00073 write( 00074 const char* s, 00075 size_t theOffset = 0, 00076 size_t theLength = npos); 00077 00078 virtual void 00079 write( 00080 const XalanDOMChar* s, 00081 XalanDOMString::size_type theOffset = 0, 00082 XalanDOMString::size_type theLength = XalanDOMString::npos); 00083 00084 virtual void 00085 write(XalanDOMChar c); 00086 00087 virtual void 00088 write( 00089 const XalanDOMString& s, 00090 XalanDOMString::size_type theOffset = 0, 00091 XalanDOMString::size_type theLength = XalanDOMString::npos); 00092 00093 #if !defined(XALAN_BOOL_AS_INT) 00094 virtual void 00095 print(bool b); 00096 #endif 00097 00098 virtual void 00099 print(char c); 00100 00101 virtual void 00102 print( 00103 const char* s, 00104 size_t theLength = npos); 00105 00106 virtual void 00107 print( 00108 const XalanDOMChar* s, 00109 XalanDOMString::size_type theLength = XalanDOMString::npos); 00110 00111 virtual void 00112 print(double d); 00113 00114 virtual void 00115 print(int i); 00116 00117 virtual void 00118 print(long l); 00119 00120 virtual void 00121 print(const XalanDOMString& s); 00122 00123 virtual void 00124 println(); 00125 00126 #if !defined(XALAN_BOOL_AS_INT) 00127 virtual void 00128 println(bool x); 00129 #endif 00130 00131 virtual void 00132 println(char x); 00133 00134 virtual void 00135 println( 00136 const char* s, 00137 size_t theLength = npos); 00138 00139 virtual void 00140 println( 00141 const XalanDOMChar* s, 00142 XalanDOMString::size_type theLength = XalanDOMString::npos); 00143 00144 virtual void 00145 println(double x); 00146 00147 virtual void 00148 println(int x); 00149 00150 virtual void 00151 println(long x); 00152 00153 virtual void 00154 println(const XalanDOMString& s); 00155 00156 protected: 00157 00158 XalanDOMString* m_outputString; 00159 00160 private: 00161 00162 // Not implemented 00163 DOMStringPrintWriter(const DOMStringPrintWriter&); 00164 00165 DOMStringPrintWriter& 00166 operator=(const DOMStringPrintWriter&); 00167 00168 bool 00169 operator==(const DOMStringPrintWriter&); 00170 }; 00171 00172 00173 00174 XALAN_CPP_NAMESPACE_END 00175 00176 00177 00178 #endif // DOMSTRING_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 |
|