Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XalanStdOutputStream.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALANSTDOUTPUTSTREAM_HEADER_GUARD_1357924680)
19 #define XALANSTDOUTPUTSTREAM_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 #if defined(XALAN_CLASSIC_IOSTREAMS)
29 #include <iostream.h>
30 #else
31 #include <iosfwd>
32 #include <ios>
33 #endif
34 
35 
36 
37 // Base class header file.
39 
40 
41 
42 XALAN_CPP_NAMESPACE_BEGIN
43 
44 
45 
46 // A base class for all text output streams.
48 {
49 public:
50 
51 #if defined(XALAN_NO_STD_NAMESPACE)
52  typedef ostream StreamType;
53 #else
54  typedef std::ostream StreamType;
55 #endif
56 
57 #if defined(XALAN_CLASSIC_IOSTREAMS)
58  typedef int StreamSizeType;
59 #else
60 #if defined(XALAN_NO_STD_NAMESPACE)
61  typedef streamsize StreamSizeType;
62 #else
63  typedef std::streamsize StreamSizeType;
64 #endif
65 #endif
66 
67  /**
68  * Construct a XalanStdOutputStream instance for output to the
69  * standard output device.
70  *
71  * @param theOutputStream output stream to use
72  */
73  XalanStdOutputStream(StreamType& theOutputStream,
74  MemoryManager& theManager XALAN_DEFAULT_MEMMGR);
75 
76  static XalanStdOutputStream*
77  create( StreamType& theOutputStream,
78  MemoryManager& theManager);
79 
80  virtual
82 
83 #if defined(XALAN_NEWLINE_IS_CRLF)
84  virtual void
85  newline();
86 
87  virtual const XalanDOMChar*
88  getNewlineString() const;
89 #endif
90 
91 
93  {
94  public:
95 
96  XalanStdOutputStreamWriteException(int theErrorCode,
97  XalanDOMString& theResult);
98 
99  virtual
101 
102  virtual const XalanDOMChar*
103  getType() const
104  {
105  return m_type;
106  }
107 
108  private:
109 
110  static const XalanDOMChar m_type[];
111 
112  };
113 
114 protected:
115 
116  virtual void
117  writeData(
118  const char* theBuffer,
119  size_type theBufferLength);
120 
121  virtual void
122  doFlush();
123 
124 private:
125 
126  // These are not implemented...
128 
130  operator=(const XalanStdOutputStream&);
131 
132  // Data members...
133  StreamType& m_outputStream;
134 
135 #if defined(XALAN_NEWLINE_IS_CRLF)
136  const XalanDOMChar* m_newlineString;
137 
138  XalanDOMString::size_type m_newlineStringLength;
139 #endif
140 };
141 
142 
143 
144 XALAN_CPP_NAMESPACE_END
145 
146 
147 
148 #endif // XERCESSTDTEXTOUTPUTSTREAM_HEADER_GUARD_1357924680
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
#define XALAN_DEFAULT_MEMMGR
XalanSize_t size_type
XalanTranscodingServices::size_type size_type
virtual void doFlush()=0
Flush the stream.
virtual void newline()
Write the appropriate newline character(s) to the stream.
#define XALAN_PLATFORMSUPPORT_EXPORT
std::streamsize StreamSizeType
virtual const XalanDOMChar * getNewlineString() const
Get the string which is appropriate for inserting a line feed in the stream.
virtual void writeData(const char *theBuffer, size_type theBufferLength)=0
Write the data in the buffer.

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.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo