www.pudn.com > UIQ_Code1.rar > CommandsApplication.cpp


// CommandsApplication.cpp 
// 
// © Symbian Software Ltd 2005. All rights reserved. 
// 
 
#include "CommandsApplication.h" 
#include "CommandsDocument.h" 
#include "CommandsExternalInterface.h" // contains the application UID 
 
#include  
 
/** 
The function is called by the UI framework to ask for the  
application's UID. The returned value is defined by the  
constant KUidCommandsApp and must match the second value  
defined in the project definition file (commands.mmp). 
 
@return The application ID 
*/ 
TUid CCommandsApplication::AppDllUid() const 
	{ 
	return KUidCommandsApp; 
	} 
 
/** 
This function is called by the UI framework at application start-up.  
It creates an instance of the document class. 
 
@return A pointer to the newly created document. 
*/ 
CApaDocument* CCommandsApplication::CreateDocumentL() 
	{ 
	return CCommandsDocument::NewL(*this); 
	} 
 
/** 
The function is called by the framework immediately after it has started the  
application's EXE. It is called by the framework and is expected to have  
exactly this prototype. 
Function is a non-leaving function, this because we need to create the  
application object or return NULL on failure. Therefore we can’t use the  
new(ELeave) operator. 
 
@return Instance of the application class. 
*/ 
CApaApplication* NewApplication() 
	{ 
	return new CCommandsApplication; 
	} 
 
/** 
E32Main() contains the program's start up code, the entry point for an EXE. 
*/ 
GLDEF_C TInt E32Main() 
	{ 
	return EikStart::RunApplication(NewApplication); 
	}