perfmon/src/perfmon_document.cpp
changeset 0 d6fe6244b863
equal deleted inserted replaced
-1:000000000000 0:d6fe6244b863
       
     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 "perfmon_document.h"
       
    21 #include "perfmon_appui.h"
       
    22 #include "perfmon_model.h"
       
    23 
       
    24 // ================= MEMBER FUNCTIONS =======================
       
    25 
       
    26 // constructor
       
    27 CPerfMonDocument::CPerfMonDocument(CEikApplication& aApp)
       
    28 : CAknDocument(aApp)    
       
    29     {
       
    30     }
       
    31 
       
    32 // ----------------------------------------------------
       
    33 
       
    34 // destructor
       
    35 CPerfMonDocument::~CPerfMonDocument()
       
    36     {
       
    37     delete iModel;
       
    38     }
       
    39 
       
    40 // ----------------------------------------------------
       
    41 
       
    42 // EPOC default constructor can leave.
       
    43 void CPerfMonDocument::ConstructL()
       
    44     {
       
    45     iModel = CPerfMonModel::NewL();
       
    46     }
       
    47 
       
    48 // ----------------------------------------------------
       
    49 
       
    50 // Two-phased constructor.
       
    51 CPerfMonDocument* CPerfMonDocument::NewL(CEikApplication& aApp)
       
    52     {
       
    53     CPerfMonDocument* self = new(ELeave) CPerfMonDocument(aApp);
       
    54     CleanupStack::PushL(self);
       
    55     self->ConstructL();
       
    56     CleanupStack::Pop();
       
    57 
       
    58     return self;
       
    59     }
       
    60     
       
    61 // ----------------------------------------------------
       
    62 // CPerfMonDocument::CreateAppUiL()
       
    63 // constructs CPerfMonAppUi
       
    64 // ----------------------------------------------------
       
    65 //
       
    66 CEikAppUi* CPerfMonDocument::CreateAppUiL()
       
    67     {
       
    68     return new (ELeave) CPerfMonAppUi;
       
    69     }
       
    70 
       
    71 // ----------------------------------------------------
       
    72 // CPerfMonDocument::OpenFileL
       
    73 // Overrides CAknDocument::OpenFileL to support document file
       
    74 // ----------------------------------------------------
       
    75 //
       
    76 CFileStore* CPerfMonDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs)
       
    77     {
       
    78     return CEikDocument::OpenFileL(aDoOpen, aFilename, aFs);
       
    79     }
       
    80 
       
    81 // ----------------------------------------------------
       
    82 
       
    83 // End of File