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(XALANFSTREAMOUTPUTSTREAM_HEADER_GUARD_1357924680) 00019 #define XALANFSTREAMOUTPUTSTREAM_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00025 00026 00027 00028 #include <cstdio> 00029 00030 00031 00032 // Base class header file. 00033 #include <xalanc/PlatformSupport/XalanOutputStream.hpp> 00034 00035 00036 00037 XALAN_CPP_NAMESPACE_BEGIN 00038 00039 #if defined(XALAN_STRICT_ANSI_HEADERS) 00040 using std::FILE; 00041 #endif 00042 00043 class XALAN_PLATFORMSUPPORT_EXPORT XalanFStreamOutputStream : public XalanOutputStream 00044 { 00045 public : 00046 00047 enum { eDefaultBufferSize = 8192u }; 00048 00049 00050 /** 00051 * Construct a XalanFStreamOutputStream object. 00052 * 00053 * @param theHandle handle of file. Must not be null. 00054 * @param theBufferSize The size of the transcoding buffer 00055 */ 00056 XalanFStreamOutputStream( 00057 FILE* theFileHandle, 00058 MemoryManager& theManager, 00059 size_type theBufferSize = eDefaultBufferSize); 00060 00061 static XalanFStreamOutputStream* 00062 create( 00063 FILE* theFileHandle, 00064 MemoryManager& theManager, 00065 size_type theBufferSize = eDefaultBufferSize); 00066 00067 virtual 00068 ~XalanFStreamOutputStream(); 00069 00070 class XALAN_PLATFORMSUPPORT_EXPORT XalanFStreamOutputStreamWriteException : public XalanOutputStream::XalanOutputStreamException 00071 { 00072 public: 00073 00074 /** 00075 * Construct an XalanFStreamOutputStreamWriteException exception object for an exception 00076 * that occurred while writing to a file stream. 00077 * 00078 * @param theErrorCode number of error encountered 00079 */ 00080 XalanFStreamOutputStreamWriteException( 00081 int theErrorCode, 00082 XalanDOMString& theBuffer); 00083 00084 virtual 00085 ~XalanFStreamOutputStreamWriteException(); 00086 00087 virtual const XalanDOMChar* 00088 getType() const 00089 { 00090 return m_type; 00091 } 00092 00093 private: 00094 static const XalanDOMChar m_type[]; 00095 }; 00096 00097 protected: 00098 00099 virtual void 00100 writeData( 00101 const char* theBuffer, 00102 size_type theBufferLength); 00103 00104 virtual void 00105 doFlush(); 00106 00107 private: 00108 00109 // These are not implemented... 00110 XalanFStreamOutputStream(const XalanFStreamOutputStream&); 00111 00112 XalanFStreamOutputStream& 00113 operator=(const XalanFStreamOutputStream&); 00114 00115 bool 00116 operator==(const XalanFStreamOutputStream&) const; 00117 00118 00119 // Data members... 00120 FILE* const m_handle; 00121 }; 00122 00123 00124 00125 XALAN_CPP_NAMESPACE_END 00126 00127 00128 00129 #endif // XALANFSTREAMOUTPUTSTREAM_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 |
|