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(WRITER_HEADER_GUARD_1357924680) 00019 #define WRITER_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00025 00026 00027 00028 #include <cstddef> 00029 00030 00031 00032 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00033 00034 00035 00036 XALAN_CPP_NAMESPACE_BEGIN 00037 00038 00039 00040 class XalanOutputStream; 00041 00042 00043 00044 class XALAN_PLATFORMSUPPORT_EXPORT Writer 00045 { 00046 public: 00047 00048 Writer(); 00049 00050 virtual 00051 ~Writer(); 00052 00053 /** 00054 * Close the stream 00055 */ 00056 virtual void 00057 close() = 0; 00058 00059 /** 00060 * Flush the stream 00061 */ 00062 virtual void 00063 flush() = 0; 00064 00065 /** 00066 * Get the stream associated with the writer... 00067 */ 00068 virtual XalanOutputStream* 00069 getStream(); 00070 00071 /** 00072 * Get the stream associated with the writer... 00073 */ 00074 virtual const XalanOutputStream* 00075 getStream() const; 00076 00077 00078 // Output functions 00079 00080 #if defined(XALAN_INLINE_INITIALIZATION) 00081 static const size_t npos = ~0u; 00082 #else 00083 static const size_t npos; 00084 #endif 00085 00086 /** 00087 * Writes a string 00088 * 00089 * @param s string to write 00090 * @param theOffset starting offset in string to begin writing, default 0 00091 * @param theLength number of characters to write. If the length is npos, then the array is assumed to be null-terminated. 00092 */ 00093 virtual void 00094 write( 00095 const char* s, 00096 size_t theOffset = 0, 00097 size_t theLength = npos) = 0; 00098 00099 /** 00100 * Writes a string 00101 * 00102 * @param s string to write 00103 * @param theOffset starting offset in string to begin writing, default 0 00104 * @param theLength number of characters to write. If the length is XalanDOMString::npos, then the array is assumed to be null-terminated. 00105 */ 00106 virtual void 00107 write( 00108 const XalanDOMChar* s, 00109 XalanDOMString::size_type theOffset = 0, 00110 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00111 00112 /** 00113 * Writes a character 00114 * 00115 * @param c character to write 00116 */ 00117 virtual void 00118 write(XalanDOMChar c) = 0; 00119 00120 /** 00121 * Writes a string 00122 * 00123 * @param s string to write 00124 * @param theOffset starting offset in string to begin writing, default 0 00125 * @param theLength number of characters to write. If the length is XalanDOMString::npos, then the entire string is printed. 00126 */ 00127 virtual void 00128 write( 00129 const XalanDOMString& s, 00130 XalanDOMString::size_type theOffset = 0, 00131 XalanDOMString::size_type theLength = XalanDOMString::npos) = 0; 00132 00133 private: 00134 00135 // Not implemented 00136 Writer(const Writer&); 00137 00138 Writer& 00139 operator=(const Writer&); 00140 00141 bool 00142 operator==(const Writer&); 00143 }; 00144 00145 00146 00147 XALAN_CPP_NAMESPACE_END 00148 00149 00150 00151 #endif // WRITER_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 |
|