memspy/CommandLine/Source/MemSpyCommandLineMain.cpp
branchRCL_3
changeset 49 7fdc9a71d314
parent 44 52e343bb8f80
child 59 8ad140f3dd41
equal deleted inserted replaced
46:e26895079d7c 49:7fdc9a71d314
    23 #include <f32file.h>
    23 #include <f32file.h>
    24 #include <bacline.h>
    24 #include <bacline.h>
    25 
    25 
    26 // User includes
    26 // User includes
    27 #include "MemSpyCommandLine.h"
    27 #include "MemSpyCommandLine.h"
    28 
    28 #include "MemSpyCommands.h"
    29 
    29 
    30 // ---------------------------------------------------------------------------
    30 // ---------------------------------------------------------------------------
    31 // DoMainL()
    31 // DoMainL()
    32 // 
    32 // 
    33 // 
    33 // 
    36     {
    36     {
    37     // Scheduler
    37     // Scheduler
    38     CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    38     CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    39     CActiveScheduler::Install( scheduler );
    39     CActiveScheduler::Install( scheduler );
    40     CleanupStack::PushL( scheduler );
    40     CleanupStack::PushL( scheduler );
    41 
    41     
    42     // Get command line 
    42     // Get command line 
    43     CCommandLineArguments* args = CCommandLineArguments::NewLC();
    43     CCommandLineArguments* args = CCommandLineArguments::NewLC();
    44 
    44     
       
    45     //--
       
    46     CConsoleBase* console = Console::NewL( KMemSpyCLIName, TSize( KConsFullScreen, KConsFullScreen ) );
       
    47     CleanupStack::PushL( console );
       
    48     //--
       
    49     
    45     // Command line manager
    50     // Command line manager
    46     CMemSpyCommandLine* commandLineMgr = CMemSpyCommandLine::NewLC();
    51     CMemSpyCommandLine* commandLineMgr = CMemSpyCommandLine::NewLC( *console );
    47 
    52 
    48     // Play nicely with external processes
    53     // Play nicely with external processes
    49     RProcess::Rendezvous( KErrNone );
    54     RProcess::Rendezvous( KErrNone );
    50 
    55 
    51     // Perform op
    56     // Perform op
    52     commandLineMgr->PerformOpL( *args );
    57     commandLineMgr->PerformOpL( *args );  
    53 
    58         
    54     // Tidy up
    59     // Tidy up
    55     CleanupStack::PopAndDestroy( 3, scheduler ); // scheduler, args, commandLineMgr
    60     //CleanupStack::PopAndDestroy( 3, scheduler ); // scheduler, args, commandLineMgr
       
    61     CleanupStack::PopAndDestroy( 4 ); // scheduler, args,  console, commandLineMgr
    56     }
    62     }
    57    
    63    
    58 
    64 
    59 
    65 
    60 // ---------------------------------------------------------------------------
    66 // ---------------------------------------------------------------------------