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