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