Xalan-C++ API Reference  1.12.0
XalanTransformerOutputStream.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(XALANTRANSFORMEROUTPUTSTREAM_HEADER_GUARD_1357924680)
19 #define XALANTRANSFORMEROUTPUTSTREAM_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 // Base class header file.
30 
31 
32 
33 namespace XALAN_CPP_NAMESPACE {
34 
35 
36 
37 // A class for output to a user defined (callback) function.
39 {
40 public:
41 
42  /**
43  * Construct a XalanTransformerOutputStream instance for output to a
44  * user defined (callback) function.
45  *
46  * @param theOutputHandle void pointer passed through to callback.
47  * @param theOutputHandler a user defined (callback) function.
48  * @param theFlushHandler a user defined (callback) function.
49  */
51  MemoryManager& theManager,
52  void* theOutputHandle,
53  XalanOutputHandlerType theOutputHandler,
54  XalanFlushHandlerType theFlushHandler = 0);
55 
56 
57  virtual
59 
60 protected:
61 
62  virtual void
63  writeData(
64  const char* theBuffer,
65  size_type theBufferLength);
66 
67  virtual void
68  doFlush();
69 
70 private:
71 
72  // These are not implemented...
74 
76  operator=(const XalanTransformerOutputStream&);
77 
78  void* const m_outputHandle;
79 
80  XalanOutputHandlerType m_outputHandler;
81 
82  XalanFlushHandlerType m_flushHandler;
83 };
84 
85 
86 
87 }
88 
89 
90 
91 #endif // XALANTRANSFORMEROUTPUTSTREAM_HEADER_GUARD_1357924680
92 
93 
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanOutputStream::size_type
XalanTranscodingServices::size_type size_type
Definition: XalanOutputStream.hpp:57
XalanOutputStream.hpp
xalanc::XalanOutputStream
Definition: XalanOutputStream.hpp:49
XalanOutputHandlerType
CallbackSizeType(* XalanOutputHandlerType)(const char *, CallbackSizeType, void *)
Callback function passed to the XalanTransformer APIs.
Definition: XalanTransformerDefinitions.hpp:70
xalanc::XalanTransformerOutputStream
Definition: XalanTransformerOutputStream.hpp:38
XalanFlushHandlerType
void(* XalanFlushHandlerType)(void *)
Callback function passed to the XalanTransformer APIs.
Definition: XalanTransformerDefinitions.hpp:80
XALAN_TRANSFORMER_EXPORT
#define XALAN_TRANSFORMER_EXPORT
Definition: XalanTransformerDefinitions.hpp:39
XalanTransformerDefinitions.hpp