Xalan-C++ API Reference  1.12.0
XalanUTF16Transcoder.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(XALANUTF16TRANSCODER_HEADER_GUARD_1357924680)
19 #define XALANUTF16TRANSCODER_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 
38 {
39 public:
40 
41  explicit
42  XalanUTF16Transcoder(MemoryManager& theManager);
43 
44  static XalanUTF16Transcoder*
45  create(MemoryManager& theManager);
46 
47  virtual
49 
50  /**
51  * Transcode data from UTF-16 to UTF-16.
52  *
53  * @param theSourceData The source data to transcode
54  * @param theSourceCount The length of the source data.
55  * @param theResult The error code, if any.
56  * @param theTarget The target array for storing the transcoded data.
57  * @param theTargetSize The number of characters that can be stored in the target.
58  * @param theSourceCharsTranscoded The count of the source characters that were transcoded.
59  * @param theTargetBytesUsed The number of characters stored in the target array
60  * @return The result code.
61  */
62  virtual eCode
63  transcode(
64  const XalanDOMChar* theSourceData,
65  size_type theSourceCount,
66  XalanXMLByte* theTarget,
67  size_type theTargetSize,
68  size_type& theSourceCharsTranscoded,
69  size_type& theTargetBytesUsed);
70 
71  /**
72  * Transcode data from UTF-16 to UTF-16.
73  *
74  * @param theSourceData The source data to transcode
75  * @param theSourceCount The length of the source data.
76  * @param theResult The error code, if any.
77  * @param theTarget The target array for storing the transcoded data.
78  * @param theTargetSize The number of characters that can be stored in the target.
79  * @param theSourceCharsTranscoded The count of the source characters that were transcoded.
80  * @param theTargetBytesUsed The number of characters stored in the target array
81  * @return The result code.
82  */
83  virtual eCode
84  transcode(
85  const XalanXMLByte* theSourceData,
86  size_type theSourceCount,
87  XalanDOMChar* theTarget,
88  size_type theTargetSize,
89  size_type& theSourceCharsTranscoded,
90  size_type& theTargetBytesUsed,
91  unsigned char* theCharSizes);
92 
93  virtual bool
94  canTranscodeTo(XalanUnicodeChar theChar) const;
95 
96 private:
97 
98  // Not implemented...
100 
102  operator=(const XalanUTF16Transcoder&);
103 };
104 
105 
106 
107 }
108 
109 
110 
111 #endif // XALANUTF16TRANSCODER_HEADER_GUARD_1357924680
xalanc::XalanOutputTranscoder
Definition: XalanTranscodingServices.hpp:332
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
XalanTranscodingServices.hpp
xalanc::XalanOutputTranscoder::size_type
XalanTranscodingServices::size_type size_type
Definition: XalanTranscodingServices.hpp:338
xalanc::XalanTranscodingServices::eCode
eCode
Definition: XalanTranscodingServices.hpp:79
XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_PLATFORMSUPPORT_EXPORT
Definition: PlatformSupportDefinitions.hpp:35
PlatformSupportDefinitions.hpp
xalanc::XalanUTF16Transcoder
Definition: XalanUTF16Transcoder.hpp:37
xalanc::XalanOutputTranscoder::XalanXMLByte
XalanTranscodingServices::XalanXMLByte XalanXMLByte
Definition: XalanTranscodingServices.hpp:336