Xalan-C++ API Reference  1.12.0
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
xalanc::XalanTranscodingServices Class Reference

#include <xalanc/PlatformSupport/XalanTranscodingServices.hpp>

Classes

class  MakeTranscoderException
 
class  UnrepresentableCharacterException
 

Public Types

enum  eCode { OK, UnsupportedEncoding, InternalFailure, SupportFilesNotFound }
 
typedef unsigned char XalanXMLByte
 
typedef XalanSize_t size_type
 

Static Public Member Functions

static void initialize (MemoryManager &theManager)
 Perform static initialization. More...
 
static void terminate ()
 Perform static shut down. More...
 
static size_type length (const XalanXMLByte *theBytes)
 
static XalanOutputTranscodermakeNewTranscoder (MemoryManager &theManager, const XalanDOMString &theEncodingName, eCode &theResult, size_type theBlockSize)
 Create a transcoder instance for the specified encoding. More...
 
static XalanOutputTranscodermakeNewTranscoder (MemoryManager &theManager, const XalanDOMChar *theEncodingName, eCode &theResult, size_type theBlockSize)
 
static void destroyTranscoder (XalanOutputTranscoder *theTranscoder)
 Destroy a transcoder instance. More...
 
static bool encodingIsUTF8 (const XalanDOMChar *theEncodingName)
 Determine if the encoding name supplied is equivalent to UTF-8. More...
 
static bool encodingIsUTF8 (const XalanDOMString &theEncodingName)
 Determine if the encoding name supplied is equivalent to UTF-8. More...
 
static bool encodingIsUTF16 (const XalanDOMChar *theEncodingName)
 Determine if the encoding name supplied is equivalent to UTF-16. More...
 
static bool encodingIsUTF16 (const XalanDOMString &theEncodingName)
 Determine if the encoding name supplied is equivalent to UTF-16. More...
 
static bool encodingIsUTF32 (const XalanDOMChar *theEncodingName)
 Determine if the encoding name supplied is equivalent to UTF-32. More...
 
static bool encodingIsUTF32 (const XalanDOMString &theEncodingName)
 Determine if the encoding name supplied is equivalent to UTF-32. More...
 
static const XalanXMLBytegetStreamProlog (const XalanDOMString &theEncodingName)
 Get an array that contains any leading bytes that should be written to an XML stream for the specified encoding. More...
 
static XalanDOMChar getMaximumCharacterValue (const XalanDOMString &theEncoding)
 Get the maximum character value for the encoding. More...
 
static XalanDOMChar getMaximumCharacterValue ()
 Get the maximum character value for the local code page. More...
 
static bool getBytesEqualChars (const XalanDOMString &theEncoding)
 Determine if the output stage can safely skip transcoding by truncating. More...
 

Static Public Attributes

static const XalanDOMChar s_utf8String []
 
static const XalanDOMChar s_utf16String []
 
static const XalanDOMChar s_utf16LEString []
 
static const XalanDOMChar s_utf16BEString []
 
static const XalanDOMChar s_utf32String []
 
static const XalanDOMChar s_asciiString []
 
static const XalanDOMChar s_usASCIIString []
 
static const XalanDOMChar s_windows1250String []
 
static const XalanDOMChar s_iso88591String []
 
static const XalanDOMChar s_shiftJISString []
 

Detailed Description

Definition at line 45 of file XalanTranscodingServices.hpp.

Member Typedef Documentation

◆ size_type

Definition at line 62 of file XalanTranscodingServices.hpp.

◆ XalanXMLByte

Definition at line 61 of file XalanTranscodingServices.hpp.

Member Enumeration Documentation

◆ eCode

Enumerator
OK 
UnsupportedEncoding 
InternalFailure 
SupportFilesNotFound 

Definition at line 79 of file XalanTranscodingServices.hpp.

Member Function Documentation

◆ destroyTranscoder()

static void xalanc::XalanTranscodingServices::destroyTranscoder ( XalanOutputTranscoder theTranscoder)
static

Destroy a transcoder instance.

@theTranscoder The transcoder to destroy.

◆ encodingIsUTF16() [1/2]

static bool xalanc::XalanTranscodingServices::encodingIsUTF16 ( const XalanDOMChar *  theEncodingName)
static

Determine if the encoding name supplied is equivalent to UTF-16.

Parameters
theEncodingNameThe name of the output encoding.
Returns
true or false

◆ encodingIsUTF16() [2/2]

static bool xalanc::XalanTranscodingServices::encodingIsUTF16 ( const XalanDOMString theEncodingName)
static

Determine if the encoding name supplied is equivalent to UTF-16.

Parameters
theEncodingNameThe name of the output encoding.
Returns
true or false

◆ encodingIsUTF32() [1/2]

static bool xalanc::XalanTranscodingServices::encodingIsUTF32 ( const XalanDOMChar *  theEncodingName)
static

Determine if the encoding name supplied is equivalent to UTF-32.

Parameters
theEncodingNameThe name of the output encoding.
Returns
true or false

◆ encodingIsUTF32() [2/2]

static bool xalanc::XalanTranscodingServices::encodingIsUTF32 ( const XalanDOMString theEncodingName)
static

Determine if the encoding name supplied is equivalent to UTF-32.

Parameters
theEncodingNameThe name of the output encoding.
Returns
true or false

◆ encodingIsUTF8() [1/2]

