S60 3rd Edition SDK for Symbian OS
Example Applications Guide

LandmarksEngineBase.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : LandmarksEngineBase.cpp
00004 *  Part of     : Landmark Reference Application
00005 *  Interface   : -
00006 *  Description : Implements the CLandmarksEngineBase class
00007 *  Version     : 1.0
00008 *
00009 *  Copyright (c) 2004-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 // INCLUDE FILES
00017 #include <EPos_CPosLandmarkDatabase.h>
00018 #include <EPos_CPosLandmarkSearch.h>
00019 
00020 #include "LandmarksEngineBase.h"
00021 #include "LandmarksLmOpWrapper.h"
00022 
00023 // ============================ MEMBER FUNCTIONS ===============================
00024 
00025 // -----------------------------------------------------------------------------
00026 // CLandmarksEngineBase::CLandmarksEngineBase
00027 // C++ constructor can NOT contain any code, that
00028 // might leave.
00029 // -----------------------------------------------------------------------------
00030 //
00031 CLandmarksEngineBase::CLandmarksEngineBase(
00032     CPosLandmarkDatabase& aDb) 
00033 :   CActive(CActive::EPriorityStandard), 
00034     iDb(aDb)
00035     {
00036     CActiveScheduler::Add(this);
00037     }
00038 
00039 // -----------------------------------------------------------------------------
00040 // CLandmarksEngineBase::ConstructL
00041 // Symbian 2nd phase constructor can leave.
00042 // -----------------------------------------------------------------------------
00043 //
00044 void CLandmarksEngineBase::ConstructL()
00045     {
00046     iSearcher = CPosLandmarkSearch::NewL(iDb);
00047     iLmOpWrapper = new (ELeave) CLandmarksLmOpWrapper();
00048     }
00049 
00050 // Destructor
00051 CLandmarksEngineBase::~CLandmarksEngineBase()
00052     {
00053     delete iLmOpWrapper;
00054     delete iSearcher;
00055     }
00056 
00057 // -----------------------------------------------------------------------------
00058 // CLandmarksEngineBase::SetPrio
00059 // 
00060 // (other items were commented in a header).
00061 // -----------------------------------------------------------------------------
00062 //
00063 void CLandmarksEngineBase::SetPrio(CActive::TPriority aPriority)
00064     {
00065     iPriority = aPriority;
00066     }
00067 
00068 // -----------------------------------------------------------------------------
00069 // CLandmarksEngineBase::SetPriorityAndSetActive
00070 // 
00071 // (other items were commented in a header).
00072 // -----------------------------------------------------------------------------
00073 //
00074 void CLandmarksEngineBase::SetPriorityAndSetActive()
00075     {
00076     if (iPriority != Priority())
00077         {
00078         CActive::SetPriority(iPriority);
00079         }
00080     SetActive();
00081     }
00082 
00083 //  End of File  
00084 

© Nokia 2006

Back to top