equal
deleted
inserted
replaced
21 #define __FINDUTILKOREAN__ |
21 #define __FINDUTILKOREAN__ |
22 |
22 |
23 #include <e32std.h> |
23 #include <e32std.h> |
24 |
24 |
25 #include "FindUtilBase.h" |
25 #include "FindUtilBase.h" |
26 |
|
27 #ifdef _DEBUG |
|
28 #include <f32file.h> |
|
29 class CCnvCharacterSetConverter; |
|
30 #endif |
|
31 |
26 |
32 /** |
27 /** |
33 * CFindUtilKorean utils class |
28 * CFindUtilKorean utils class |
34 * |
29 * |
35 * This class is Korean find utils class. It handle Korean variant find |
30 * This class is Korean find utils class. It handle Korean variant find |
60 public: |
55 public: |
61 TBool IsKoreanLanguage( const TDesC& aDes ); |
56 TBool IsKoreanLanguage( const TDesC& aDes ); |
62 |
57 |
63 private: |
58 private: |
64 |
59 |
65 enum TMatchFlag |
|
66 { |
|
67 EMatchFlagNone = 0x0000, |
|
68 EMatchFlagAsterikInLast = 0x0001, |
|
69 EMatchFlagAsterikInStart = 0x0002 |
|
70 }; |
|
71 |
|
72 CFindUtilKorean(); |
60 CFindUtilKorean(); |
73 |
61 |
74 void ConstructL(); |
62 void ConstructL(); |
75 |
63 |
76 /** |
64 /** |
79 * @since S60 v3.2 |
67 * @since S60 v3.2 |
80 * @param aItemString for string to being compared |
68 * @param aItemString for string to being compared |
81 * @param aSearchText for text to be used in searching |
69 * @param aSearchText for text to be used in searching |
82 * @return ETrue if match found, EFalse otherwise |
70 * @return ETrue if match found, EFalse otherwise |
83 */ |
71 */ |
84 TInt IsFindMatch( |
72 TBool IsFindMatchL( |
85 const TDesC& aItemString, |
73 const TDesC& aItemString, |
86 const TDesC& aSearchText, |
74 const TDesC& aSearchText ); |
87 const TMatchFlag aFlag = EMatchFlagNone); |
|
88 |
75 |
89 /** |
76 /** |
90 * Decomposes given string to plain jamos. |
77 * Decomposes given string to plain jamos. |
91 * |
78 * |
92 * @since S60 v3.2 |
79 * @since S60 v3.2 |
95 */ |
82 */ |
96 void DecomposeToPlainJamos( |
83 void DecomposeToPlainJamos( |
97 const TDesC& aString, |
84 const TDesC& aString, |
98 HBufC* aDecomposedString ); |
85 HBufC* aDecomposedString ); |
99 |
86 |
100 void DecomposeChar( TChar aChar, TDes& aDecomposedString ); |
|
101 |
|
102 /** |
87 /** |
103 * Decomposes hangul syllables to single jamos. |
88 * Decomposes hangul syllables to single jamos. |
104 * |
89 * |
105 * @since S60 v3.2 |
90 * @since S60 v3.2 |
106 * @param aChar for char to be decomposed |
91 * @param aChar for char to be decomposed |
179 */ |
164 */ |
180 TBool MatchAdaptiveRefineL( const TDesC& aItemString, |
165 TBool MatchAdaptiveRefineL( const TDesC& aItemString, |
181 const TDesC& aSearchText, |
166 const TDesC& aSearchText, |
182 HBufC*& aNextChars); |
167 HBufC*& aNextChars); |
183 |
168 |
184 private: |
|
185 |
|
186 void TakeIntoNextCharsL(HBufC*& aNextChars, TChar aChar); |
|
187 |
|
188 void InsertNextCharsL( |
|
189 HBufC*& aNextChars, |
|
190 TBool& aReAlloced, |
|
191 const TChar& aChar, |
|
192 const TInt aIndex = KErrNotFound); |
|
193 |
|
194 inline TBool MatchConsonentBased(const TChar& aA, const TChar& aB); |
|
195 |
|
196 private: |
|
197 |
|
198 TUid iCurrentProcessUid3; |
|
199 |
|
200 #ifdef _DEBUG |
|
201 RFs iFs; |
|
202 CCnvCharacterSetConverter* iConv; |
|
203 #endif |
|
204 |
|
205 }; |
169 }; |
206 |
170 |
207 #endif // __FINDUTILKOREAN__ |
171 #endif // __FINDUTILKOREAN__ |
208 |
172 |
209 // End of File |
173 // End of File |