os/kernelhwsrv/kerneltest/f32test/locl/CodepageUtils/inc/t_cputils_convdatastruct.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/locl/CodepageUtils/inc/t_cputils_convdatastruct.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,49 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#include <e32std.h>
    1.20 +#include <e32def.h>
    1.21 +
    1.22 +struct TLeadOrSingle
    1.23 +	{
    1.24 +	/**iUnicodeIfSingle can have any of the following values...
    1.25 +	-Unicode character if this is a single byte character;
    1.26 +	-0xFFFD if it's an unidentified character;
    1.27 +	-0xFFFF if it's an "empty" Leadbyte -doesn't have any Tailbytes
    1.28 +	-0 if it's a Leadbyte*/
    1.29 +	TUint16 iUnicodeIfSingle;
    1.30 +	/**Index into the double byte table.*/
    1.31 +	TUint16 iDoubleByteIndex;
    1.32 +	};
    1.33 +
    1.34 +class TConvDataStruct
    1.35 +	{
    1.36 +	public:
    1.37 +		static TInt ConvertSingleUnicode(TInt aUnicode, TInt& aTrailByte);
    1.38 +		
    1.39 +	public:
    1.40 +		/**Conversion table for single bytes and lead bytes from 0x80 to 0xFF.*/
    1.41 +		static const TLeadOrSingle KFirstByteConversions[128];
    1.42 +		/**The double-byte table, stores all Unicode values
    1.43 +		corresponding to double byte characters.*/
    1.44 +		static const TUint16 KDoubleByteConversions[];
    1.45 +		/**Length of double-byte conversion table.*/
    1.46 +		static const TUint16 KDoubleByteConversionLength;
    1.47 +		/**Minimum calue a trail byte may take.*/
    1.48 +		static const TUint8 KMinTrailByte;
    1.49 +		/**Maximum value a trail byte may take.*/
    1.50 +		static const TUint8 KMaxTrailByte;
    1.51 +	};
    1.52 +