helloviewdocument.cpp

来自「symbianOS第三版开发与实用教程部分源码和部分试验」· C++ 代码 · 共 91 行

CPP
91
字号
/*
============================================================================
 Name        : HelloViewDocument.cpp
 Author      : Lion
 Copyright   : Your copyright notice
 Description : CHelloViewDocument implementation
============================================================================
*/


// INCLUDE FILES
#include "HelloViewAppUi.h"
#include "HelloViewDocument.h"

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CHelloViewDocument::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CHelloViewDocument* CHelloViewDocument::NewL( CEikApplication&
                                                          aApp )
    {
    CHelloViewDocument* self = NewLC( aApp );
    CleanupStack::Pop( self );
    return self;
    }

// -----------------------------------------------------------------------------
// CHelloViewDocument::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CHelloViewDocument* CHelloViewDocument::NewLC( CEikApplication&
                                                           aApp )
    {
    CHelloViewDocument* self =
        new ( ELeave ) CHelloViewDocument( aApp );

    CleanupStack::PushL( self );
    self->ConstructL();
    return self;
    }

// -----------------------------------------------------------------------------
// CHelloViewDocument::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CHelloViewDocument::ConstructL()
    {
    // No implementation required
    }

// -----------------------------------------------------------------------------
// CHelloViewDocument::CHelloViewDocument()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CHelloViewDocument::CHelloViewDocument( CEikApplication& aApp )
    : CAknDocument( aApp )
    {
    // No implementation required
    }

// ---------------------------------------------------------------------------
// CHelloViewDocument::~CHelloViewDocument()
// Destructor.
// ---------------------------------------------------------------------------
//
CHelloViewDocument::~CHelloViewDocument()
    {
    // No implementation required
    }

// ---------------------------------------------------------------------------
// CHelloViewDocument::CreateAppUiL()
// Constructs CreateAppUi.
// ---------------------------------------------------------------------------
//
CEikAppUi* CHelloViewDocument::CreateAppUiL()
    {
    // Create the application user interface, and return a pointer to it;
    // the framework takes ownership of this object
    return ( static_cast <CEikAppUi*> ( new ( ELeave )
                                        CHelloViewAppUi ) );
    }

// End of File

⌨️ 快捷键说明

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