Xalan-C++ API Reference 1.12.0
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#include <iosfwd>
29#include <ios>
30
31
32
33// Base class header file.
35
36
37
38namespace XALAN_CPP_NAMESPACE {
39
40
41
42// A base class for all text output streams.
44{
45public:
46
47 typedef std::ostream StreamType;
48
49 typedef std::streamsize StreamSizeType;
50
51 /**
52 * Construct a XalanStdOutputStream instance for output to the
53 * standard output device.
54 *
55 * @param theOutputStream output stream to use
56 */
58 MemoryManager& theManager XALAN_DEFAULT_MEMMGR);
59
62 MemoryManager& theManager);
63
64 virtual
66
67#if defined(XALAN_NEWLINE_IS_CRLF)
68 virtual void
69 newline();
70
71 virtual const XalanDOMChar*
72 getNewlineString() const;
73#endif
74
75
77 {
78 public:
79
82
83 virtual
85
86 virtual const XalanDOMChar*
87 getType() const
88 {
89 return m_type;
90 }
91
92 private:
93
94 static const XalanDOMChar m_type[];
95
96 };
97
98protected:
99
100 virtual void
102 const char* theBuffer,
104
105 virtual void
107
108private:
109
110 // These are not implemented...
112
114 operator=(const XalanStdOutputStream&);
115
116 // Data members...
117 StreamType& m_outputStream;
118
119#if defined(XALAN_NEWLINE_IS_CRLF)
120 const XalanDOMChar* m_newlineString;
121
122 XalanDOMString::size_type m_newlineStringLength;
123#endif
124};
125
126
127
128}
129
130
131
132#endif // XERCESSTDTEXTOUTPUTSTREAM_HEADER_GUARD_1357924680
#define XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_DEFAULT_MEMMGR
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
XalanTranscodingServices::size_type size_type
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
XalanStdOutputStreamWriteException(int theErrorCode, XalanDOMString &theResult)
virtual void doFlush()
Flush the stream.
virtual void writeData(const char *theBuffer, size_type theBufferLength)
Write the data in the buffer.
XalanStdOutputStream(StreamType &theOutputStream, MemoryManager &theManager XALAN_DEFAULT_MEMMGR)
Construct a XalanStdOutputStream instance for output to the standard output device.
static XalanStdOutputStream * create(StreamType &theOutputStream, MemoryManager &theManager)