oandxdocument.cpp

来自「Symbian OS C++ 手机应用开发(第一卷)部分事例代码」· C++ 代码 · 共 60 行

CPP
60
字号
// Copyright (c) 2004, Symbian Software Ltd. All rights reserved.

#include "OandXApplication.h"
#include "OandXAppUi.h"
#include "OandXDocument.h"

COandXDocument* COandXDocument::NewL(CEikApplication& aApp)
    {
    COandXDocument* self = NewLC(aApp);
    CleanupStack::Pop(self);
    return self;
    }

COandXDocument* COandXDocument::NewLC(CEikApplication& aApp)
    {
    COandXDocument* self = new (ELeave) COandXDocument(aApp);
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }

void COandXDocument::ConstructL()
    {
	// No implementation required
    }

COandXDocument::COandXDocument(CEikApplication& aApp) : CAknDocument(aApp)
    {
	// No implementation required
    }

COandXDocument::~COandXDocument()
    {
	// No implementation required
    }

CEikAppUi* COandXDocument::CreateAppUiL()
    {
    iAppUi = new (ELeave) COandXAppUi;
    return (static_cast <CEikAppUi*> (iAppUi));
    }

void COandXDocument::StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const
    {
    TStreamId id = iAppUi->StoreL(aStore);
    aStreamDic.AssignL(KUidOandXApp, id);
    }
    
void COandXDocument::RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic)
    {
    TStreamId id = aStreamDic.At(KUidOandXApp);
    iAppUi->RestoreL(aStore, id);
    }
    
   
CFileStore* COandXDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs)
    {
    return CEikDocument::OpenFileL(aDoOpen,aFilename,aFs);
    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?