Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

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

dot

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

Apache Logo