fep/aknfep/inc/AknFepZhuyinAnalyserDb.h
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     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_AKNFEPZHUYINANALYSERDB_H
       
    29 #define C_AKNFEPZHUYINANALYSERDB_H
       
    30 
       
    31 
       
    32 #include <e32base.h>
       
    33 
       
    34 enum TPinyinAnalyserDbType
       
    35     {
       
    36     EPinyinAnalyserTypePinyin,
       
    37     EPinyinAnalyserTypeZhuyin
       
    38     };
       
    39 
       
    40 enum TSpellType
       
    41 {
       
    42     ESpellVowel,
       
    43     ESpellConsonant,
       
    44     ESpellSpecialConsonnant
       
    45 };
       
    46 const TUint16 KProgramSeparator = 0x002e;
       
    47 /**
       
    48  *  Composition no chars ui state
       
    49  *  It provides key event handling and internal event handling in composition no chars state
       
    50  *
       
    51  *  @lib peninputvkbcn.lib
       
    52  *  @since S60 v3.2
       
    53  */
       
    54 class CZhuyinAnalyserDbFeed : public CBase
       
    55     {
       
    56 public:
       
    57 
       
    58     /**
       
    59      * Two-phased constructor.
       
    60      *
       
    61      * @since S60 v3.2
       
    62      * @param aUiStateMgr The vkb ui state manager
       
    63      * @param aContext The vkb layout context
       
    64      * @return The pointer point to CAknFepVkbPinyinAnalyser type object
       
    65      */
       
    66     static CZhuyinAnalyserDbFeed* NewL( TPinyinAnalyserDbType aType );
       
    67         
       
    68     /**
       
    69      * Destructor.
       
    70      *
       
    71      * @since S60 v3.2
       
    72      */
       
    73     virtual ~CZhuyinAnalyserDbFeed();
       
    74     
       
    75     /**
       
    76      * Get the Number of whole spell set.        
       
    77      *
       
    78      * @since S60 V4.0        
       
    79      */ 
       
    80     TInt GetSpellCount() const;
       
    81     
       
    82     /**
       
    83      * Get the Number of whole spell set.        
       
    84      *
       
    85      * @since S60 V4.0        
       
    86      * @param The index for the spell.
       
    87      */ 
       
    88     const TPtrC GetSpellByIndex( TInt aIndex ) const;
       
    89     
       
    90     /**
       
    91      * Get the Number of spell elements.        
       
    92      *
       
    93      * @since S60 V4.0        
       
    94      */ 
       
    95     TInt GetSpellElementCount() const;
       
    96     
       
    97     /**
       
    98      * Get the unicode number for spell element index.       
       
    99      *
       
   100      * @since S60 V4.0        
       
   101      * @param The index for the spell element.
       
   102      */ 
       
   103     TUint16 GetSpellElementByIndex( TInt aIndex ) const;
       
   104     
       
   105     TBool IsNormalElement( TUint16 aCode ) const;
       
   106     
       
   107     TSpellType GetSpellElementType( TUint16 aCode ) const;
       
   108     
       
   109     TBool IsFirstElement( TUint16 aCode ) const;
       
   110     
       
   111     TBool IsToneMark( TUint16 aCodeFirst, TUint16 aCodeSecond );
       
   112     
       
   113 private:
       
   114     CZhuyinAnalyserDbFeed();
       
   115     
       
   116     void ConstructL( TPinyinAnalyserDbType aType );
       
   117     
       
   118 private:
       
   119     TPtrC iSpellBuf;
       
   120     TPtrC iSpellLenBuf;
       
   121     TUint16 iSpellElemBase;
       
   122     TUint16 iSpellElemLen;
       
   123     TPtrC iSpellTypeBuf;
       
   124     TPtrC iNoFirstElements;
       
   125     };
       
   126 
       
   127 #include "AknFepZhuyinAnalyserDb.inl"
       
   128 
       
   129 #endif //C_AKNFEPZHUYINANALYSERDB_H