Xalan-C++ API Reference 1.12.0
MsgFileOutputStream.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
19// This file is simplified version of XalanFileOutputStream.hpp / .cpp
20
21#if !defined(MSGFILEOUTPUTSTREAM_1357924680)
22#define MSGFILEOUTPUTSTREAM_1357924680
23
25
26
27
28#include <cstdio>
29
30
31
32namespace XALAN_CPP_NAMESPACE {
33
34
35
36using namespace xercesc;
37
38
39
40// Class responsible for printing into file with UTF16
42{
43public :
44
45 typedef std::FILE* HandleType;
46
47 /**
48 * Construct an MsgFileOutputStream object.
49 *
50 * @param theFileName name of file
51 * @param theBufferSize The size of the transcoding buffer
52 */
54
55 virtual
57
58
60 {
61 public:
62
63 /**
64 * Construct an OpenException exception object for an exception
65 * that occurred when opening a file.
66 *
67 * @param theFileName The name of file.
68 * @param theErrorCode The errno for the error encountered
69 */
71 const char* theFileName,
72 int theErrorCode);
73
75
76 char m_message[1200];
77 };
78
80 {
81 public:
82
83 /**
84 * Construct an WriteException exception object for an exception
85 * that occurred while writing to a file.
86 *
87 * @param theFileName The name of file.
88 * @param theErrorCode The errno for the error encountered
89 */
91 const char* theFileName,
92 int theErrorCode);
93
95
96 char m_message[1200];
97 };
98
99 void
101 const XMLCh* theString,
103
104 void
106 const char* theString,
108
109 void
111 const char* theString,
113
114 void
116 const XMLCh* theString,
118
119 void
121
122protected:
123
124 void
126 const char* theBuffer,
128
129 void
131
132private:
133
134 // These are not implemented...
136
138 operator=(const MsgFileOutputStream&);
139
140 bool
141 operator==(const MsgFileOutputStream&) const;
142
143
144 // Data members...
145 const char* const m_fileName;
146
147 const HandleType m_handle;
148};
149
150
151
152}
153
154
155
156#endif // MSGFILEOUTPUTSTREAM_1357924680
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
OpenException(const char *theFileName, int theErrorCode)
Construct an OpenException exception object for an exception that occurred when opening a file.
WriteException(const char *theFileName, int theErrorCode)
Construct an WriteException exception object for an exception that occurred while writing to a file.
void write(const XMLCh *theString, XalanSize_t theLength)
void writeData(const char *theBuffer, XalanSize_t theBufferLength)
void write(const char *theString, XalanSize_t theLength)
void writeAsASCII(const char *theString, XalanSize_t theLength)
MsgFileOutputStream(const char *theFileName)
Construct an MsgFileOutputStream object.
void writeAsASCII(const XMLCh *theString, XalanSize_t theLength)
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)