Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

XalanStdOutputStream.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2004 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #if !defined(XALANSTDOUTPUTSTREAM_HEADER_GUARD_1357924680)
00017 #define XALANSTDOUTPUTSTREAM_HEADER_GUARD_1357924680
00018 
00019 
00020 
00021 // Base include file.  Must be first.
00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
00023 
00024 
00025 
00026 #if defined(XALAN_CLASSIC_IOSTREAMS)
00027 #include <iostream.h>
00028 #else
00029 #include <iosfwd>
00030 #include <ios>
00031 #endif
00032 
00033 
00034 
00035 // Base class header file.
00036 #include <xalanc/PlatformSupport/XalanOutputStream.hpp>
00037 
00038 
00039 
00040 XALAN_CPP_NAMESPACE_BEGIN
00041 
00042 
00043 
00044 // A base class for all text output streams.
00045 class XALAN_PLATFORMSUPPORT_EXPORT XalanStdOutputStream : public XalanOutputStream
00046 {
00047 public:
00048 
00049 #if defined(XALAN_NO_STD_NAMESPACE)
00050     typedef ostream             StreamType;
00051 #else
00052     typedef std::ostream        StreamType;
00053 #endif
00054 
00055 #if defined(XALAN_CLASSIC_IOSTREAMS)
00056     typedef int                 StreamSizeType;
00057 #else
00058 #if defined(XALAN_NO_STD_NAMESPACE)
00059     typedef streamsize          StreamSizeType;
00060 #else
00061     typedef std::streamsize     StreamSizeType;
00062 #endif
00063 #endif
00064 
00071     XalanStdOutputStream(StreamType&    theOutputStream);
00072 
00073     virtual
00074     ~XalanStdOutputStream();
00075 
00076 #if defined(XALAN_NEWLINE_IS_CRLF)
00077     virtual void
00078     newline();
00079 
00080     virtual const XalanDOMChar*
00081     getNewlineString() const;
00082 #endif
00083 
00084 
00085     class XALAN_PLATFORMSUPPORT_EXPORT XalanStdOutputStreamWriteException : public XalanOutputStream::XalanOutputStreamException
00086     {
00087     public:
00088 
00089         XalanStdOutputStreamWriteException(int  theErrorCode);
00090 
00091         virtual
00092         ~XalanStdOutputStreamWriteException();
00093     };
00094 
00095 protected:
00096 
00097     virtual void
00098     writeData(
00099             const char*     theBuffer,
00100             size_type       theBufferLength);
00101 
00102     virtual void
00103     doFlush();
00104 
00105 private:
00106 
00107     // These are not implemented...
00108     XalanStdOutputStream(const XalanStdOutputStream&);
00109 
00110     XalanStdOutputStream&
00111     operator=(const XalanStdOutputStream&);
00112 
00113     // Data members...
00114     StreamType&                 m_outputStream;
00115 
00116 #if defined(XALAN_NEWLINE_IS_CRLF)
00117     const XalanDOMChar*         m_newlineString;
00118 
00119     XalanDOMString::size_type   m_newlineStringLength;
00120 #endif
00121 };
00122 
00123 
00124 
00125 XALAN_CPP_NAMESPACE_END
00126 
00127 
00128 
00129 #endif  // XERCESSTDTEXTOUTPUTSTREAM_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.8
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.