EncodingInfo Class Reference

Provides information about encodings. More...

List of all members.

Static Public Member Functions

static void CheckEncodingType (simba_int16 in_encType)
 Checks if the given integral value can be safely cast to EncodingType.
static EncodingType GetEncodingEnum (const simba_string &in_converterName)
 Attempts to lookup an encoding name and return the EncodingType enum.
static const simba_charGetEncodingName (EncodingType in_encType)
 Returns the name of the encoding as a NUL-terminated string.
static simba_size_t GetMaxBytesAfterConversion (simba_size_t in_srcBytes, EncodingType in_srcType, EncodingType in_dstType)
 Returns the maximum number of bytes that would be used after conversion.
static simba_uint8 GetMaxBytesInCodePoint (EncodingType in_encType)
 Returns the maximum number of bytes that may be used to represent a code point.
static simba_size_t GetMaxCodeUnitsAfterConversion (simba_size_t in_srcLen, EncodingType in_dstType)
 Returns the maximum number of code units that would be used after conversion.
static simba_uint8 GetMaxCodeUnitsInCodePoint (EncodingType in_encType)
 Returns the maximum number of code units that may be used to represent a code point.
static simba_uint8 GetNumBytesInCodeUnit (EncodingType in_encType)
 Returns the minimum number of bytes in a character for the given encoding.
static bool IsAsciiCompatible (EncodingType in_encType)
 Indicates if the encoding is an extension of ASCII.

Detailed Description

Provides information about encodings.


Member Function Documentation

static void CheckEncodingType ( simba_int16  in_encType  )  [static]

Checks if the given integral value can be safely cast to EncodingType.

Throws an ErrorException if it cannot.

Parameters:
in_encType The encoding.
static EncodingType GetEncodingEnum ( const simba_string in_converterName  )  [static]

Attempts to lookup an encoding name and return the EncodingType enum.

Throws an exception if the name isn't known. (This will attempt to lookup various aliases if possible)

Parameters:
in_converterName Name to lookup.
Returns:
EncodingType enum corresponding to in_converterName.
static const simba_char* GetEncodingName ( EncodingType  in_encType  )  [static]

Returns the name of the encoding as a NUL-terminated string.

Parameters:
in_encType The encoding.
Returns:
The name of the encoding as a NUL-terminated ASCII string.
static simba_size_t GetMaxBytesAfterConversion ( simba_size_t  in_srcBytes,
EncodingType  in_srcType,
EncodingType  in_dstType 
) [static]

Returns the maximum number of bytes that would be used after conversion.

Parameters:
in_srcLen The length of the source in bytes
in_srcType The source encoding.
in_dstType The dest encoding.
Returns:
The maximum number of bytes that would be used after conversion.
static simba_uint8 GetMaxBytesInCodePoint ( EncodingType  in_encType  )  [static]

Returns the maximum number of bytes that may be used to represent a code point.

Parameters:
in_encType The encoding.
Returns:
the maximum bytes that can be used to represent a code point.
static simba_size_t GetMaxCodeUnitsAfterConversion ( simba_size_t  in_srcLen,
EncodingType  in_dstType 
) [static]

Returns the maximum number of code units that would be used after conversion.

Parameters:
in_srcLen The length of the source in code units.
in_dstType The dest encoding.
Returns:
The maximum number of code units that would be used after conversion.
static simba_uint8 GetMaxCodeUnitsInCodePoint ( EncodingType  in_encType  )  [static]

Returns the maximum number of code units that may be used to represent a code point.

Parameters:
in_encType The encoding.
Returns:
the maximum code units that can be used to represent a code point.
static simba_uint8 GetNumBytesInCodeUnit ( EncodingType  in_encType  )  [static]

Returns the minimum number of bytes in a character for the given encoding.

A unit of this size will be considered a "code unit" for that encoding.

Parameters:
in_encType The encoding.
Returns:
the byte count of a code unit for the given encoding.
static bool IsAsciiCompatible ( EncodingType  in_encType  )  [static]

Indicates if the encoding is an extension of ASCII.

Parameters:
in_encType The encoding.
Returns:
true if the encoding is an extension of ASCII.

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

Generated on Wed May 17 14:21:18 2017 for SimbaEngine 10.1.3.1011 by simba