Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


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 
32 XALAN_CPP_NAMESPACE_BEGIN
33 
34 
35 
36 XERCES_CPP_NAMESPACE_USE
37 
38 
39 
40 // Class responsible for printing into file with UTF16
42 {
43 public :
44 
45 #if defined(XALAN_STRICT_ANSI_HEADERS)
46  typedef std::FILE* HandleType;
47 #else
48  typedef FILE* HandleType;
49 #endif
50 
51  /**
52  * Construct an MsgFileOutputStream object.
53  *
54  * @param theFileName name of file
55  * @param theBufferSize The size of the transcoding buffer
56  */
57  MsgFileOutputStream(const char* theFileName);
58 
59  virtual
61 
62 
64  {
65  public:
66 
67  /**
68  * Construct an OpenException exception object for an exception
69  * that occurred when opening a file.
70  *
71  * @param theFileName The name of file.
72  * @param theErrorCode The errno for the error encountered
73  */
75  const char* theFileName,
76  int theErrorCode);
77 
79 
80  char m_message[1200];
81  };
82 
84  {
85  public:
86 
87  /**
88  * Construct an WriteException exception object for an exception
89  * that occurred while writing to a file.
90  *
91  * @param theFileName The name of file.
92  * @param theErrorCode The errno for the error encountered
93  */
95  const char* theFileName,
96  int theErrorCode);
97 
98  ~WriteException();
99 
100  char m_message[1200];
101  };
102 
103  void
104  write(
105  const XMLCh* theString,
106  XalanSize_t theLength);
107 
108  void
109  write(
110  const char* theString,
111  XalanSize_t theLength);
112 
113  void
114  writeAsASCII(
115  const char* theString,
116  XalanSize_t theLength);
117 
118  void
119  writeAsASCII(
120  const XMLCh* theString,
121  XalanSize_t theLength);
122 
123  void
124  writeUTFPrefix();
125 
126 protected:
127 
128  void
129  writeData(
130  const char* theBuffer,
131  XalanSize_t theBufferLength);
132 
133  void
134  doFlush();
135 
136 private:
137 
138  // These are not implemented...
140 
142  operator=(const MsgFileOutputStream&);
143 
144  bool
145  operator==(const MsgFileOutputStream&) const;
146 
147 
148  // Data members...
149  const char* const m_fileName;
150 
151  const HandleType m_handle;
152 };
153 
154 
155 
156 XALAN_CPP_NAMESPACE_END
157 
158 
159 
160 #endif // MSGFILEOUTPUTSTREAM_1357924680
void writeData(const char *theBuffer, XalanSize_t theBufferLength)
MsgFileOutputStream(const char *theFileName)
Construct an MsgFileOutputStream object.
virtual ~MsgFileOutputStream()
OpenException(const char *theFileName, int theErrorCode)
Construct an OpenException exception object for an exception that occurred when opening a file...
void writeAsASCII(const char *theString, XalanSize_t theLength)
void write(const XMLCh *theString, XalanSize_t theLength)
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)

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