Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XalanFileOutputStream.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(XALANFILEOUTPUTSTREAM_HEADER_GUARD_1357924680)
19 #define XALANFILEOUTPUTSTREAM_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 #if defined(XALAN_WINDOWS)
29 #include <windows.h>
30 #else
31 #include <cstdio>
32 #endif
33 
34 
35 
36 // Base class header file.
38 
39 
40 
41 XALAN_CPP_NAMESPACE_BEGIN
42 
43 
44 #if defined(XALAN_STRICT_ANSI_HEADERS)
45 using std::FILE;
46 #endif
47 
49 {
50 public :
51 
52  enum { eDefaultBufferSize = 8192u };
53 
54 #if defined(XALAN_WINDOWS)
55  typedef HANDLE HandleType;
56 #else
57  typedef FILE* HandleType;
58 #endif
59 
60  /**
61  * Construct an XalanFileOutputStream object.
62  *
63  * @param theFileName name of file
64  * @param theBufferSize The size of the transcoding buffer
65  */
67  const XalanDOMString& theFileName,
68  MemoryManager& theManager,
69  size_type theBufferSize = eDefaultBufferSize);
70 
71  static XalanFileOutputStream*
73  const XalanDOMString& theFileName,
74  MemoryManager& theManager,
75  size_type theBufferSize = eDefaultBufferSize);
76  virtual
78 
79 
81  {
82  public:
83 
84  /**
85  * Construct an XalanFileOutputStreamOpen exception object for an exception
86  * that occurred on opening a text file stream.
87  *
88  * @param theFileName name of file causing the exception
89  * @param theErrorCode number of error encountered
90  */
92  const XalanDOMString& theFileName,
93  int theErrorCode,
94  XalanDOMString& theBuffer,
95  const Locator* theLocator = 0);
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 
113  {
114  public:
115 
116  /**
117  * Construct an XalanFileOutputStreamOpen exception object for an exception
118  * that occurred while writing to a text file stream.
119  *
120  * @param theFileName name of file causing the exception
121  * @param theErrorCode number of error encountered
122  */
124  const XalanDOMString& theFileName,
125  int theErrorCode,
126  XalanDOMString& theBuffer,
127  const Locator* theLocator = 0);
128 
129  virtual
131 
132  virtual const XalanDOMChar*
133  getType() const
134  {
135  return m_type;
136  }
137 
138  private:
139  static const XalanDOMChar m_type[];
140 
141  };
142 
143 protected:
144 
145  virtual void
147  const char* theBuffer,
148  size_type theBufferLength);
149 
150  virtual void
152 
153 private:
154 
155  // These are not implemented...
157 
159  operator=(const XalanFileOutputStream&);
160 
161  bool
162  operator==(const XalanFileOutputStream&) const;
163 
164 
165  // Data members...
166  const XalanDOMString m_fileName;
167 
168  const HandleType m_handle;
169 };
170 
171 
172 
173 XALAN_CPP_NAMESPACE_END
174 
175 
176 
177 #endif // XALANFILEOUTPUTSTREAM_HEADER_GUARD_1357924680
XalanFileOutputStream::XalanFileOutputStream
XalanFileOutputStream(const XalanDOMString &theFileName, MemoryManager &theManager, size_type theBufferSize=eDefaultBufferSize)
Construct an XalanFileOutputStream object.
XalanFileOutputStream::XalanFileOutputStreamWriteException::XalanFileOutputStreamWriteException
XalanFileOutputStreamWriteException(const XalanDOMString &theFileName, int theErrorCode, XalanDOMString &theBuffer, const Locator *theLocator=0)
Construct an XalanFileOutputStreamOpen exception object for an exception that occurred while writing ...
XalanFileOutputStream::XalanFileOutputStreamOpenException::~XalanFileOutputStreamOpenException
virtual ~XalanFileOutputStreamOpenException()
XalanFileOutputStream::XalanFileOutputStreamWriteException::~XalanFileOutputStreamWriteException
virtual ~XalanFileOutputStreamWriteException()
operator==
bool operator==(const ElemAttributeSet &theLHS, const ElemAttributeSet &theRHS)
Definition: ElemAttributeSet.hpp:111
XalanOutputStream.hpp
XalanOutputStream
Definition: XalanOutputStream.hpp:50
XalanFileOutputStream::XalanFileOutputStreamOpenException
Definition: XalanFileOutputStream.hpp:81
XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_PLATFORMSUPPORT_EXPORT
Definition: PlatformSupportDefinitions.hpp:35
PlatformSupportDefinitions.hpp
XalanFileOutputStream::HandleType
FILE * HandleType
Definition: XalanFileOutputStream.hpp:57
XalanDOMString
Definition: XalanDOMString.hpp:46
XalanOutputStream::size_type
XalanTranscodingServices::size_type size_type
Definition: XalanOutputStream.hpp:57
XalanFileOutputStream::XalanFileOutputStreamWriteException::getType
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
Definition: XalanFileOutputStream.hpp:133
XalanFileOutputStream::create
static XalanFileOutputStream * create(const XalanDOMString &theFileName, MemoryManager &theManager, size_type theBufferSize=eDefaultBufferSize)
XalanOutputStream::XalanOutputStreamException
Definition: XalanOutputStream.hpp:289
XalanFileOutputStream::~XalanFileOutputStream
virtual ~XalanFileOutputStream()
XalanFileOutputStream::doFlush
virtual void doFlush()
Flush the stream.
XalanFileOutputStream::XalanFileOutputStreamOpenException::XalanFileOutputStreamOpenException
XalanFileOutputStreamOpenException(const XalanDOMString &theFileName, int theErrorCode, XalanDOMString &theBuffer, const Locator *theLocator=0)
Construct an XalanFileOutputStreamOpen exception object for an exception that occurred on opening a t...
XalanFileOutputStream::XalanFileOutputStreamWriteException
Definition: XalanFileOutputStream.hpp:113
XalanFileOutputStream::XalanFileOutputStreamOpenException::getType
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
Definition: XalanFileOutputStream.hpp:101
XalanFileOutputStream::writeData
virtual void writeData(const char *theBuffer, size_type theBufferLength)
Write the data in the buffer.
XalanFileOutputStream
Definition: XalanFileOutputStream.hpp:49

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