os/kernelhwsrv/kerneltest/f32test/locl/CodepageUtils/inc/t_cputils_convdatastruct.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#include <e32std.h>
sl@0
    17
#include <e32def.h>
sl@0
    18
sl@0
    19
struct TLeadOrSingle
sl@0
    20
	{
sl@0
    21
	/**iUnicodeIfSingle can have any of the following values...
sl@0
    22
	-Unicode character if this is a single byte character;
sl@0
    23
	-0xFFFD if it's an unidentified character;
sl@0
    24
	-0xFFFF if it's an "empty" Leadbyte -doesn't have any Tailbytes
sl@0
    25
	-0 if it's a Leadbyte*/
sl@0
    26
	TUint16 iUnicodeIfSingle;
sl@0
    27
	/**Index into the double byte table.*/
sl@0
    28
	TUint16 iDoubleByteIndex;
sl@0
    29
	};
sl@0
    30
sl@0
    31
class TConvDataStruct
sl@0
    32
	{
sl@0
    33
	public:
sl@0
    34
		static TInt ConvertSingleUnicode(TInt aUnicode, TInt& aTrailByte);
sl@0
    35
		
sl@0
    36
	public:
sl@0
    37
		/**Conversion table for single bytes and lead bytes from 0x80 to 0xFF.*/
sl@0
    38
		static const TLeadOrSingle KFirstByteConversions[128];
sl@0
    39
		/**The double-byte table, stores all Unicode values
sl@0
    40
		corresponding to double byte characters.*/
sl@0
    41
		static const TUint16 KDoubleByteConversions[];
sl@0
    42
		/**Length of double-byte conversion table.*/
sl@0
    43
		static const TUint16 KDoubleByteConversionLength;
sl@0
    44
		/**Minimum calue a trail byte may take.*/
sl@0
    45
		static const TUint8 KMinTrailByte;
sl@0
    46
		/**Maximum value a trail byte may take.*/
sl@0
    47
		static const TUint8 KMaxTrailByte;
sl@0
    48
	};
sl@0
    49