static bool xalanc::XalanTranscodingServices::encodingIsUTF8 ( const XalanDOMChar *  theEncodingName)
static

Determine if the encoding name supplied is equivalent to UTF-8.

Parameters
theEncodingNameThe name of the output encoding.
Returns
true or false

◆ encodingIsUTF8() [2/2]

static bool xalanc::XalanTranscodingServices::encodingIsUTF8 ( const XalanDOMString theEncodingName)
static

Determine if the encoding name supplied is equivalent to UTF-8.

Parameters
theEncodingNameThe name of the output encoding.
Returns
true or false

◆ getBytesEqualChars()

static bool xalanc::XalanTranscodingServices::getBytesEqualChars ( const XalanDOMString theEncoding)
static

Determine if the output stage can safely skip transcoding by truncating.

Parameters
theEncodingThe encoding name.
Returns
true if truncation is possible, false if not.

◆ getMaximumCharacterValue() [1/2]

static XalanDOMChar xalanc::XalanTranscodingServices::getMaximumCharacterValue ( )
static

Get the maximum character value for the local code page.

This is now deprecated, since it's impossibly broken.

Deprecated:
Returns
The maximum character value the local code page supports.

◆ getMaximumCharacterValue() [2/2]

static XalanDOMChar xalanc::XalanTranscodingServices::getMaximumCharacterValue ( const XalanDOMString theEncoding)
static

Get the maximum character value for the encoding.

Parameters
theEncodingThe encoding name.
Returns
The maximum character value the encoding supports.

◆ getStreamProlog()

static const XalanXMLByte* xalanc::XalanTranscodingServices::getStreamProlog ( const XalanDOMString theEncodingName)
static

Get an array that contains any leading bytes that should be written to an XML stream for the specified encoding.

For example, if the encoding is UTF-16, the vector will contain the appropriate byte order mark for the current platform. If there is no prolog for the encoding, or the encoding is unknown, an empty array is returned.

Parameters
theEncodingNameThe name of the desired output encoding.
Returns
An array containing the appropriate bytes.

◆ initialize()

static void xalanc::XalanTranscodingServices::initialize ( MemoryManager &  theManager)
static

Perform static initialization.

See class PlatformSupportInit.

◆ length()

static size_type xalanc::XalanTranscodingServices::length ( const XalanXMLByte theBytes)
inlinestatic

Definition at line 65 of file XalanTranscodingServices.hpp.

◆ makeNewTranscoder() [1/2]

static XalanOutputTranscoder* xalanc::XalanTranscodingServices::makeNewTranscoder ( MemoryManager &  theManager,
const XalanDOMChar *  theEncodingName,
eCode theResult,
size_type  theBlockSize 
)
static

◆ makeNewTranscoder() [2/2]

static XalanOutputTranscoder* xalanc::XalanTranscodingServices::makeNewTranscoder ( MemoryManager &  theManager,
const XalanDOMString theEncodingName,
eCode theResult,
size_type  theBlockSize 
)
static

Create a transcoder instance for the specified encoding.

Parameters
theEncodingNameThe name of the desired output encoding.
theResultThe error code.
theTargetThe target array for storing the transcoded data.
theBlockSizeThe block size the transcoder should use.
Returns
The new transcoder, or 0 if there was an error.

◆ terminate()

static void xalanc::XalanTranscodingServices::terminate ( )
static

Perform static shut down.

See class PlatformSupportInit.

Member Data Documentation

◆ s_asciiString

const XalanDOMChar xalanc::XalanTranscodingServices::s_asciiString[]
static

Definition at line 227 of file XalanTranscodingServices.hpp.

◆ s_iso88591String

const XalanDOMChar xalanc::XalanTranscodingServices::s_iso88591String[]
static

Definition at line 233 of file XalanTranscodingServices.hpp.

◆ s_shiftJISString

const XalanDOMChar xalanc::XalanTranscodingServices::s_shiftJISString[]
static

Definition at line 235 of file XalanTranscodingServices.hpp.

◆ s_usASCIIString

const XalanDOMChar xalanc::XalanTranscodingServices::s_usASCIIString[]
static

Definition at line 229 of file XalanTranscodingServices.hpp.

◆ s_utf16BEString

const XalanDOMChar xalanc::XalanTranscodingServices::s_utf16BEString[]
static

Definition at line 223 of file XalanTranscodingServices.hpp.

◆ s_utf16LEString

const XalanDOMChar xalanc::XalanTranscodingServices::s_utf16LEString[]
static

Definition at line 221 of file XalanTranscodingServices.hpp.

◆ s_utf16String

const XalanDOMChar xalanc::XalanTranscodingServices::s_utf16String[]
static

Definition at line 219 of file XalanTranscodingServices.hpp.

◆ s_utf32String

const XalanDOMChar xalanc::XalanTranscodingServices::s_utf32String[]
static

Definition at line 225 of file XalanTranscodingServices.hpp.

◆ s_utf8String

const XalanDOMChar xalanc::XalanTranscodingServices::s_utf8String[]
static

Definition at line 217 of file XalanTranscodingServices.hpp.

◆ s_windows1250String

const XalanDOMChar xalanc::XalanTranscodingServices::s_windows1250String[]
static

Definition at line 231 of file XalanTranscodingServices.hpp.


The documentation for this class was generated from the following file: