loadgen/src/loadgen_document.cpp
branchRCL_3
changeset 19 b3cee849fa46
parent 18 48060abbbeaf
child 20 fad26422216a
equal deleted inserted replaced
18:48060abbbeaf 19:b3cee849fa46
     1 /*
       
     2 * Copyright (c) 2009 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "loadgen_document.h"
       
    21 #include "loadgen_appui.h"
       
    22 #include "loadgen_model.h"
       
    23 
       
    24 // ================= MEMBER FUNCTIONS =======================
       
    25 
       
    26 // constructor
       
    27 CLoadGenDocument::CLoadGenDocument(CEikApplication& aApp)
       
    28 : CAknDocument(aApp)    
       
    29     {
       
    30     }
       
    31 
       
    32 // ----------------------------------------------------
       
    33 
       
    34 // destructor
       
    35 CLoadGenDocument::~CLoadGenDocument()
       
    36     {
       
    37     delete iModel;
       
    38     }
       
    39 
       
    40 // ----------------------------------------------------
       
    41 
       
    42 // EPOC default constructor can leave.
       
    43 void CLoadGenDocument::ConstructL()
       
    44     {
       
    45     iModel = CLoadGenModel::NewL();
       
    46     }
       
    47 
       
    48 // ----------------------------------------------------
       
    49 
       
    50 // Two-phased constructor.
       
    51 CLoadGenDocument* CLoadGenDocument::NewL(CEikApplication& aApp)
       
    52     {
       
    53     CLoadGenDocument* self = new(ELeave) CLoadGenDocument(aApp);
       
    54     CleanupStack::PushL(self);
       
    55     self->ConstructL();
       
    56     CleanupStack::Pop();
       
    57 
       
    58     return self;
       
    59     }
       
    60     
       
    61 // ----------------------------------------------------
       
    62 // CLoadGenDocument::CreateAppUiL()
       
    63 // constructs CLoadGenAppUi
       
    64 // ----------------------------------------------------
       
    65 //
       
    66 CEikAppUi* CLoadGenDocument::CreateAppUiL()
       
    67     {
       
    68     return new (ELeave) CLoadGenAppUi;
       
    69     }
       
    70 
       
    71 // ----------------------------------------------------
       
    72 // CLoadGenDocument::OpenFileL
       
    73 // Overrides CAknDocument::OpenFileL to support document file
       
    74 // ----------------------------------------------------
       
    75 //
       
    76 CFileStore* CLoadGenDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs)
       
    77     {
       
    78     return CEikDocument::OpenFileL(aDoOpen, aFilename, aFs);
       
    79     }
       
    80 
       
    81 // ----------------------------------------------------
       
    82 
       
    83 // End of File