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(XALANSTDOUTPUTSTREAM_HEADER_GUARD_1357924680) 00019 #define XALANSTDOUTPUTSTREAM_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp> 00025 00026 00027 00028 #if defined(XALAN_CLASSIC_IOSTREAMS) 00029 #include <iostream.h> 00030 #else 00031 #include <iosfwd> 00032 #include <ios> 00033 #endif 00034 00035 00036 00037 // Base class header file. 00038 #include <xalanc/PlatformSupport/XalanOutputStream.hpp> 00039 00040 00041 00042 XALAN_CPP_NAMESPACE_BEGIN 00043 00044 00045 00046 // A base class for all text output streams. 00047 class XALAN_PLATFORMSUPPORT_EXPORT XalanStdOutputStream : public XalanOutputStream 00048 { 00049 public: 00050 00051 #if defined(XALAN_NO_STD_NAMESPACE) 00052 typedef ostream StreamType; 00053 #else 00054 typedef std::ostream StreamType; 00055 #endif 00056 00057 #if defined(XALAN_CLASSIC_IOSTREAMS) 00058 typedef int StreamSizeType; 00059 #else 00060 #if defined(XALAN_NO_STD_NAMESPACE) 00061 typedef streamsize StreamSizeType; 00062 #else 00063 typedef std::streamsize StreamSizeType; 00064 #endif 00065 #endif 00066 00067 /** 00068 * Construct a XalanStdOutputStream instance for output to the 00069 * standard output device. 00070 * 00071 * @param theOutputStream output stream to use 00072 */ 00073 XalanStdOutputStream(StreamType& theOutputStream, 00074 MemoryManager& theManager XALAN_DEFAULT_MEMMGR); 00075 00076 static XalanStdOutputStream* 00077 create( StreamType& theOutputStream, 00078 MemoryManager& theManager); 00079 00080 virtual 00081 ~XalanStdOutputStream(); 00082 00083 #if defined(XALAN_NEWLINE_IS_CRLF) 00084 virtual void 00085 newline(); 00086 00087 virtual const XalanDOMChar* 00088 getNewlineString() const; 00089 #endif 00090 00091 00092 class XALAN_PLATFORMSUPPORT_EXPORT XalanStdOutputStreamWriteException : public XalanOutputStream::XalanOutputStreamException 00093 { 00094 public: 00095 00096 XalanStdOutputStreamWriteException(int theErrorCode, 00097 XalanDOMString& theResult); 00098 00099 virtual 00100 ~XalanStdOutputStreamWriteException(); 00101 00102 virtual const XalanDOMChar* 00103 getType() const 00104 { 00105 return m_type; 00106 } 00107 00108 private: 00109 00110 static const XalanDOMChar m_type[]; 00111 00112 }; 00113 00114 protected: 00115 00116 virtual void 00117 writeData( 00118 const char* theBuffer, 00119 size_type theBufferLength); 00120 00121 virtual void 00122 doFlush(); 00123 00124 private: 00125 00126 // These are not implemented... 00127 XalanStdOutputStream(const XalanStdOutputStream&); 00128 00129 XalanStdOutputStream& 00130 operator=(const XalanStdOutputStream&); 00131 00132 // Data members... 00133 StreamType& m_outputStream; 00134 00135 #if defined(XALAN_NEWLINE_IS_CRLF) 00136 const XalanDOMChar* m_newlineString; 00137 00138 XalanDOMString::size_type m_newlineStringLength; 00139 #endif 00140 }; 00141 00142 00143 00144 XALAN_CPP_NAMESPACE_END 00145 00146 00147 00148 #endif // XERCESSTDTEXTOUTPUTSTREAM_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 |
|