22#if !defined(XERCESC_INCLUDE_GUARD_TRANSSERVICE_HPP)
23#define XERCESC_INCLUDE_GUARD_TRANSSERVICE_HPP
27#include <xercesc/framework/XMLRecognizer.hpp>
28#include <xercesc/util/RefHashTableOf.hpp>
29#include <xercesc/util/RefVectorOf.hpp>
30#include <xercesc/util/Janitor.hpp>
63 , SupportFilesNotFound
84 const XMLCh*
const encodingName
92 const char*
const encodingName
100 XMLRecognizer::Encodings encodingEnum
112 const XMLCh*
const comp1
113 ,
const XMLCh*
const comp2
118 const XMLCh*
const comp1
119 ,
const XMLCh*
const comp2
160 friend class Uniconv390TransService;
164 const XMLCh*
const encodingName
201 void strictIANAEncoding(
const bool newState);
202 bool isStrictIANAEncoding();
271 ,
XMLCh*
const toFill
274 ,
unsigned char*
const charSizes
292 const XMLCh*
const srcData
307 const unsigned int toCheck
326 const XMLCh* getEncodingName()
const;
349 const XMLCh*
const encodingName
377 XMLCh* fEncodingName;
434 const char*
const toTranscode
435 ,
XMLCh*
const toFill
442 const XMLCh*
const toTranscode
559 ArrayJanitor<XMLByte> fString;
604 const XMLCh *str()
const;
641 ArrayJanitor<XMLCh> fString;
651 return fMemoryManager;
664 return fEncodingName;
672 return fString.get();
678 return fString.release();
683 return fBytesWritten;
691 return fString.get();
697 return fString.release();
702 return fCharsWritten;
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
unsigned char XMLByte
Definition XercesDefs.hpp:65
#define XMLUTIL_EXPORT
Definition XercesDefs.hpp:162
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Configurable memory manager.
Definition MemoryManager.hpp:40
Definition TransService.hpp:570
XMLCh * adopt()
Returns the transcoded, null terminated string - adopting the memory allocated to it from the Transco...
Definition TransService.hpp:694
XMLSize_t length() const
Returns the length of the transcoded string in characters.
Definition TransService.hpp:700
TranscodeFromStr(const XMLByte *data, XMLSize_t length, XMLTranscoder *trans, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
Converts from the specified encoding to the internal XMLCh* encoding.
const XMLCh * str() const
Returns the transcoded, null terminated string.
Definition TransService.hpp:689
TranscodeFromStr(const XMLByte *data, XMLSize_t length, const char *encoding, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
Converts from the specified encoding to the internal XMLCh* encoding.
Definition TransService.hpp:470
XMLSize_t length() const
Returns the length of the transcoded string in bytes.
Definition TransService.hpp:681
const XMLByte * str() const
Returns the transcoded, null terminated string.
Definition TransService.hpp:670
XMLByte * adopt()
Returns the transcoded, null terminated string - adopting the memory allocated to it from the Transco...
Definition TransService.hpp:675
TranscodeToStr(const XMLCh *in, XMLTranscoder *trans, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
Converts from the internal XMLCh* encoding to the specified encoding.
TranscodeToStr(const XMLCh *in, const char *encoding, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
Converts from the internal XMLCh* encoding to the specified encoding.
TranscodeToStr(const XMLCh *in, XMLSize_t length, const char *encoding, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
Converts from the internal XMLCh* encoding to the specified encoding.
TranscodeToStr(const XMLCh *in, XMLSize_t length, XMLTranscoder *trans, MemoryManager *manager=XMLPlatformUtils::fgMemoryManager)
Converts from the internal XMLCh* encoding to the specified encoding.
Utilities that must be implemented in a class-specific way.
Definition XMLInitializer.hpp:38
Definition TransService.hpp:389
virtual bool transcode(const char *const toTranscode, XMLCh *const toFill, const XMLSize_t maxChars, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)=0
virtual char * transcode(const XMLCh *const toTranscode, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)=0
virtual XMLSize_t calcRequiredSize(const XMLCh *const srcText, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)=0
virtual XMLCh * transcode(const char *const toTranscode, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)=0
virtual ~XMLLCPTranscoder()
virtual bool transcode(const XMLCh *const toTranscode, char *const toFill, const XMLSize_t maxBytes, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)=0
virtual XMLSize_t calcRequiredSize(const char *const srcText, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)=0
Definition TransService.hpp:53
XMLTranscoder * makeNewTranscoderFor(const char *const encodingName, XMLTransService::Codes &resValue, const XMLSize_t blockSize, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
virtual ~XMLTransService()
virtual int compareNIString(const XMLCh *const comp1, const XMLCh *const comp2, const XMLSize_t maxChars)=0
virtual void lowerCase(XMLCh *const toLowerCase)=0
XMLTranscoder * makeNewTranscoderFor(const XMLCh *const encodingName, XMLTransService::Codes &resValue, const XMLSize_t blockSize, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
virtual int compareIString(const XMLCh *const comp1, const XMLCh *const comp2)=0
virtual void upperCase(XMLCh *const toUpperCase)=0
virtual XMLLCPTranscoder * makeNewLCPTranscoder(MemoryManager *manager)=0
virtual const XMLCh * getId() const =0
XMLTranscoder * makeNewTranscoderFor(XMLRecognizer::Encodings encodingEnum, XMLTransService::Codes &resValue, const XMLSize_t blockSize, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
virtual bool supportsSrcOfs() const =0
static RefHashTableOf< ENameMap > * gMappings
Definition TransService.hpp:187
virtual XMLTranscoder * makeNewXMLTranscoder(const XMLCh *const encodingName, XMLTransService::Codes &resValue, const XMLSize_t blockSize, MemoryManager *const manager)=0
virtual void initTransService()
static RefVectorOf< ENameMap > * gMappingsRecognizer
Definition TransService.hpp:188
static void addEncoding(const XMLCh *const encoding, ENameMap *const ownMapping)
Codes
Definition TransService.hpp:59
XMLTranscoder is for transcoding non-local code page encodings, i.e.
Definition TransService.hpp:216
UnRepOpts
This enum is used by the transcodeTo() method to indicate how to react to unrepresentable characters.
Definition TransService.hpp:227
const XMLCh * getEncodingName() const
Get the encoding name.
Definition TransService.hpp:662
MemoryManager * getMemoryManager() const
Get the plugged-in memory manager.
Definition TransService.hpp:649
virtual ~XMLTranscoder()
Destructor for XMLTranscoder.
virtual XMLSize_t transcodeTo(const XMLCh *const srcData, const XMLSize_t srcCount, XMLByte *const toFill, const XMLSize_t maxBytes, XMLSize_t &charsEaten, const UnRepOpts options)=0
Converts from the internal XMLCh* encoding to the encoding of the service.
virtual XMLSize_t transcodeFrom(const XMLByte *const srcData, const XMLSize_t srcCount, XMLCh *const toFill, const XMLSize_t maxChars, XMLSize_t &bytesEaten, unsigned char *const charSizes)=0
Converts from the encoding of the service to the internal XMLCh* encoding.
XMLTranscoder(const XMLCh *const encodingName, const XMLSize_t blockSize, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
XMLSize_t getBlockSize() const
Get the internal block size.
Definition TransService.hpp:657
virtual bool canTranscodeTo(const unsigned int toCheck)=0
Query whether the transcoder can handle a given character.
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41
Definition TransService.hpp:67
XMLCh intCh
Definition TransService.hpp:68
XMLByte extCh
Definition TransService.hpp:69