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 |
26 |
31 |
27 /** |
32 /** |
28 * CFindUtilKorean utils class |
33 * CFindUtilKorean utils class |
29 * |
34 * |
30 * This class is Korean find utils class. It handle Korean variant find |
35 * This class is Korean find utils class. It handle Korean variant find |
55 public: |
60 public: |
56 TBool IsKoreanLanguage( const TDesC& aDes ); |
61 TBool IsKoreanLanguage( const TDesC& aDes ); |
57 |
62 |
58 private: |
63 private: |
59 |
64 |
|
65 enum TMatchFlag |
|
66 { |
|
67 EMatchFlagNone = 0x0000, |
|
68 EMatchFlagAsterikInLast = 0x0001, |
|
69 EMatchFlagAsterikInStart = 0x0002 |
|
70 }; |
|
71 |
60 CFindUtilKorean(); |
72 CFindUtilKorean(); |
61 |
73 |
62 void ConstructL(); |
74 void ConstructL(); |
63 |
75 |
64 /** |
76 /** |
67 * @since S60 v3.2 |
79 * @since S60 v3.2 |
68 * @param aItemString for string to being compared |
80 * @param aItemString for string to being compared |
69 * @param aSearchText for text to be used in searching |
81 * @param aSearchText for text to be used in searching |
70 * @return ETrue if match found, EFalse otherwise |
82 * @return ETrue if match found, EFalse otherwise |
71 */ |
83 */ |
72 TBool IsFindMatchL( |
84 TInt IsFindMatch( |
73 const TDesC& aItemString, |
85 const TDesC& aItemString, |
74 const TDesC& aSearchText ); |
86 const TDesC& aSearchText, |
|
87 const TMatchFlag aFlag = EMatchFlagNone); |
75 |
88 |
76 /** |
89 /** |
77 * Decomposes given string to plain jamos. |
90 * Decomposes given string to plain jamos. |
78 * |
91 * |
79 * @since S60 v3.2 |
92 * @since S60 v3.2 |
82 */ |
95 */ |
83 void DecomposeToPlainJamos( |
96 void DecomposeToPlainJamos( |
84 const TDesC& aString, |
97 const TDesC& aString, |
85 HBufC* aDecomposedString ); |
98 HBufC* aDecomposedString ); |
86 |
99 |
|
100 void DecomposeChar( TChar aChar, TDes& aDecomposedString ); |
|
101 |
87 /** |
102 /** |
88 * Decomposes hangul syllables to single jamos. |
103 * Decomposes hangul syllables to single jamos. |
89 * |
104 * |
90 * @since S60 v3.2 |
105 * @since S60 v3.2 |
91 * @param aChar for char to be decomposed |
106 * @param aChar for char to be decomposed |
164 */ |
179 */ |
165 TBool MatchAdaptiveRefineL( const TDesC& aItemString, |
180 TBool MatchAdaptiveRefineL( const TDesC& aItemString, |
166 const TDesC& aSearchText, |
181 const TDesC& aSearchText, |
167 HBufC*& aNextChars); |
182 HBufC*& aNextChars); |
168 |
183 |
|
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 |
169 }; |
205 }; |
170 |
206 |
171 #endif // __FINDUTILKOREAN__ |
207 #endif // __FINDUTILKOREAN__ |
172 |
208 |
173 // End of File |
209 // End of File |