<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Xerces-C++: TransService.hpp Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>TransService.hpp</h1><a href="TransService_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span> <a name="l00003"></a>00003 <span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span> <a name="l00004"></a>00004 <span class="comment"> * this work for additional information regarding copyright ownership.</span> <a name="l00005"></a>00005 <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span> <a name="l00006"></a>00006 <span class="comment"> * (the "License"); you may not use this file except in compliance with</span> <a name="l00007"></a>00007 <span class="comment"> * the License. You may obtain a copy of the License at</span> <a name="l00008"></a>00008 <span class="comment"> *</span> <a name="l00009"></a>00009 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> <a name="l00010"></a>00010 <span class="comment"> *</span> <a name="l00011"></a>00011 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> <a name="l00012"></a>00012 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> <a name="l00013"></a>00013 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> <a name="l00014"></a>00014 <span class="comment"> * See the License for the specific language governing permissions and</span> <a name="l00015"></a>00015 <span class="comment"> * limitations under the License.</span> <a name="l00016"></a>00016 <span class="comment"> */</span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="comment">/*</span> <a name="l00019"></a>00019 <span class="comment"> * $Id: TransService.hpp 698579 2008-09-24 14:13:08Z borisk $</span> <a name="l00020"></a>00020 <span class="comment"> */</span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#if !defined(XERCESC_INCLUDE_GUARD_TRANSSERVICE_HPP)</span> <a name="l00023"></a><a class="code" href="TransService_8hpp.html#a3182043014fd3a82e32f383486eff27">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define XERCESC_INCLUDE_GUARD_TRANSSERVICE_HPP</span> <a name="l00024"></a>00024 <span class="preprocessor"></span> <a name="l00025"></a>00025 <span class="preprocessor">#include <<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>></span> <a name="l00026"></a>00026 <span class="preprocessor">#include <<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>></span> <a name="l00027"></a>00027 <span class="preprocessor">#include <xercesc/framework/XMLRecognizer.hpp></span> <a name="l00028"></a>00028 <span class="preprocessor">#include <xercesc/util/RefHashTableOf.hpp></span> <a name="l00029"></a>00029 <span class="preprocessor">#include <xercesc/util/RefVectorOf.hpp></span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <a class="code" href="XercesDefs_8hpp.html#43d74fa53d868d978f3e97cbb78b194d">XERCES_CPP_NAMESPACE_BEGIN</a> <a name="l00032"></a>00032 <a name="l00033"></a>00033 <span class="comment">// Forward references</span> <a name="l00034"></a>00034 <span class="comment">//class XMLPlatformUtils;</span> <a name="l00035"></a>00035 <span class="keyword">class </span><a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>; <a name="l00036"></a>00036 <span class="keyword">class </span><a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>; <a name="l00037"></a>00037 <span class="keyword">class </span>ENameMap; <a name="l00038"></a>00038 <a name="l00039"></a>00039 <a name="l00040"></a>00040 <span class="comment">//</span> <a name="l00041"></a>00041 <span class="comment">// This class is an abstract base class which are used to abstract the</span> <a name="l00042"></a>00042 <span class="comment">// transcoding services that Xerces uses. The parser's actual transcoding</span> <a name="l00043"></a>00043 <span class="comment">// needs are small so it is desirable to allow different implementations</span> <a name="l00044"></a>00044 <span class="comment">// to be provided.</span> <a name="l00045"></a>00045 <span class="comment">//</span> <a name="l00046"></a>00046 <span class="comment">// The transcoding service has to provide a couple of required string</span> <a name="l00047"></a>00047 <span class="comment">// and character operations, but its most important service is the creation</span> <a name="l00048"></a>00048 <span class="comment">// of transcoder objects. There are two types of transcoders, which are</span> <a name="l00049"></a>00049 <span class="comment">// discussed below in the XMLTranscoder class' description.</span> <a name="l00050"></a>00050 <span class="comment">//</span> <a name="l00051"></a><a class="code" href="classXMLTransService.html">00051</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a> <a class="code" href="classXMLTransService.html">XMLTransService</a> : <span class="keyword">public</span> <a class="code" href="classXMemory.html" title="This class makes it possible to override the C++ memory management by adding new/delete...">XMemory</a> <a name="l00052"></a>00052 { <a name="l00053"></a>00053 <span class="keyword">public</span> : <a name="l00054"></a>00054 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00055"></a>00055 <span class="comment">// Class specific types</span> <a name="l00056"></a>00056 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00057"></a><a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179">00057</a> <span class="keyword">enum</span> <a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179">Codes</a> <a name="l00058"></a>00058 { <a name="l00059"></a><a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179e0644620eb6b11e38879994359226853">00059</a> Ok <a name="l00060"></a><a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a9931793146055ecdd961ad1dea06655019c93b">00060</a> , UnsupportedEncoding <a name="l00061"></a><a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179b0fd463e9611c15da4088116049e98c4">00061</a> , InternalFailure <a name="l00062"></a><a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a9931798c16969645705b8a3ca9c9e9addee491">00062</a> , SupportFilesNotFound <a name="l00063"></a>00063 }; <a name="l00064"></a>00064 <a name="l00065"></a><a class="code" href="structXMLTransService_1_1TransRec.html">00065</a> <span class="keyword">struct </span><a class="code" href="structXMLTransService_1_1TransRec.html">TransRec</a> <a name="l00066"></a>00066 { <a name="l00067"></a><a class="code" href="structXMLTransService_1_1TransRec.html#0975a2bb58a52533f271f9f666e521ee">00067</a> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> intCh; <a name="l00068"></a><a class="code" href="structXMLTransService_1_1TransRec.html#917bde08c7c8cda8ee894990853bb5df">00068</a> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> extCh; <a name="l00069"></a>00069 }; <a name="l00070"></a>00070 <a name="l00071"></a>00071 <a name="l00072"></a>00072 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00073"></a>00073 <span class="comment">// Public constructors and destructor</span> <a name="l00074"></a>00074 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00075"></a>00075 <span class="keyword">virtual</span> ~<a class="code" href="classXMLTransService.html">XMLTransService</a>(); <a name="l00076"></a>00076 <a name="l00077"></a>00077 <a name="l00078"></a>00078 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00079"></a>00079 <span class="comment">// Non-virtual API</span> <a name="l00080"></a>00080 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00081"></a>00081 <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>* makeNewTranscoderFor <a name="l00082"></a>00082 ( <a name="l00083"></a>00083 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> encodingName <a name="l00084"></a>00084 , <a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179">XMLTransService::Codes</a>& resValue <a name="l00085"></a>00085 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> blockSize <a name="l00086"></a>00086 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a> <a name="l00087"></a>00087 ); <a name="l00088"></a>00088 <a name="l00089"></a>00089 <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>* makeNewTranscoderFor <a name="l00090"></a>00090 ( <a name="l00091"></a>00091 <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> encodingName <a name="l00092"></a>00092 , <a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179">XMLTransService::Codes</a>& resValue <a name="l00093"></a>00093 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> blockSize <a name="l00094"></a>00094 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a> <a name="l00095"></a>00095 ); <a name="l00096"></a>00096 <a name="l00097"></a>00097 <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>* makeNewTranscoderFor <a name="l00098"></a>00098 ( <a name="l00099"></a>00099 XMLRecognizer::Encodings encodingEnum <a name="l00100"></a>00100 , <a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179">XMLTransService::Codes</a>& resValue <a name="l00101"></a>00101 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> blockSize <a name="l00102"></a>00102 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a> <a name="l00103"></a>00103 ); <a name="l00104"></a>00104 <a name="l00105"></a>00105 <a name="l00106"></a>00106 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00107"></a>00107 <span class="comment">// The virtual transcoding service API</span> <a name="l00108"></a>00108 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00109"></a>00109 <span class="keyword">virtual</span> <span class="keywordtype">int</span> compareIString <a name="l00110"></a>00110 ( <a name="l00111"></a>00111 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> comp1 <a name="l00112"></a>00112 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> comp2 <a name="l00113"></a>00113 ) = 0; <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="keyword">virtual</span> <span class="keywordtype">int</span> compareNIString <a name="l00116"></a>00116 ( <a name="l00117"></a>00117 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> comp1 <a name="l00118"></a>00118 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> comp2 <a name="l00119"></a>00119 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> maxChars <a name="l00120"></a>00120 ) = 0; <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* getId() <span class="keyword">const</span> = 0; <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00125"></a>00125 <span class="comment">// Create a new transcoder for the local code page.</span> <a name="l00126"></a>00126 <span class="comment">//</span> <a name="l00127"></a>00127 <span class="comment">// @param manager The memory manager to use.</span> <a name="l00128"></a>00128 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00129"></a>00129 <span class="keyword">virtual</span> <a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>* makeNewLCPTranscoder(<a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* manager) = 0; <a name="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> supportsSrcOfs() <span class="keyword">const</span> = 0; <a name="l00132"></a>00132 <a name="l00133"></a>00133 <span class="keyword">virtual</span> <span class="keywordtype">void</span> upperCase(<a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> toUpperCase) = 0; <a name="l00134"></a>00134 <span class="keyword">virtual</span> <span class="keywordtype">void</span> lowerCase(<a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> toLowerCase) = 0; <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00137"></a>00137 <span class="comment">// Allow users to add their own encodings to the intrinsinc mapping</span> <a name="l00138"></a>00138 <span class="comment">// table</span> <a name="l00139"></a>00139 <span class="comment">// Usage:</span> <a name="l00140"></a>00140 <span class="comment">// XMLTransService::addEncoding (</span> <a name="l00141"></a>00141 <span class="comment">// gMyEncodingNameString</span> <a name="l00142"></a>00142 <span class="comment">// , new ENameMapFor<MyTransClassType>(gMyEncodingNameString)</span> <a name="l00143"></a>00143 <span class="comment">// );</span> <a name="l00144"></a>00144 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00145"></a>00145 <span class="keyword">static</span> <span class="keywordtype">void</span> addEncoding(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> encoding, ENameMap* <span class="keyword">const</span> ownMapping); <a name="l00146"></a>00146 <a name="l00147"></a>00147 <a name="l00148"></a>00148 <span class="keyword">protected</span> : <a name="l00149"></a>00149 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00150"></a>00150 <span class="comment">// Hidden constructors</span> <a name="l00151"></a>00151 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00152"></a>00152 <a class="code" href="classXMLTransService.html">XMLTransService</a>(); <a name="l00153"></a>00153 <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00156"></a>00156 <span class="comment">// Protected virtual methods.</span> <a name="l00157"></a>00157 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00158"></a>00158 <span class="preprocessor">#ifdef OS390</span> <a name="l00159"></a>00159 <span class="preprocessor"></span> <span class="keyword">friend</span> <span class="keyword">class </span>Uniconv390TransService; <a name="l00160"></a>00160 <span class="preprocessor">#endif</span> <a name="l00161"></a>00161 <span class="preprocessor"></span> <span class="keyword">virtual</span> <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>* makeNewXMLTranscoder <a name="l00162"></a>00162 ( <a name="l00163"></a>00163 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> encodingName <a name="l00164"></a>00164 , <a class="code" href="classXMLTransService.html#fbf0df74495928631fc102d86a993179">XMLTransService::Codes</a>& resValue <a name="l00165"></a>00165 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> blockSize <a name="l00166"></a>00166 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager <a name="l00167"></a>00167 ) = 0; <a name="l00168"></a>00168 <a name="l00169"></a>00169 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00170"></a>00170 <span class="comment">// Protected init method for platform utils to call</span> <a name="l00171"></a>00171 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00172"></a><a class="code" href="classXMLTransService.html#6fef3aac9b620715c5a90c4ca13869c0">00172</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classXMLPlatformUtils.html" title="Utilities that must be implemented in a platform-specific way.">XMLPlatformUtils</a>; <a name="l00173"></a>00173 <span class="keyword">virtual</span> <span class="keywordtype">void</span> initTransService(); <a name="l00174"></a>00174 <a name="l00175"></a>00175 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00176"></a>00176 <span class="comment">// protected static members</span> <a name="l00177"></a>00177 <span class="comment">// gMappings</span> <a name="l00178"></a>00178 <span class="comment">// This is a hash table of ENameMap objects. It is created and filled</span> <a name="l00179"></a>00179 <span class="comment">// in when the platform init calls our initTransService() method.</span> <a name="l00180"></a>00180 <span class="comment">//</span> <a name="l00181"></a>00181 <span class="comment">// gMappingsRecognizer</span> <a name="l00182"></a>00182 <span class="comment">// This is an array of ENameMap objects, predefined for those</span> <a name="l00183"></a>00183 <span class="comment">// already recognized by XMLRecognizer::Encodings.</span> <a name="l00184"></a>00184 <span class="comment">//</span> <a name="l00185"></a>00185 <a name="l00186"></a><a class="code" href="classXMLTransService.html#b5b6bf01e0fbc4ecc66130d3b5005573">00186</a> <span class="keyword">static</span> RefHashTableOf<ENameMap>* gMappings; <a name="l00187"></a><a class="code" href="classXMLTransService.html#f569d0ab4005d965d97a19c9173b62cc">00187</a> <span class="keyword">static</span> RefVectorOf<ENameMap>* gMappingsRecognizer; <a name="l00188"></a>00188 <a name="l00189"></a>00189 <span class="keyword">private</span> : <a name="l00190"></a>00190 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00191"></a>00191 <span class="comment">// Unimplemented constructors and operators</span> <a name="l00192"></a>00192 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00193"></a>00193 <a class="code" href="classXMLTransService.html">XMLTransService</a>(<span class="keyword">const</span> <a class="code" href="classXMLTransService.html">XMLTransService</a>&); <a name="l00194"></a>00194 <a class="code" href="classXMLTransService.html">XMLTransService</a>& operator=(<span class="keyword">const</span> <a class="code" href="classXMLTransService.html">XMLTransService</a>&); <a name="l00195"></a>00195 <a name="l00196"></a>00196 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00197"></a>00197 <span class="comment">// Hidden method to enable/disable strict IANA encoding check</span> <a name="l00198"></a>00198 <span class="comment">// Caller: XMLPlatformUtils</span> <a name="l00199"></a>00199 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00200"></a>00200 <span class="keywordtype">void</span> <a class="code" href="classXMLPlatformUtils.html#467744b197025769630c61e940336434" title="This function enables/disables strict IANA encoding names checking.">strictIANAEncoding</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> newState); <a name="l00201"></a>00201 <span class="keywordtype">bool</span> <a class="code" href="classXMLPlatformUtils.html#996f16ad1aad195eb2e7e618b5f89f94" title="Returns whether a strict IANA encoding name check is enabled or disabled.">isStrictIANAEncoding</a>(); <a name="l00202"></a>00202 <a name="l00203"></a><a class="code" href="classXMLTransService.html#fd5163d832a26b6dec718851e0e226f4">00203</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classXMLInitializer.html" title="Utilities that must be implemented in a class-specific way.">XMLInitializer</a>; <a name="l00204"></a>00204 }; <a name="l00205"></a>00205 <a name="l00214"></a><a class="code" href="classXMLTranscoder.html">00214</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a> <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a> : <span class="keyword">public</span> <a class="code" href="classXMemory.html" title="This class makes it possible to override the C++ memory management by adding new/delete...">XMemory</a> <a name="l00215"></a>00215 { <a name="l00216"></a>00216 <span class="keyword">public</span> : <a name="l00217"></a>00217 <a name="l00225"></a><a class="code" href="classXMLTranscoder.html#0189aaebdb21f66d5f75383b68a88977">00225</a> <span class="keyword">enum</span> <a class="code" href="classXMLTranscoder.html#0189aaebdb21f66d5f75383b68a88977" title="This enum is used by the transcodeTo() method to indicate how to react to unrepresentable...">UnRepOpts</a> <a name="l00226"></a>00226 { <a name="l00227"></a><a class="code" href="classXMLTranscoder.html#0189aaebdb21f66d5f75383b68a88977229094064f4df0c677985267231fe929">00227</a> UnRep_Throw <a name="l00228"></a><a class="code" href="classXMLTranscoder.html#0189aaebdb21f66d5f75383b68a88977f58d3b8f8058b2b74e54f964f908e0e3">00228</a> , UnRep_RepChar <a name="l00229"></a>00229 }; <a name="l00230"></a>00230 <a name="l00231"></a>00231 <a name="l00234"></a>00234 <a name="l00239"></a>00239 <span class="keyword">virtual</span> ~<a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>(); <a name="l00241"></a>00241 <a name="l00242"></a>00242 <a name="l00243"></a>00243 <a name="l00246"></a>00246 <a name="l00266"></a>00266 <span class="keyword">virtual</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> transcodeFrom <a name="l00267"></a>00267 ( <a name="l00268"></a>00268 <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> srcData <a name="l00269"></a>00269 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> srcCount <a name="l00270"></a>00270 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> toFill <a name="l00271"></a>00271 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> maxChars <a name="l00272"></a>00272 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>& bytesEaten <a name="l00273"></a>00273 , <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> charSizes <a name="l00274"></a>00274 ) = 0; <a name="l00275"></a>00275 <a name="l00289"></a>00289 <span class="keyword">virtual</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> transcodeTo <a name="l00290"></a>00290 ( <a name="l00291"></a>00291 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> srcData <a name="l00292"></a>00292 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> srcCount <a name="l00293"></a>00293 , <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> toFill <a name="l00294"></a>00294 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> maxBytes <a name="l00295"></a>00295 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>& charsEaten <a name="l00296"></a>00296 , <span class="keyword">const</span> UnRepOpts options <a name="l00297"></a>00297 ) = 0; <a name="l00298"></a>00298 <a name="l00304"></a>00304 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> canTranscodeTo <a name="l00305"></a>00305 ( <a name="l00306"></a>00306 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> toCheck <a name="l00307"></a>00307 ) = 0; <a name="l00308"></a>00308 <a name="l00310"></a>00310 <a name="l00313"></a>00313 <a name="l00318"></a>00318 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> getBlockSize() <span class="keyword">const</span>; <a name="l00319"></a>00319 <a name="l00325"></a>00325 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* getEncodingName() <span class="keyword">const</span>; <a name="l00327"></a>00327 <a name="l00330"></a>00330 <a name="l00338"></a>00338 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* getMemoryManager() <span class="keyword">const</span>; <a name="l00339"></a>00339 <a name="l00341"></a>00341 <a name="l00342"></a>00342 <span class="keyword">protected</span> : <a name="l00343"></a>00343 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00344"></a>00344 <span class="comment">// Hidden constructors</span> <a name="l00345"></a>00345 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00346"></a>00346 <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a> <a name="l00347"></a>00347 ( <a name="l00348"></a>00348 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> encodingName <a name="l00349"></a>00349 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> blockSize <a name="l00350"></a>00350 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a> <a name="l00351"></a>00351 ); <a name="l00352"></a>00352 <a name="l00353"></a>00353 <a name="l00354"></a>00354 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00355"></a>00355 <span class="comment">// Protected helper methods</span> <a name="l00356"></a>00356 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00357"></a>00357 <a name="l00358"></a>00358 <span class="keyword">private</span> : <a name="l00359"></a>00359 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00360"></a>00360 <span class="comment">// Unimplemented constructors and operators</span> <a name="l00361"></a>00361 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00362"></a>00362 <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>(<span class="keyword">const</span> <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>&); <a name="l00363"></a>00363 <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>& operator=(<span class="keyword">const</span> <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>&); <a name="l00364"></a>00364 <a name="l00365"></a>00365 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00366"></a>00366 <span class="comment">// Private data members</span> <a name="l00367"></a>00367 <span class="comment">//</span> <a name="l00368"></a>00368 <span class="comment">// fBlockSize</span> <a name="l00369"></a>00369 <span class="comment">// This is the block size indicated in the constructor.</span> <a name="l00370"></a>00370 <span class="comment">//</span> <a name="l00371"></a>00371 <span class="comment">// fEncodingName</span> <a name="l00372"></a>00372 <span class="comment">// This is the name of the encoding this encoder is for. All basic</span> <a name="l00373"></a>00373 <span class="comment">// XML transcoder's are for named encodings.</span> <a name="l00374"></a>00374 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00375"></a>00375 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> fBlockSize; <a name="l00376"></a>00376 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* fEncodingName; <a name="l00377"></a>00377 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* fMemoryManager; <a name="l00378"></a>00378 }; <a name="l00379"></a>00379 <a name="l00380"></a>00380 <a name="l00381"></a>00381 <span class="comment">//</span> <a name="l00382"></a>00382 <span class="comment">// This class is a specialized transcoder that only transcodes between</span> <a name="l00383"></a>00383 <span class="comment">// the internal XMLCh format and the local code page. It is specialized</span> <a name="l00384"></a>00384 <span class="comment">// for the very common job of translating data from the client app's</span> <a name="l00385"></a>00385 <span class="comment">// native code page to the internal format and vice versa.</span> <a name="l00386"></a>00386 <span class="comment">//</span> <a name="l00387"></a><a class="code" href="classXMLLCPTranscoder.html">00387</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a> <a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a> : <span class="keyword">public</span> <a class="code" href="classXMemory.html" title="This class makes it possible to override the C++ memory management by adding new/delete...">XMemory</a> <a name="l00388"></a>00388 { <a name="l00389"></a>00389 <span class="keyword">public</span> : <a name="l00390"></a>00390 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00391"></a>00391 <span class="comment">// Public constructors and destructor</span> <a name="l00392"></a>00392 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00393"></a>00393 <span class="keyword">virtual</span> ~<a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>(); <a name="l00394"></a>00394 <a name="l00395"></a>00395 <a name="l00396"></a>00396 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00397"></a>00397 <span class="comment">// The virtual transcoder API</span> <a name="l00398"></a>00398 <span class="comment">//</span> <a name="l00399"></a>00399 <span class="comment">// NOTE: All these APIs don't include null terminator characters in</span> <a name="l00400"></a>00400 <span class="comment">// their parameters. So calcRequiredSize() returns the number</span> <a name="l00401"></a>00401 <span class="comment">// of actual chars, not including the null. maxBytes and maxChars</span> <a name="l00402"></a>00402 <span class="comment">// parameters refer to actual chars, not including the null so</span> <a name="l00403"></a>00403 <span class="comment">// its assumed that the buffer is physically one char or byte</span> <a name="l00404"></a>00404 <span class="comment">// larger.</span> <a name="l00405"></a>00405 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00406"></a>00406 <a name="l00407"></a>00407 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00408"></a>00408 <span class="comment">// The 'normal' way to transcode a XMLCh-string from/to local string</span> <a name="l00409"></a>00409 <span class="comment">// representation</span> <a name="l00410"></a>00410 <span class="comment">//</span> <a name="l00411"></a>00411 <span class="comment">// NOTE: Both methods return a string allocated via the MemoryManager.</span> <a name="l00412"></a>00412 <span class="comment">// It is the responsibility of the calling environment to</span> <a name="l00413"></a>00413 <span class="comment">// release this string after use.</span> <a name="l00414"></a>00414 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00415"></a>00415 <span class="keyword">virtual</span> <span class="keywordtype">char</span>* transcode(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> toTranscode, <a name="l00416"></a>00416 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>) = 0; <a name="l00417"></a>00417 <a name="l00418"></a>00418 <span class="keyword">virtual</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* transcode(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> toTranscode, <a name="l00419"></a>00419 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>) = 0; <a name="l00420"></a>00420 <a name="l00421"></a>00421 <a name="l00422"></a>00422 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00423"></a>00423 <span class="comment">// DEPRECATED old transcode interface</span> <a name="l00424"></a>00424 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00425"></a>00425 <span class="keyword">virtual</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> calcRequiredSize(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> srcText <a name="l00426"></a>00426 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>) = 0; <a name="l00427"></a>00427 <a name="l00428"></a>00428 <span class="keyword">virtual</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> calcRequiredSize(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> srcText <a name="l00429"></a>00429 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>) = 0; <a name="l00430"></a>00430 <a name="l00431"></a>00431 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> transcode <a name="l00432"></a>00432 ( <a name="l00433"></a>00433 <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> toTranscode <a name="l00434"></a>00434 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> toFill <a name="l00435"></a>00435 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> maxChars <a name="l00436"></a>00436 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a> <a name="l00437"></a>00437 ) = 0; <a name="l00438"></a>00438 <a name="l00439"></a>00439 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> transcode <a name="l00440"></a>00440 ( <a name="l00441"></a>00441 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> toTranscode <a name="l00442"></a>00442 , <span class="keywordtype">char</span>* <span class="keyword">const</span> toFill <a name="l00443"></a>00443 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> maxBytes <a name="l00444"></a>00444 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a> <a name="l00445"></a>00445 ) = 0; <a name="l00446"></a>00446 <a name="l00447"></a>00447 <a name="l00448"></a>00448 <span class="keyword">protected</span> : <a name="l00449"></a>00449 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00450"></a>00450 <span class="comment">// Hidden constructors</span> <a name="l00451"></a>00451 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00452"></a>00452 <a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>(); <a name="l00453"></a>00453 <a name="l00454"></a>00454 <a name="l00455"></a>00455 <span class="keyword">private</span> : <a name="l00456"></a>00456 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00457"></a>00457 <span class="comment">// Unimplemented constructors and operators</span> <a name="l00458"></a>00458 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00459"></a>00459 <a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>(<span class="keyword">const</span> <a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>&); <a name="l00460"></a>00460 <a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>& operator=(<span class="keyword">const</span> <a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>&); <a name="l00461"></a>00461 }; <a name="l00462"></a>00462 <a name="l00463"></a>00463 <span class="comment">//</span> <a name="l00464"></a>00464 <span class="comment">// This class can be used to transcode to a target encoding. It manages the</span> <a name="l00465"></a>00465 <span class="comment">// memory allocated for the transcode in an exception safe manner, automatically</span> <a name="l00466"></a>00466 <span class="comment">// deleting it when the class goes out of scope.</span> <a name="l00467"></a>00467 <span class="comment">//</span> <a name="l00468"></a><a class="code" href="classTranscodeToStr.html">00468</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a> <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a> <a name="l00469"></a>00469 { <a name="l00470"></a>00470 <span class="keyword">public</span>: <a name="l00471"></a>00471 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00472"></a>00472 <span class="comment">// Public constructors and destructor</span> <a name="l00473"></a>00473 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00474"></a>00474 <a name="l00481"></a>00481 <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a>(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *in, <span class="keyword">const</span> <span class="keywordtype">char</span> *encoding, <a name="l00482"></a>00482 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>); <a name="l00483"></a>00483 <a name="l00491"></a>00491 <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a>(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *in, <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> length, <span class="keyword">const</span> <span class="keywordtype">char</span> *encoding, <a name="l00492"></a>00492 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>); <a name="l00493"></a>00493 <a name="l00500"></a>00500 <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a>(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *in, <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>* trans, <a name="l00501"></a>00501 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>); <a name="l00502"></a>00502 <a name="l00510"></a>00510 <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a>(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *in, <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> length, <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>* trans, <a name="l00511"></a>00511 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>); <a name="l00512"></a>00512 <a name="l00513"></a>00513 ~<a class="code" href="classTranscodeToStr.html">TranscodeToStr</a>(); <a name="l00514"></a>00514 <a name="l00517"></a>00517 <a name="l00521"></a>00521 <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *str() <span class="keyword">const</span>; <a name="l00522"></a>00522 <a name="l00527"></a>00527 <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *adopt(); <a name="l00528"></a>00528 <a name="l00533"></a>00533 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> length () <span class="keyword">const</span>; <a name="l00534"></a>00534 <a name="l00536"></a>00536 <a name="l00537"></a>00537 <span class="keyword">private</span>: <a name="l00538"></a>00538 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00539"></a>00539 <span class="comment">// Unimplemented constructors and operators</span> <a name="l00540"></a>00540 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00541"></a>00541 <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a>(<span class="keyword">const</span> <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a> &); <a name="l00542"></a>00542 <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a> &operator=(<span class="keyword">const</span> <a class="code" href="classTranscodeToStr.html">TranscodeToStr</a> &); <a name="l00543"></a>00543 <a name="l00544"></a>00544 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00545"></a>00545 <span class="comment">// Private helper methods</span> <a name="l00546"></a>00546 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00547"></a>00547 <span class="keywordtype">void</span> transcode(<span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *in, <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> len, <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a>* trans); <a name="l00548"></a>00548 <a name="l00549"></a>00549 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00550"></a>00550 <span class="comment">// Private data members</span> <a name="l00551"></a>00551 <span class="comment">//</span> <a name="l00552"></a>00552 <span class="comment">// fString</span> <a name="l00553"></a>00553 <span class="comment">// The transcoded string</span> <a name="l00554"></a>00554 <span class="comment">//</span> <a name="l00555"></a>00555 <span class="comment">// fBytesWritten</span> <a name="l00556"></a>00556 <span class="comment">// The length of the transcoded string in bytes</span> <a name="l00557"></a>00557 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00558"></a>00558 <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *fString; <a name="l00559"></a>00559 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> fBytesWritten; <a name="l00560"></a>00560 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *fMemoryManager; <a name="l00561"></a>00561 }; <a name="l00562"></a>00562 <a name="l00563"></a>00563 <span class="comment">//</span> <a name="l00564"></a>00564 <span class="comment">// This class can be used to transcode from a source encoding. It manages the</span> <a name="l00565"></a>00565 <span class="comment">// memory allocated for the transcode in an exception safe manner, automatically</span> <a name="l00566"></a>00566 <span class="comment">// deleting it when the class goes out of scope.</span> <a name="l00567"></a>00567 <span class="comment">//</span> <a name="l00568"></a><a class="code" href="classTranscodeFromStr.html">00568</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a> <a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a> <a name="l00569"></a>00569 { <a name="l00570"></a>00570 <span class="keyword">public</span>: <a name="l00571"></a>00571 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00572"></a>00572 <span class="comment">// Public constructors and destructor</span> <a name="l00573"></a>00573 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00574"></a>00574 <a name="l00582"></a>00582 <a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a>(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *data, <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> length, <span class="keyword">const</span> <span class="keywordtype">char</span> *encoding, <a name="l00583"></a>00583 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>); <a name="l00584"></a>00584 <a name="l00592"></a>00592 <a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a>(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *data, <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> length, <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a> *trans, <a name="l00593"></a>00593 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *manager = <a class="code" href="classXMLPlatformUtils.html#97eff0d9fff3567bea3acd3ca4d95252" title="The configurable memory manager.">XMLPlatformUtils::fgMemoryManager</a>); <a name="l00594"></a>00594 <a name="l00595"></a>00595 ~<a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a>(); <a name="l00596"></a>00596 <a name="l00599"></a>00599 <a name="l00603"></a>00603 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *str() <span class="keyword">const</span>; <a name="l00604"></a>00604 <a name="l00609"></a>00609 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *adopt(); <a name="l00610"></a>00610 <a name="l00615"></a>00615 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> length() <span class="keyword">const</span>; <a name="l00616"></a>00616 <a name="l00618"></a>00618 <a name="l00619"></a>00619 <span class="keyword">private</span>: <a name="l00620"></a>00620 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00621"></a>00621 <span class="comment">// Unimplemented constructors and operators</span> <a name="l00622"></a>00622 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00623"></a>00623 <a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a>(<span class="keyword">const</span> <a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a> &); <a name="l00624"></a>00624 <a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a> &operator=(<span class="keyword">const</span> <a class="code" href="classTranscodeFromStr.html">TranscodeFromStr</a> &); <a name="l00625"></a>00625 <a name="l00626"></a>00626 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00627"></a>00627 <span class="comment">// Private helper methods</span> <a name="l00628"></a>00628 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00629"></a>00629 <span class="keywordtype">void</span> transcode(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *in, <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> length, <a class="code" href="classXMLTranscoder.html" title="XMLTranscoder is for transcoding non-local code page encodings, i.e.">XMLTranscoder</a> *trans); <a name="l00630"></a>00630 <a name="l00631"></a>00631 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00632"></a>00632 <span class="comment">// Private data members</span> <a name="l00633"></a>00633 <span class="comment">//</span> <a name="l00634"></a>00634 <span class="comment">// fString</span> <a name="l00635"></a>00635 <span class="comment">// The transcoded string</span> <a name="l00636"></a>00636 <span class="comment">//</span> <a name="l00637"></a>00637 <span class="comment">// fBytesWritten</span> <a name="l00638"></a>00638 <span class="comment">// The length of the transcoded string in characters</span> <a name="l00639"></a>00639 <span class="comment">// -----------------------------------------------------------------------</span> <a name="l00640"></a>00640 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *fString; <a name="l00641"></a>00641 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> fCharsWritten; <a name="l00642"></a>00642 <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a> *fMemoryManager; <a name="l00643"></a>00643 }; <a name="l00644"></a>00644 <a name="l00645"></a>00645 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00646"></a>00646 <span class="comment">// XMLTranscoder: Getter methods</span> <a name="l00647"></a>00647 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00648"></a><a class="code" href="classXMLTranscoder.html#3affa8b64dffd3829d81869049d69d14">00648</a> <span class="keyword">inline</span> <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <a class="code" href="classXMLTranscoder.html#3affa8b64dffd3829d81869049d69d14" title="Get the plugged-in memory manager.">XMLTranscoder::getMemoryManager</a>()<span class="keyword"> const</span> <a name="l00649"></a>00649 <span class="keyword"></span>{ <a name="l00650"></a>00650 <span class="keywordflow">return</span> fMemoryManager; <a name="l00651"></a>00651 } <a name="l00652"></a>00652 <a name="l00653"></a>00653 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00654"></a>00654 <span class="comment">// XMLTranscoder: Protected helper methods</span> <a name="l00655"></a>00655 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00656"></a><a class="code" href="classXMLTranscoder.html#2e436bd211ba823fa77af4f5d15fec83">00656</a> <span class="keyword">inline</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> <a class="code" href="classXMLTranscoder.html#2e436bd211ba823fa77af4f5d15fec83" title="Get the internal block size.">XMLTranscoder::getBlockSize</a>()<span class="keyword"> const</span> <a name="l00657"></a>00657 <span class="keyword"></span>{ <a name="l00658"></a>00658 <span class="keywordflow">return</span> fBlockSize; <a name="l00659"></a>00659 } <a name="l00660"></a>00660 <a name="l00661"></a><a class="code" href="classXMLTranscoder.html#e6504b962e5540dc19cb7b8a10b1c263">00661</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <a class="code" href="classXMLTranscoder.html#e6504b962e5540dc19cb7b8a10b1c263" title="Get the encoding name.">XMLTranscoder::getEncodingName</a>()<span class="keyword"> const</span> <a name="l00662"></a>00662 <span class="keyword"></span>{ <a name="l00663"></a>00663 <span class="keywordflow">return</span> fEncodingName; <a name="l00664"></a>00664 } <a name="l00665"></a>00665 <a name="l00666"></a>00666 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00667"></a>00667 <span class="comment">// TranscodeToStr: Getter methods</span> <a name="l00668"></a>00668 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00669"></a><a class="code" href="classTranscodeToStr.html#9bd4b0444193bc0e82329ec359d25b66">00669</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *<a class="code" href="classTranscodeToStr.html#9bd4b0444193bc0e82329ec359d25b66" title="Returns the transcoded, null terminated string.">TranscodeToStr::str</a>()<span class="keyword"> const</span> <a name="l00670"></a>00670 <span class="keyword"></span>{ <a name="l00671"></a>00671 <span class="keywordflow">return</span> fString; <a name="l00672"></a>00672 } <a name="l00673"></a>00673 <a name="l00674"></a><a class="code" href="classTranscodeToStr.html#163e9159b1f5a0131aee5c08e1a7f16c">00674</a> <span class="keyword">inline</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *<a class="code" href="classTranscodeToStr.html#163e9159b1f5a0131aee5c08e1a7f16c" title="Returns the transcoded, null terminated string - adopting the memory allocated to...">TranscodeToStr::adopt</a>() <a name="l00675"></a>00675 { <a name="l00676"></a>00676 <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> *tmp = fString; <a name="l00677"></a>00677 fString = 0; <a name="l00678"></a>00678 <span class="keywordflow">return</span> tmp; <a name="l00679"></a>00679 } <a name="l00680"></a>00680 <a name="l00681"></a><a class="code" href="classTranscodeToStr.html#23c2fc62aa22d773c7d5f16ca42d5370">00681</a> <span class="keyword">inline</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> <a class="code" href="classTranscodeToStr.html#23c2fc62aa22d773c7d5f16ca42d5370" title="Returns the length of the transcoded string in bytes.">TranscodeToStr::length</a> ()<span class="keyword"> const</span> <a name="l00682"></a>00682 <span class="keyword"></span>{ <a name="l00683"></a>00683 <span class="keywordflow">return</span> fBytesWritten; <a name="l00684"></a>00684 } <a name="l00685"></a>00685 <a name="l00686"></a>00686 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00687"></a>00687 <span class="comment">// TranscodeFromStr: Getter methods</span> <a name="l00688"></a>00688 <span class="comment">// ---------------------------------------------------------------------------</span> <a name="l00689"></a><a class="code" href="classTranscodeFromStr.html#2326c1a76998edfd42a6d2afdbea58fa">00689</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *<a class="code" href="classTranscodeFromStr.html#2326c1a76998edfd42a6d2afdbea58fa" title="Returns the transcoded, null terminated string.">TranscodeFromStr::str</a>()<span class="keyword"> const</span> <a name="l00690"></a>00690 <span class="keyword"></span>{ <a name="l00691"></a>00691 <span class="keywordflow">return</span> fString; <a name="l00692"></a>00692 } <a name="l00693"></a>00693 <a name="l00694"></a><a class="code" href="classTranscodeFromStr.html#7124c41c32ef7b5ae9504ae26afe8b26">00694</a> <span class="keyword">inline</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *<a class="code" href="classTranscodeFromStr.html#7124c41c32ef7b5ae9504ae26afe8b26" title="Returns the transcoded, null terminated string - adopting the memory allocated to...">TranscodeFromStr::adopt</a>() <a name="l00695"></a>00695 { <a name="l00696"></a>00696 <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *tmp = fString; <a name="l00697"></a>00697 fString = 0; <a name="l00698"></a>00698 <span class="keywordflow">return</span> tmp; <a name="l00699"></a>00699 } <a name="l00700"></a>00700 <a name="l00701"></a><a class="code" href="classTranscodeFromStr.html#2b70e681ce817ad7bf05a3f0007a955f">00701</a> <span class="keyword">inline</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> <a class="code" href="classTranscodeFromStr.html#2b70e681ce817ad7bf05a3f0007a955f" title="Returns the length of the transcoded string in characters.">TranscodeFromStr::length</a>()<span class="keyword"> const</span> <a name="l00702"></a>00702 <span class="keyword"></span>{ <a name="l00703"></a>00703 <span class="keywordflow">return</span> fCharsWritten; <a name="l00704"></a>00704 } <a name="l00705"></a>00705 <a name="l00706"></a>00706 <a class="code" href="XercesDefs_8hpp.html#f03d5cb905763ef7a7bd22ab82718285">XERCES_CPP_NAMESPACE_END</a> <a name="l00707"></a>00707 <a name="l00708"></a>00708 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 29 15:30:48 2010 for Xerces-C++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>