Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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                          MemoryManagerType&  theManager XALAN_DEFAULT_MEMMGR);
00073 
00074     static XalanStdOutputStream*
00075     create( StreamType& theOutputStream,
00076             MemoryManagerType&  theManager);
00077 
00078     virtual
00079     ~XalanStdOutputStream();
00080 
00081 #if defined(XALAN_NEWLINE_IS_CRLF)
00082     virtual void
00083     newline();
00084 
00085     virtual const XalanDOMChar*
00086     getNewlineString() const;
00087 #endif
00088 
00089 
00090     class XALAN_PLATFORMSUPPORT_EXPORT XalanStdOutputStreamWriteException : public XalanOutputStream::XalanOutputStreamException
00091     {
00092     public:
00093 
00094         XalanStdOutputStreamWriteException(int  theErrorCode,
00095                                             XalanDOMString&     theResult);
00096 
00097         virtual
00098         ~XalanStdOutputStreamWriteException();
00099 
00100         virtual const XalanDOMChar*
00101         getType() const
00102         {
00103             return m_type;
00104         }
00105 
00106     private:
00107 
00108         static const XalanDOMChar   m_type[];
00109 
00110     };
00111 
00112 protected:
00113 
00114     virtual void
00115     writeData(
00116             const char*     theBuffer,
00117             size_type       theBufferLength);
00118 
00119     virtual void
00120     doFlush();
00121 
00122 private:
00123 
00124     // These are not implemented...
00125     XalanStdOutputStream(const XalanStdOutputStream&);
00126 
00127     XalanStdOutputStream&
00128     operator=(const XalanStdOutputStream&);
00129 
00130     // Data members...
00131     StreamType&                 m_outputStream;
00132 
00133 #if defined(XALAN_NEWLINE_IS_CRLF)
00134     const XalanDOMChar*         m_newlineString;
00135 
00136     XalanDOMString::size_type   m_newlineStringLength;
00137 #endif
00138 };
00139 
00140 
00141 
00142 XALAN_CPP_NAMESPACE_END
00143 
00144 
00145 
00146 #endif  // XERCESSTDTEXTOUTPUTSTREAM_HEADER_GUARD_1357924680

Interpreting class diagrams

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

dot

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

Apache Logo