fep/aknfep/inc/AknFepZhuyinAnalyser.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2002-2005 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:            Pen input related enums
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 #ifndef C_AKNFEPZHUYINANALYSER_H
       
    29 #define C_AKNFEPZHUYINANALYSER_H
       
    30 
       
    31 
       
    32 #include <e32base.h>
       
    33 
       
    34 class TSpellBand;      
       
    35 class CZhuyinAnalyserDbFeed;
       
    36 
       
    37 /**
       
    38  *  Composition no chars ui state
       
    39  *  It provides key event handling and internal event handling in composition no chars state
       
    40  *
       
    41  *  @lib peninputvkbcn.lib
       
    42  *  @since S60 v3.2
       
    43  */
       
    44 class CAknFepZhuyinAnalyser : public CBase
       
    45     {
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      *
       
    51      * @since S60 v3.2
       
    52      * @param aDb The database file for pinyin or spell
       
    53      * @return The pointer point to CAknFepVkbPinyinAnalyser type object
       
    54      */
       
    55     static CAknFepZhuyinAnalyser* NewL( CZhuyinAnalyserDbFeed* aDb );
       
    56         
       
    57     /**
       
    58      * Destructor.
       
    59      *
       
    60      * @since S60 v3.2
       
    61      */
       
    62     virtual ~CAknFepZhuyinAnalyser();
       
    63         
       
    64     /**
       
    65      * Process key event
       
    66      *
       
    67      * @since S60 v3.2
       
    68      * @param aData Carry information of key pressed
       
    69      * @return ETrue means event was responsed, otherwise EFalse
       
    70      */
       
    71 
       
    72         
       
    73     TBool AnalyzeL(const TDesC& aInputString);
       
    74     
       
    75     HBufC* LastAnalysisResult();
       
    76     
       
    77 private:
       
    78     CAknFepZhuyinAnalyser();
       
    79     void ConstructL( CZhuyinAnalyserDbFeed* aDb );
       
    80     TBool DetailAnalyseL(const TDesC& aInputString);
       
    81     TBool FindSpell(const TDesC& aSpell, TInt& aSameLength);
       
    82     TInt  Compare(const TDesC& aFirst, const TDesC& aSecond, TInt& aSameLength);
       
    83   
       
    84 private:
       
    85     TSpellBand* iParagraph;
       
    86     TPtrC*      iSpellLibrary;
       
    87     HBufC*      iLastResult;
       
    88     RArray<TInt> iSeperators;
       
    89     CZhuyinAnalyserDbFeed* iDb;
       
    90     TBool   iAnalysisFlag;
       
    91     };
       
    92 
       
    93 #endif // C_AKNFEPZHUYINANALYSER_H