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  

XSLTResultTarget.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 
00017 #if !defined(XALAN_XSLTRESULTTARGET_HEADER_GUARD)
00018 #define XALAN_XSLTRESULTTARGET_HEADER_GUARD
00019 
00020 // Base include file.  Must be first.
00021 #include "XSLTDefinitions.hpp"
00022 
00023 
00024 
00025 #include <cstdio>
00026 #if defined(XALAN_CLASSIC_IOSTREAMS)
00027 class ostream;
00028 #else
00029 #include <iosfwd>
00030 #endif
00031 
00032 
00033 
00034 #include <xalanc/XalanDOM/XalanDOMString.hpp>
00035 
00036 
00037 
00038 XALAN_CPP_NAMESPACE_BEGIN
00039 
00040 
00041 
00042 class FormatterListener;
00043 class Writer;
00044 
00045 
00046 
00047 class XALAN_XSLT_EXPORT XSLTResultTarget
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_STRICT_ANSI_HEADERS)
00058     typedef std::FILE   FILE;
00059 #endif
00060 
00061 
00062     explicit
00063     XSLTResultTarget(MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00064 
00070     XSLTResultTarget(const XalanDOMString&  fileName,
00071                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00072 
00078     XSLTResultTarget(const XalanDOMChar*    fileName,
00079                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00080 
00086     XSLTResultTarget(const char*    fileName,
00087                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00088 
00094     XSLTResultTarget(StreamType*    theStream,
00095                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00096 
00102     XSLTResultTarget(StreamType&    theStream,
00103                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00104  
00111     XSLTResultTarget(Writer*    characterStream,
00112                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00113  
00120     XSLTResultTarget(FILE*  characterStream,
00121                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00122 
00128     XSLTResultTarget(FormatterListener&     flistener,
00129                     MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00130 
00131     XSLTResultTarget(const XSLTResultTarget& other,
00132                     MemoryManagerType&      theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
00133     ~XSLTResultTarget();
00134 
00140     void
00141     setFileName(const char*     fileName)
00142     {
00143         if (fileName == 0)
00144         {
00145             m_fileName.clear();
00146         }
00147         else
00148         {
00149             m_fileName = fileName;
00150         }
00151     }
00152 
00158     void
00159     setFileName(const XalanDOMString&   fileName)
00160     {
00161         m_fileName = fileName;
00162     }
00163 
00169     const XalanDOMString&
00170     getFileName() const
00171     {
00172         return m_fileName;
00173     }
00174 
00181     void
00182     setByteStream(StreamType*           byteStream)
00183     {
00184         m_byteStream = byteStream;
00185     }
00186 
00192     StreamType*
00193     getByteStream() const
00194     {
00195         return m_byteStream;
00196     }
00197 
00203     void
00204     setEncoding(const XalanDOMChar*     encoding)
00205     {
00206         if (encoding == 0)
00207         {
00208             m_encoding.clear();
00209         }
00210         else
00211         {
00212             m_encoding = encoding;
00213         }
00214     }
00215 
00221     void
00222     setEncoding(const XalanDOMString&   encoding)
00223     {
00224         m_encoding = encoding;
00225     }
00226 
00232     const XalanDOMString&
00233     getEncoding() const
00234     {
00235         return m_encoding;
00236     }
00237 
00244     void
00245     setCharacterStream(Writer*  characterStream)
00246     {
00247         m_characterStream = characterStream;
00248     }
00249 
00255     Writer*
00256     getCharacterStream() const
00257     {
00258         return m_characterStream;
00259     }
00260 
00266     FILE*
00267     getStream() const
00268     {
00269         return m_stream;
00270     }
00271 
00277     void
00278     setStream(FILE*     theStream)
00279     {
00280         m_stream = theStream;
00281     }
00282 
00288     void
00289     setFormatterListener(FormatterListener*     handler)
00290     {
00291         m_formatterListener = handler;
00292     }
00293 
00299     FormatterListener*
00300     getFormatterListener() const
00301     {
00302         return m_formatterListener;
00303     }
00304 
00305 private:
00306 
00307 #if defined(XALAN_DEVELOPMENT)
00308     XSLTResultTarget();
00309     XSLTResultTarget(const XSLTResultTarget&);
00310 #endif
00311 
00312     XalanDOMString          m_fileName;
00313 
00314     StreamType*             m_byteStream;
00315 
00316     XalanDOMString          m_encoding;
00317 
00318     Writer*                 m_characterStream;
00319 
00320     FormatterListener*      m_formatterListener;
00321 
00322     FILE*                   m_stream;
00323 };
00324 
00325 
00326 
00327 XALAN_CPP_NAMESPACE_END
00328 
00329 
00330 
00331 #endif  // XALAN_XSLTRESULTTARGET_HEADER_GUARD

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