fep/aknfep/inc/AknFepZhuyinAnalyserDb.inl
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:            vkb control pool inline function 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 inline TInt CZhuyinAnalyserDbFeed::GetSpellCount() const
       
    30     {
       
    31     return iSpellLenBuf.Length();
       
    32     }
       
    33     
       
    34 inline const TPtrC CZhuyinAnalyserDbFeed::GetSpellByIndex( TInt aIndex ) const
       
    35     {
       
    36     int offset = 0;
       
    37     for ( TInt i = 0;  i < aIndex;  ++i  )
       
    38         {
       
    39         offset += iSpellLenBuf[i];
       
    40         }
       
    41     return iSpellBuf.Mid( offset, iSpellLenBuf[aIndex] );
       
    42     }
       
    43 
       
    44 inline TInt CZhuyinAnalyserDbFeed::GetSpellElementCount() const
       
    45     {
       
    46     return iSpellElemLen;
       
    47     }
       
    48     
       
    49 inline TUint16 CZhuyinAnalyserDbFeed::GetSpellElementByIndex( TInt aIndex ) const
       
    50     {
       
    51     return iSpellElemBase + aIndex;
       
    52     }
       
    53 
       
    54 inline TBool CZhuyinAnalyserDbFeed::IsNormalElement( TUint16 aCode ) const
       
    55     {
       
    56     return aCode >= iSpellElemBase && aCode < iSpellElemBase + iSpellElemLen;
       
    57     }
       
    58     
       
    59 inline TSpellType CZhuyinAnalyserDbFeed::GetSpellElementType( TUint16 aCode ) const
       
    60     {
       
    61     return ( TSpellType )iSpellTypeBuf[ aCode - iSpellElemBase ];
       
    62     }
       
    63  
       
    64 inline TBool CZhuyinAnalyserDbFeed::IsFirstElement( TUint16 aCode ) const
       
    65     {
       
    66     for ( TInt i = 0; i < iNoFirstElements.Length(); i++ )
       
    67         {
       
    68         if ( iNoFirstElements[i] == aCode )
       
    69             {
       
    70             return EFalse;
       
    71             }
       
    72         }
       
    73     return ETrue;
       
    74     }
       
    75 
       
    76  
       
    77