|
1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This class represents an element of Japanese user dictionary |
|
15 * for Japanese FEP. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include "UdictElement.h" |
|
25 |
|
26 // CONSTANTS |
|
27 _LIT(KListSeparator, "\t"); |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // TUDictElement::TUDictElement |
|
33 // C++ default constructor can NOT contain any code, that |
|
34 // might leave. |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 TUDictElement::TUDictElement() |
|
38 :iWord(KListSeparator), iReading(KNullDesC) |
|
39 { |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // TUDictElement::Word |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 TPtrC TUDictElement::Word() const |
|
47 { |
|
48 // Omits the head ListBox's separator character in the word buffer. |
|
49 return iWord.Mid(1); |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // TUDictElement::Reading |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 TPtrC TUDictElement::Reading() const |
|
57 { |
|
58 return iReading; |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // TUDictElement::SetWord |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 void TUDictElement::SetWord(TDesC& aWord) |
|
66 { |
|
67 // Sets a ListBox's item separator in head. |
|
68 iWord = KListSeparator; |
|
69 iWord.Append(aWord); |
|
70 } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // TUDictElement::SetWord |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 void TUDictElement::SetWord(TDesC& aWord, TDesC& aReading) |
|
77 { |
|
78 SetWord(aWord); |
|
79 SetReading(aReading); |
|
80 } |
|
81 |
|
82 // End of File |