mapnavproviderrefapp/src/mnrpdocument.cpp
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2006 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:  CMnrpDocument class implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "mnrpappui.h"
       
    20 #include "mnrpengine.h"
       
    21 #include "mnrpdocument.h"
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // -----------------------------------------------------------------------------
       
    27 //
       
    28 CMnrpDocument::CMnrpDocument(CEikApplication& aApp) 
       
    29     : CAknDocument(aApp) 
       
    30     {
       
    31     }   
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 void CMnrpDocument::ConstructL()
       
    37     {
       
    38     iEngine = CMnrpEngine::NewL();
       
    39     }    
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CMnrpDocument* CMnrpDocument::NewL( CEikApplication& aApp )
       
    45     {
       
    46     CMnrpDocument* self = new (ELeave) CMnrpDocument(aApp);
       
    47     CleanupStack::PushL(self);
       
    48     self->ConstructL();
       
    49     CleanupStack::Pop(self);
       
    50     return self;
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 CMnrpDocument::~CMnrpDocument()
       
    57     {
       
    58     delete iEngine;
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // -----------------------------------------------------------------------------
       
    63 //
       
    64 CMnrpEngine& CMnrpDocument::Engine()
       
    65     { 
       
    66     return *iEngine; 
       
    67     }
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 CEikAppUi* CMnrpDocument::CreateAppUiL()
       
    73     {
       
    74     // Create the application user interface, and return a pointer to it,
       
    75     // the framework takes ownership of this object
       
    76     CEikAppUi* appUi = new (ELeave) CMnrpAppUi( *iEngine );
       
    77     return appUi;
       
    78     }
       
    79 
       
    80