textinput/ptienginev2/src/PtiHwrRecognizer.cpp
changeset 0 eb1f2e154e89
child 9 e6a39382bb9c
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2004 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:   Predective text input engine Hwr Recognizer local methods.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDES
       
    21 #include <ecom/ecom.h>
       
    22 #include "PtiHwrRecognizer.h"
       
    23 #include "PtiSymbolList.h"
       
    24 #include "PtiTruiEngine.h"
       
    25 
       
    26 const TUid KCHwrInterfaceUid =  {0x1028185d};
       
    27 _LIT8(KInnerSeparator, "-");
       
    28 _LIT8(KDataSeparator, "||");
       
    29 
       
    30 // ---------------------------------------------------------------------------
       
    31 // CHwrRecognizer::NewL(TInt aImpId)
       
    32 // (other items were commented in a header).
       
    33 // ---------------------------------------------------------------------------
       
    34 // 
       
    35 EXPORT_C CHwrRecognizer* CHwrRecognizer::NewL(TInt aImpId)
       
    36     {
       
    37     CHwrRecognizer* interface = (CHwrRecognizer*)REComSession::CreateImplementationL (TUid::Uid(aImpId), 
       
    38                                                                                       _FOFF(CHwrRecognizer, iDtor_ID_Key));
       
    39 
       
    40     return interface;
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // CHwrRecognizer::NewL(const TLanguage aLanguage)
       
    45 // (other items were commented in a header).
       
    46 // ---------------------------------------------------------------------------
       
    47 // 
       
    48 EXPORT_C CHwrRecognizer* CHwrRecognizer::NewL(const TLanguage aLanguage, TUid& aHwrImplUid) 
       
    49     {
       
    50     RArray<TUid> uidArray;
       
    51     ListImplementationsL(aLanguage, uidArray);
       
    52 
       
    53     if (uidArray.Count() > 0)
       
    54     	{
       
    55         CleanupClosePushL(uidArray);
       
    56             	    
       
    57         CHwrRecognizer* interface = (CHwrRecognizer*)REComSession::CreateImplementationL (uidArray[0], 
       
    58                                                                                           _FOFF(CHwrRecognizer, iDtor_ID_Key));
       
    59         
       
    60         aHwrImplUid = uidArray[0];
       
    61         
       
    62         CleanupStack::PopAndDestroy();  // uidArray        
       
    63         
       
    64         return interface; 
       
    65     	}
       
    66     else
       
    67         {
       
    68         return NULL;        
       
    69         }     
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // CHwrRecognizer::~CHwrRecognizer
       
    74 // (other items were commented in a header).
       
    75 // ---------------------------------------------------------------------------
       
    76 // 
       
    77 EXPORT_C CHwrRecognizer::~CHwrRecognizer()
       
    78     {
       
    79     REComSession::DestroyedImplementation(iDtor_ID_Key);
       
    80     delete iUdmEngine;
       
    81     }
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // CHwrRecognizer::ListImplementationsL
       
    85 // (other items were commented in a header).
       
    86 // ---------------------------------------------------------------------------
       
    87 // 
       
    88 EXPORT_C void CHwrRecognizer::ListImplementationsL(const TLanguage aLanguage, RArray<TUid>& aImpIdList)
       
    89     {
       
    90     CleanupClosePushL(aImpIdList);
       
    91 
       
    92     RImplInfoPtrArray infoArray;
       
    93     extern void Cleanup( TAny* aAny );
       
    94     CleanupStack::PushL(TCleanupItem(Cleanup, &infoArray));
       
    95     
       
    96     REComSession::ListImplementationsL(KCHwrInterfaceUid, infoArray);
       
    97         
       
    98     for (TInt i=0; i<infoArray.Count(); i++)
       
    99         {
       
   100         if (Match(infoArray[i]->DataType(), aLanguage))
       
   101         	{
       
   102         	User::LeaveIfError(aImpIdList.Append(infoArray[i]->ImplementationUid()));
       
   103         	}
       
   104         }
       
   105     	
       
   106     CleanupStack::PopAndDestroy(); // infoArray 
       
   107     
       
   108     CleanupStack::Pop();  //  aImpIdList
       
   109     }
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // CHwrRecognizer::GetRanges
       
   113 // (other items were commented in a header).
       
   114 // ---------------------------------------------------------------------------
       
   115 // 
       
   116 void CHwrRecognizer::GetRanges(const TDesC8& aRangeData, 
       
   117                                TInt& aLowerValue, 
       
   118                                TInt& aUpperValue)
       
   119     {
       
   120     aLowerValue = aUpperValue = 0;
       
   121     const TInt separatorLength = KInnerSeparator().Length();
       
   122     TInt separatorPos = aRangeData.Find(KInnerSeparator); 
       
   123     TLex8 atoi;
       
   124 
       
   125     if(separatorPos == KErrNotFound)
       
   126         {
       
   127         atoi.Assign(aRangeData);
       
   128         atoi.Val(aLowerValue);
       
   129         aUpperValue = aLowerValue;
       
   130         }
       
   131     else
       
   132         {
       
   133         //get low bound
       
   134         atoi.Assign(aRangeData.Left(separatorPos));
       
   135         atoi.Val(aLowerValue);
       
   136         //get upper bound
       
   137         atoi.Assign(aRangeData.Mid(separatorPos + separatorLength));
       
   138         atoi.Val(aUpperValue);
       
   139         }
       
   140     }
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // CHwrRecognizer::Match
       
   144 // (other items were commented in a header).
       
   145 // ---------------------------------------------------------------------------
       
   146 // 
       
   147 TBool CHwrRecognizer::Match(const TDesC8& aImplementationData, TInt aValue)
       
   148 	{
       
   149     TBool gotMatch = EFalse;
       
   150     TInt lower, upper;
       
   151     const TInt separatorLength = KDataSeparator().Length();
       
   152     TInt separatorPos = aImplementationData.Find(KDataSeparator);
       
   153 
       
   154     if(separatorPos == KErrNotFound)
       
   155         {
       
   156         GetRanges(aImplementationData, lower, upper);
       
   157         if( aValue <= upper && aValue >= lower )
       
   158             {
       
   159             gotMatch = ETrue;
       
   160             }
       
   161         }
       
   162     else
       
   163         {
       
   164         // Find the first section, up to the separator
       
   165         TInt startPos = 0;
       
   166 
       
   167         while( separatorPos != KErrNotFound )
       
   168             {
       
   169             TPtrC8 dataSection = aImplementationData.Mid(startPos, separatorPos);
       
   170             startPos += separatorPos + separatorLength;
       
   171             TPtrC8 remainingData = aImplementationData.Mid(startPos );
       
   172             GetRanges(dataSection, lower, upper);
       
   173 
       
   174             if( aValue <= upper && aValue >= lower )
       
   175                 {
       
   176                 gotMatch = ETrue;
       
   177                 break;
       
   178                 }
       
   179 
       
   180             separatorPos = remainingData.Find(KDataSeparator);
       
   181 
       
   182             if( separatorPos == KErrNotFound )
       
   183                 {
       
   184                 GetRanges(remainingData, lower, upper);
       
   185                 if( aValue <= upper && aValue >= lower )
       
   186                     {
       
   187                     gotMatch = ETrue;
       
   188                     }
       
   189                 }
       
   190             }
       
   191         }
       
   192 
       
   193     return gotMatch;
       
   194 	}
       
   195 
       
   196 // ---------------------------------------------------------------------------
       
   197 // CHwrRecognizer::AppendMatchedLanguages
       
   198 // (other items were commented in a header).
       
   199 // ---------------------------------------------------------------------------
       
   200 // 
       
   201 void CHwrRecognizer::AppendMatchedLanguagesL(const TDesC8& aImplementationData, RArray<TInt>& aResult)
       
   202 	{
       
   203     TInt lower, upper, i;
       
   204     const TInt separatorLength = KDataSeparator().Length();
       
   205         
       
   206     TInt separatorPos = aImplementationData.Find(KDataSeparator);
       
   207         
       
   208     if(separatorPos == KErrNotFound)
       
   209         {
       
   210         GetRanges(aImplementationData, lower, upper);
       
   211 
       
   212         for (i = lower; i <= upper; i++)
       
   213           	{
       
   214             if (aResult.Find(i) == KErrNotFound)
       
   215                	{
       
   216                 User::LeaveIfError(aResult.Append(i));
       
   217                	}
       
   218            	}
       
   219         }
       
   220     else
       
   221         {
       
   222         TInt startPos = 0;
       
   223 
       
   224         while (separatorPos != KErrNotFound)
       
   225          	{
       
   226             TPtrC8 dataSection = aImplementationData.Mid(startPos, separatorPos);
       
   227             startPos += separatorPos + separatorLength;
       
   228             TPtrC8 remainingData = aImplementationData.Mid(startPos );
       
   229             
       
   230             GetRanges(dataSection, lower, upper);
       
   231 
       
   232            	for (i = lower; i <= upper; i++)
       
   233            		{
       
   234            		if (aResult.Find(i) == KErrNotFound)
       
   235            			{
       
   236            			User::LeaveIfError(aResult.Append(i));
       
   237            			}
       
   238            		}
       
   239             		
       
   240            	separatorPos = remainingData.Find(KDataSeparator);
       
   241 
       
   242            	if (separatorPos == KErrNotFound)
       
   243            		{
       
   244            		GetRanges(remainingData, lower, upper);
       
   245 
       
   246                 for (i = lower; i <= upper; i++)
       
   247             	    {
       
   248                     if (aResult.Find(i) == KErrNotFound)
       
   249                 	    {
       
   250                 	    User::LeaveIfError(aResult.Append(i));
       
   251                 	    }
       
   252             	    }
       
   253             	}
       
   254             }
       
   255         }
       
   256 	}
       
   257 
       
   258 // ---------------------------------------------------------------------------
       
   259 // CHwrRecognizer::ListAvailableLanguages
       
   260 // (other items were commented in a header).
       
   261 // ---------------------------------------------------------------------------
       
   262 // 
       
   263 EXPORT_C void CHwrRecognizer::ListAvailableLanguagesL(RArray<TInt>& aResult)
       
   264     {
       
   265     RImplInfoPtrArray infoArray;
       
   266     
       
   267     extern void Cleanup( TAny* aAny );
       
   268     CleanupStack::PushL(TCleanupItem(Cleanup, &infoArray));
       
   269     
       
   270     REComSession::ListImplementationsL(KCHwrInterfaceUid, infoArray);
       
   271         
       
   272     for (TInt i=0; i<infoArray.Count(); i++)
       
   273     	{
       
   274         AppendMatchedLanguagesL(infoArray[i]->DataType(), aResult);
       
   275         }
       
   276     	
       
   277     CleanupStack::PopAndDestroy();
       
   278     }
       
   279 
       
   280 // ---------------------------------------------------------------------------
       
   281 // CHwrRecognizer::ListGivenAvailableLanguagesL
       
   282 // (other items were commented in a header).
       
   283 // ---------------------------------------------------------------------------
       
   284 // 
       
   285 EXPORT_C void CHwrRecognizer::ListGivenAvailableLanguagesL(TUid aImpId, RArray<TInt>& aResult)
       
   286     {
       
   287     RImplInfoPtrArray infoArray;
       
   288 
       
   289     extern void Cleanup( TAny* aAny );
       
   290     CleanupStack::PushL(TCleanupItem(Cleanup, &infoArray));
       
   291 
       
   292     REComSession::ListImplementationsL(KCHwrInterfaceUid, infoArray);
       
   293         
       
   294     for (TInt i=0; i<infoArray.Count(); i++)
       
   295     	{
       
   296     	if ( aImpId == infoArray[i]->ImplementationUid() )
       
   297     	    {
       
   298             AppendMatchedLanguagesL(infoArray[i]->DataType(), aResult);
       
   299             break;
       
   300     	    }
       
   301     	}
       
   302     	
       
   303     CleanupStack::PopAndDestroy();  // infoArray
       
   304     }
       
   305 
       
   306 // ---------------------------------------------------------------------------
       
   307 // CHwrRecognizer::SetRange
       
   308 // (other items were commented in a header).
       
   309 // ---------------------------------------------------------------------------
       
   310 // 
       
   311 EXPORT_C TInt CHwrRecognizer::SetRange(const TRecognitionRange& /*aRange*/)
       
   312     {
       
   313     return KErrNotSupported;
       
   314     }
       
   315     
       
   316 // ---------------------------------------------------------------------------
       
   317 // CHwrRecognizer::GetRange
       
   318 // (other items were commented in a header).
       
   319 // ---------------------------------------------------------------------------
       
   320 // 
       
   321 EXPORT_C TRecognitionRange CHwrRecognizer::GetRange()
       
   322     {
       
   323     TRecognitionRange aRange;
       
   324 
       
   325     aRange.iLanguage = ELangNone;
       
   326     aRange.iSubRange = 0;
       
   327 
       
   328     return aRange;
       
   329     }
       
   330 
       
   331 // ---------------------------------------------------------------------------
       
   332 // CHwrRecognizer::GetRange
       
   333 // (other items were commented in a header).
       
   334 // ---------------------------------------------------------------------------
       
   335 // 
       
   336 EXPORT_C TInt CHwrRecognizer::AddAuxiliaryRange(const TRecognitionRange& /*aRange*/)
       
   337     {
       
   338     return KErrNotSupported;
       
   339     }
       
   340     
       
   341 // ---------------------------------------------------------------------------
       
   342 // CHwrRecognizer::RemoveAllAuxRange
       
   343 // (other items were commented in a header).
       
   344 // ---------------------------------------------------------------------------
       
   345 // 
       
   346 EXPORT_C void CHwrRecognizer::RemoveAllAuxRange()
       
   347     {
       
   348     }
       
   349 
       
   350 // ---------------------------------------------------------------------------
       
   351 // CHwrRecognizer::RemoveAuxiliaryRange
       
   352 // (other items were commented in a header).
       
   353 // ---------------------------------------------------------------------------
       
   354 // 
       
   355 EXPORT_C TInt CHwrRecognizer::RemoveAuxiliaryRange(const TInt /*aIndex*/)
       
   356     {
       
   357     return KErrNotSupported;
       
   358     }
       
   359 
       
   360 // ---------------------------------------------------------------------------
       
   361 // CHwrRecognizer::SetCandidateNum
       
   362 // (other items were commented in a header).
       
   363 // ---------------------------------------------------------------------------
       
   364 //
       
   365 EXPORT_C TInt CHwrRecognizer::SetCandidateNum(const TInt /*aNumber*/)
       
   366     {
       
   367     return KErrNotSupported;
       
   368     }
       
   369 
       
   370 // ---------------------------------------------------------------------------
       
   371 // CHwrRecognizer::GetCandidateNum
       
   372 // (other items were commented in a header).
       
   373 // ---------------------------------------------------------------------------
       
   374 // 
       
   375 EXPORT_C TInt CHwrRecognizer::GetCandidateNum() const
       
   376     {
       
   377     return KErrNotSupported;    
       
   378     }
       
   379     
       
   380 // ---------------------------------------------------------------------------
       
   381 // CHwrRecognizer::StrokeEndMark
       
   382 // (other items were commented in a header).
       
   383 // ---------------------------------------------------------------------------
       
   384 // 
       
   385 EXPORT_C TPoint CHwrRecognizer::StrokeEndMark() const
       
   386     {
       
   387     TPoint point = TPoint(-65536, -65536);
       
   388     return point;
       
   389     }
       
   390 
       
   391 // ---------------------------------------------------------------------------
       
   392 // CHwrRecognizer::Recognize
       
   393 // (other items were commented in a header).
       
   394 // ---------------------------------------------------------------------------
       
   395 // 
       
   396 EXPORT_C TInt CHwrRecognizer::Recognize(const RArray<TPoint>& /*aTraceData*/, 
       
   397                                              RPointerArray<HBufC>& /*aResult*/)
       
   398     {
       
   399     return KErrNotSupported;
       
   400     }
       
   401 
       
   402 // ---------------------------------------------------------------------------
       
   403 // CHwrRecognizer::SetInputAreaSize
       
   404 // (other items were commented in a header).
       
   405 // ---------------------------------------------------------------------------
       
   406 // 
       
   407 EXPORT_C TInt CHwrRecognizer::SetInputAreaSize(TSize& /*aSize*/)
       
   408     {
       
   409     return KErrNotSupported; 
       
   410     }
       
   411     
       
   412 // ---------------------------------------------------------------------------
       
   413 // CHwrRecognizer::GetEngineVersion
       
   414 // (other items were commented in a header).
       
   415 // ---------------------------------------------------------------------------
       
   416 // 
       
   417 EXPORT_C TInt CHwrRecognizer::GetEngineVersion(TDes& /*aVersion*/)
       
   418     {
       
   419     return KErrNotSupported;
       
   420     }
       
   421 
       
   422 // ---------------------------------------------------------------------------
       
   423 // CHwrRecognizer::GetDictVersion
       
   424 // (other items were commented in a header).
       
   425 // ---------------------------------------------------------------------------
       
   426 // 
       
   427 EXPORT_C TInt CHwrRecognizer::GetDictVersion(TDes& /*aVersion*/)
       
   428     {
       
   429     return KErrNotSupported;
       
   430     }
       
   431 
       
   432 // ---------------------------------------------------------------------------
       
   433 // CHwrRecognizer::EnableWordRecognition
       
   434 // (other items were commented in a header).
       
   435 // ---------------------------------------------------------------------------
       
   436 // 
       
   437 EXPORT_C void CHwrRecognizer::EnableWordRecognition(const TBool /*aFlag*/)
       
   438     {
       
   439     }
       
   440 
       
   441 // ---------------------------------------------------------------------------
       
   442 // CHwrRecognizer::SetFirstLetterOrder
       
   443 // (other items were commented in a header).
       
   444 // ---------------------------------------------------------------------------
       
   445 //
       
   446 EXPORT_C void CHwrRecognizer::SetFirstLetterOrder(const TLatinLetterOrder /*aOrder*/)
       
   447     {
       
   448     }
       
   449 
       
   450 // ---------------------------------------------------------------------------
       
   451 // CHwrRecognizer::SetNumberMode
       
   452 // (other items were commented in a header).
       
   453 // ---------------------------------------------------------------------------
       
   454 // 
       
   455 EXPORT_C void CHwrRecognizer::SetNumberMode(const TAknEditorNumericKeymap /*aNumberMode*/)
       
   456     {
       
   457     }
       
   458 
       
   459 // ---------------------------------------------------------------------------
       
   460 // CHwrRecognizer::SetTopGuideLinePos
       
   461 // (other items were commented in a header).
       
   462 // ---------------------------------------------------------------------------
       
   463 // 
       
   464 EXPORT_C void CHwrRecognizer::GetTopGuideLinePos( TInt& /*aPos*/)
       
   465 	{
       
   466 	}
       
   467 
       
   468 // ---------------------------------------------------------------------------
       
   469 // CHwrRecognizer::SetBottomGuideLinePos
       
   470 // (other items were commented in a header).
       
   471 // ---------------------------------------------------------------------------
       
   472 // 
       
   473 EXPORT_C void CHwrRecognizer::GetBottomGuideLinePos( TInt& /*aPos*/)
       
   474 	{
       
   475 	}
       
   476 	
       
   477 // ---------------------------------------------------------------------------
       
   478 // CHwrRecognizer::SetPermittedSymbolSet
       
   479 // (other items were commented in a header).
       
   480 // ---------------------------------------------------------------------------
       
   481 // 
       
   482 EXPORT_C void CHwrRecognizer::SetPermittedSymbolSet(const TDesC& /*aSymbolSet*/)
       
   483     {
       
   484     }	
       
   485     
       
   486 // ---------------------------------------------------------------------------
       
   487 // CHwrRecognizer::RecognizeWithCharSet
       
   488 // (other items were commented in a header).
       
   489 // ---------------------------------------------------------------------------
       
   490 // 
       
   491 EXPORT_C TInt CHwrRecognizer::RecognizeWithCharSet(const RArray<TPoint>& /*aTraceData*/, 
       
   492                                                    RPointerArray<HBufC>& /*aResult*/,
       
   493                                                    const TDesC& /*aCharSet*/)
       
   494     {
       
   495     return KErrNotSupported;
       
   496     }
       
   497 
       
   498 // ---------------------------------------------------------------------------
       
   499 // CHwrRecognizer::SetAuxCandidateNum
       
   500 // (other items were commented in a header).
       
   501 // ---------------------------------------------------------------------------
       
   502 // 
       
   503 EXPORT_C TInt CHwrRecognizer::SetAuxCandidateNum(const TInt /*aNumber*/)
       
   504     {
       
   505     return KErrNotSupported;
       
   506     }
       
   507 
       
   508 // ---------------------------------------------------------------------------
       
   509 // CHwrRecognizer::GetAuxCandidateNum
       
   510 // (other items were commented in a header).
       
   511 // ---------------------------------------------------------------------------
       
   512 // 
       
   513 EXPORT_C TInt CHwrRecognizer::GetAuxCandidateNum() const
       
   514     {
       
   515     return KErrNotSupported;    
       
   516     }    
       
   517     
       
   518 // ---------------------------------------------------------------------------
       
   519 // CHwrRecognizer::QueryUdmInterfaceL
       
   520 // (other items were commented in a header).
       
   521 // ---------------------------------------------------------------------------
       
   522 //  
       
   523 EXPORT_C MTruiEngine* CHwrRecognizer::QueryUdmInterfaceL()
       
   524     {
       
   525     if ( !IsSupportUdm() )
       
   526         {
       
   527         User::Leave( KErrNotSupported );
       
   528         return NULL;
       
   529         }
       
   530     if ( iUdmEngine == NULL )
       
   531         {
       
   532         iUdmEngine = CTruiPtiEngine::NewL(  this  );  
       
   533         }
       
   534     return static_cast<MTruiEngine*>( iUdmEngine );
       
   535     }
       
   536     
       
   537 // ---------------------------------------------------------------------------
       
   538 // CHwrRecognizer::BeginMcrSession
       
   539 // (other items were commented in a header).
       
   540 // ---------------------------------------------------------------------------
       
   541 // 
       
   542 EXPORT_C void CHwrRecognizer::McrBeginSessionL()
       
   543     {
       
   544     return;
       
   545     }
       
   546 
       
   547 // ---------------------------------------------------------------------------
       
   548 // CHwrRecognizer::McrRecognize
       
   549 // (other items were commented in a header).
       
   550 // ---------------------------------------------------------------------------
       
   551 // 
       
   552 EXPORT_C void CHwrRecognizer::McrAddStrokesL(const RArray<TPoint>& /*aTraceData*/, 
       
   553                                                 RPointerArray<HBufC>& /*aResult*/)
       
   554     {
       
   555     return ;
       
   556     }
       
   557 
       
   558 // ---------------------------------------------------------------------------
       
   559 // CHwrRecognizer::McrEndSessionL
       
   560 // (other items were commented in a header).
       
   561 // ---------------------------------------------------------------------------
       
   562 // 
       
   563 EXPORT_C void CHwrRecognizer::McrEndSessionL( RPointerArray<HBufC>& /*aResult*/ )
       
   564     {
       
   565     return;
       
   566     }       
       
   567 // ---------------------------------------------------------------------------
       
   568 // CHwrRecognizer::IsSupportUdm
       
   569 // (other items were commented in a header).
       
   570 // ---------------------------------------------------------------------------
       
   571 // 
       
   572 EXPORT_C   TBool CHwrRecognizer::IsSupportUdm() const
       
   573     {
       
   574     return EFalse;
       
   575     }
       
   576 
       
   577 // ---------------------------------------------------------------------------
       
   578 // CHwrRecognizer::LoadUdmL
       
   579 // (other items were commented in a header).
       
   580 // ---------------------------------------------------------------------------
       
   581 //     
       
   582 EXPORT_C   void CHwrRecognizer::LoadUdmL( TUdmType aType  )
       
   583     {
       
   584     if ( !iUdmEngine )
       
   585         {
       
   586         iUdmEngine = CTruiPtiEngine::NewL(  this  );
       
   587         }
       
   588     iUdmEngine->LoadUdmL( aType );
       
   589     }
       
   590     
       
   591 // ---------------------------------------------------------------------------
       
   592 // CHwrRecognizer::UnLoadUdmL
       
   593 // (other items were commented in a header).
       
   594 // ---------------------------------------------------------------------------
       
   595 //     
       
   596 EXPORT_C   void CHwrRecognizer::UnLoadUdmL( TUdmType aType )
       
   597     {
       
   598     if ( iUdmEngine )
       
   599         {
       
   600         iUdmEngine->UnLoadUdm( aType );
       
   601         }
       
   602     }
       
   603     
       
   604 // ---------------------------------------------------------------------------
       
   605 // CHwrRecognizer::GetModelIndexListL
       
   606 // (other items were commented in a header).
       
   607 // ---------------------------------------------------------------------------
       
   608 //         
       
   609 EXPORT_C void CHwrRecognizer::GetModelIndexListL( TUdmType aType, RArray<TInt>& aList, const THwrUdmRange& aRange )
       
   610     {
       
   611     User::LeaveIfNull( iUdmEngine );
       
   612     iUdmEngine->GetModelIndexListL( aType, aList, aRange );
       
   613     
       
   614     }
       
   615     
       
   616 // ---------------------------------------------------------------------------
       
   617 // CHwrRecognizer::GetSymbolModelL
       
   618 // (other items were commented in a header).
       
   619 // ---------------------------------------------------------------------------
       
   620 // 
       
   621 EXPORT_C void CHwrRecognizer::GetSymbolModelL( TUdmType aType, TInt aIndex, TPtrC& aSymbolName,RArray<TPoint>& aModel, TInt& aHelpLine, TInt& aBaseLine )
       
   622     {
       
   623     User::LeaveIfNull( iUdmEngine );
       
   624     iUdmEngine->GetSymbolModelL( aType, aIndex, aSymbolName,  aModel, aHelpLine, aBaseLine );
       
   625     }
       
   626 
       
   627  EXPORT_C TInt CHwrRecognizer::SymbolModelValid(  const TDesC& /*aSymbolName*/, const RArray<TPoint>& /*aStrokes*/, THwrUdmRange /*aScriptType*/, TDes& /*aSimilarSymbol*/ )
       
   628     {
       
   629     return KErrNotSupported;
       
   630     }
       
   631  // ---------------------------------------------------------------------------
       
   632  // CHwrRecognizer::EnableRecognitionDictionary
       
   633  // (other items were commented in a header).
       
   634  // ---------------------------------------------------------------------------
       
   635  // 
       
   636 EXPORT_C TInt CHwrRecognizer::EnableRecognitionDictionary(const TBool /* aFlag */)
       
   637     { 
       
   638     return KErrNotSupported;    	    
       
   639     }
       
   640  // ---------------------------------------------------------------------------
       
   641  // CHwrRecognizer::SetScreenSize
       
   642  // (other items were commented in a header).
       
   643  // ---------------------------------------------------------------------------
       
   644  // 
       
   645 EXPORT_C TInt CHwrRecognizer::SetScreenSize(TSize& /*aSize*/) 
       
   646     {
       
   647     return KErrNotSupported;    	
       
   648     }
       
   649 // ---------------------------------------------------------------------------
       
   650 // CHwrRecognizer::EnableGuideline
       
   651 // (other items were commented in a header).
       
   652 // ---------------------------------------------------------------------------
       
   653 // 
       
   654 EXPORT_C TInt CHwrRecognizer::EnableGuideline(const TBool /*aFlag */)
       
   655     {
       
   656     return KErrNotSupported;        
       
   657     }
       
   658 // ======== CPtiHwrRecognizer Implementation ========
       
   659 CPtiHwrRecognizer::~CPtiHwrRecognizer()
       
   660     {
       
   661     delete iHwrRecognizer;
       
   662     iHwrLanguagesList.Close();
       
   663     }
       
   664     
       
   665 // End Of File