//============================================================================= // Copyright (C) 2002 Radical Entertainment Ltd. All rights reserved. // // File: entrycontext.cpp // // Description: Implementation of EntryContext. // // History: + Created -- Darwin Chau // //============================================================================= //======================================== // System Includes //======================================== #include //======================================== // Project Includes //======================================== #include #include //****************************************************************************** // // Global Data, Local Data, Local Classes // //****************************************************************************** // // Static pointer to instance of singleton. // EntryContext* EntryContext::spInstance = NULL; //****************************************************************************** // // Public Member Functions // //****************************************************************************** //============================================================================== // EntryContext::GetInstance //============================================================================== // // Description: - Access point for the EntryContext singleton. // - Creates the EntryContext if needed. // // Parameters: None. // // Return: Pointer to the EntryContext. // // Constraints: This is a singleton so only one instance is allowed. // //============================================================================== EntryContext* EntryContext::GetInstance() { if( spInstance == NULL ) { spInstance = new(GMA_PERSISTENT) EntryContext; rAssert( spInstance ); } return spInstance; } //****************************************************************************** // // Protected Member Functions // //****************************************************************************** //============================================================================== // EntryContext::OnStart //============================================================================== // // Description: // // Parameters: // // Return: // //============================================================================== void EntryContext::OnStart( ContextEnum previousContext ) { MEMTRACK_PUSH_FLAG( "Entry" ); } //============================================================================== // EntryContext::OnStop //============================================================================== // // Description: // // Parameters: // // Return: // //============================================================================== void EntryContext::OnStop( ContextEnum nextContext ) { MEMTRACK_POP_FLAG( "" ); } //============================================================================== // EntryContext::OnUpdate //============================================================================== // // Description: // // Parameters: // // Return: // //============================================================================== void EntryContext::OnUpdate( unsigned int elapsedTime ) { } //============================================================================== // EntryContext::OnSuspend //============================================================================== // // Description: // // Parameters: // // Return: // //============================================================================== void EntryContext::OnSuspend() { } //============================================================================== // EntryContext::OnResume //============================================================================== // // Description: // // Parameters: // // Return: // //============================================================================== void EntryContext::OnResume() { } //============================================================================== // EntryContext::OnHandleEvent //============================================================================== // // Description: // // Parameters: // // Return: // //============================================================================== void EntryContext::OnHandleEvent( EventEnum id, void* pEventData ) { } //****************************************************************************** // // Private Member Functions // //****************************************************************************** //============================================================================== // EntryContext::EntryContext //============================================================================== // // Description: Constructor. // // Parameters: None. // // Return: N/A. // //==============================================================================// EntryContext::EntryContext() { } //============================================================================== // EntryContext::~EntryContext //============================================================================== // // Description: Destructor. // // Parameters: None. // // Return: N/A. // //==============================================================================// EntryContext::~EntryContext() { spInstance = NULL; }