Xalan-C++ API Reference
1.12.0
xalanc
PlatformSupport
XalanFStreamOutputStream.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(XALANFSTREAMOUTPUTSTREAM_HEADER_GUARD_1357924680)
19
#define XALANFSTREAMOUTPUTSTREAM_HEADER_GUARD_1357924680
20
21
22
23
// Base include file. Must be first.
24
#include <
xalanc/PlatformSupport/PlatformSupportDefinitions.hpp
>
25
26
27
28
#include <cstdio>
29
30
31
32
// Base class header file.
33
#include <
xalanc/PlatformSupport/XalanOutputStream.hpp
>
34
35
36
37
namespace
XALAN_CPP_NAMESPACE
{
38
39
using
std::FILE;
40
41
class
XALAN_PLATFORMSUPPORT_EXPORT
XalanFStreamOutputStream
:
public
XalanOutputStream
42
{
43
public :
44
45
enum
{ eDefaultBufferSize = 8192u };
46
47
48
/**
49
* Construct a XalanFStreamOutputStream object.
50
*
51
* @param theHandle handle of file. Must not be null.
52
* @param theBufferSize The size of the transcoding buffer
53
*/
54
XalanFStreamOutputStream
(
55
FILE* theFileHandle,
56
MemoryManager& theManager,
57
size_type
theBufferSize = eDefaultBufferSize);
58
59
static
XalanFStreamOutputStream
*
60
create(
61
FILE* theFileHandle,
62
MemoryManager& theManager,
63
size_type
theBufferSize = eDefaultBufferSize);
64
65
virtual
66
~
XalanFStreamOutputStream
();
67
68
class
XALAN_PLATFORMSUPPORT_EXPORT
XalanFStreamOutputStreamWriteException
:
public
XalanOutputStream::XalanOutputStreamException
69
{
70
public
:
71
72
/**
73
* Construct an XalanFStreamOutputStreamWriteException exception object for an exception
74
* that occurred while writing to a file stream.
75
*
76
* @param theErrorCode number of error encountered
77
*/
78
XalanFStreamOutputStreamWriteException
(
79
int
theErrorCode,
80
XalanDOMString
& theBuffer);
81
82
virtual
83
~
XalanFStreamOutputStreamWriteException
();
84
85
virtual
const
XalanDOMChar*
86
getType
()
const
87
{
88
return
m_type;
89
}
90
91
private
:
92
static
const
XalanDOMChar m_type[];
93
};
94
95
protected
:
96
97
virtual
void
98
writeData(
99
const
char
* theBuffer,
100
size_type
theBufferLength);
101
102
virtual
void
103
doFlush();
104
105
private
:
106
107
// These are not implemented...
108
XalanFStreamOutputStream
(
const
XalanFStreamOutputStream
&);
109
110
XalanFStreamOutputStream
&
111
operator=(
const
XalanFStreamOutputStream
&);
112
113
bool
114
operator==
(
const
XalanFStreamOutputStream
&)
const
;
115
116
117
// Data members...
118
FILE*
const
m_handle;
119
};
120
121
122
123
}
124
125
126
127
#endif // XALANFSTREAMOUTPUTSTREAM_HEADER_GUARD_1357924680
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition:
XalanVersion.hpp:76
XalanOutputStream.hpp
xalanc::size_type
size_t size_type
Definition:
XalanMap.hpp:46
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition:
XalanVector.hpp:1118
xalanc::XalanOutputStream
Definition:
XalanOutputStream.hpp:49
XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_PLATFORMSUPPORT_EXPORT
Definition:
PlatformSupportDefinitions.hpp:35
PlatformSupportDefinitions.hpp
xalanc::XalanFStreamOutputStream
Definition:
XalanFStreamOutputStream.hpp:41
xalanc::XalanFStreamOutputStream::XalanFStreamOutputStreamWriteException::getType
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
Definition:
XalanFStreamOutputStream.hpp:86
xalanc::XalanOutputStream::XalanOutputStreamException
Definition:
XalanOutputStream.hpp:288
xalanc::XalanFStreamOutputStream::XalanFStreamOutputStreamWriteException
Definition:
XalanFStreamOutputStream.hpp:68
xalanc::XalanDOMString
Definition:
XalanDOMString.hpp:45
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sun May 31 2020 10:37:17 for Xalan-C++ API Reference by
1.8.17