userdict/src/UdictDocument.cpp
branchRCL_3
changeset 12 e9f0e1110077
parent 9 38691ba2fda5
child 13 261ff9819be3
equal deleted inserted replaced
9:38691ba2fda5 12:e9f0e1110077
     1 /*
       
     2 * Copyright (c) 2002-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:     Japanese user dictionary Document class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include "UdictDocument.h"
       
    25 #include "UdictAppUi.h"
       
    26 #include "UdictModel.h"
       
    27 #include <AknDoc.h>
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ===============================
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CUserDictDocument::NewL
       
    33 // Two-phased constructor.
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 CUserDictDocument* CUserDictDocument::NewL(
       
    37         CEikApplication& aApp)     // CUserDictApp reference
       
    38     {
       
    39     CUserDictDocument* self = new (ELeave) CUserDictDocument(aApp);
       
    40     CleanupStack::PushL(self);
       
    41     self->ConstructL();
       
    42     CleanupStack::Pop(); // self
       
    43 
       
    44     return self;
       
    45     }
       
    46 
       
    47 // Destructor
       
    48 CUserDictDocument::~CUserDictDocument()
       
    49     {
       
    50     delete iModel;
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // CUserDictDocument::CUserDictDocument
       
    55 // C++ default constructor can NOT contain any code, that
       
    56 // might leave.
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 CUserDictDocument::CUserDictDocument(CEikApplication& aApp)
       
    60 : CAknDocument(aApp)    
       
    61     {
       
    62     }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CUserDictDocument::ConstructL
       
    66 // Symbian 2nd phase constructor can leave.
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 void CUserDictDocument::ConstructL()
       
    70     {
       
    71     iModel = CUserDictModel::NewL();
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CUserDictDocument::CreateAppUiL()
       
    76 // Constructs CUserDictAppUi
       
    77 // -----------------------------------------------------------------------------
       
    78 //
       
    79 CEikAppUi* CUserDictDocument::CreateAppUiL()
       
    80     {
       
    81     return new (ELeave) CUserDictAppUi();
       
    82     }
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // CUserDictDocument::Model()
       
    86 // Returns CUserDictModel object.
       
    87 // -----------------------------------------------------------------------------
       
    88 //
       
    89 CUserDictModel& CUserDictDocument::Model() const
       
    90     {
       
    91     return *iModel;
       
    92     }
       
    93 
       
    94 //  End of File