memspyui/source/MemSpyViewThreadInfoItemStack.cpp
branchRCL_3
changeset 22 fad26422216a
parent 0 d6fe6244b863
equal deleted inserted replaced
21:b3cee849fa46 22:fad26422216a
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "MemSpyViewThreadInfoItemStack.h"
       
    19 
       
    20 // Engine includes
       
    21 #include <memspy/engine/memspyengine.h>
       
    22 #include <memspy/engine/memspyengineobjectprocess.h>
       
    23 #include <memspy/engine/memspyengineobjectthread.h>
       
    24 #include <memspy/engine/memspyengineobjectcontainer.h>
       
    25 #include <memspy/engine/memspyengineobjectthreadinfoobjects.h>
       
    26 #include <memspy/engine/memspyengineobjectthreadinfocontainer.h>
       
    27 #include <memspy/engine/memspyenginehelperprocess.h>
       
    28 #include <memspy/engine/memspyenginehelperstack.h>
       
    29 
       
    30 // User includes
       
    31 #include "MemSpyContainerObserver.h"
       
    32 #include "MemSpyViewThreads.h"
       
    33 #include "MemSpyViewThreadInfoItemHeap.h"
       
    34 
       
    35 
       
    36 
       
    37 CMemSpyViewThreadInfoItemStack::CMemSpyViewThreadInfoItemStack( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer )
       
    38 :   CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeStack )
       
    39     {
       
    40     }
       
    41 
       
    42 
       
    43 TBool CMemSpyViewThreadInfoItemStack::HandleCommandL( TInt aCommand )
       
    44     {
       
    45     TBool handled = ETrue;
       
    46     //
       
    47     switch ( aCommand )
       
    48         {
       
    49 #ifndef __WINS__
       
    50 	case EMemSpyCmdStackDataUser:
       
    51         OnCmdStackDataUserL();
       
    52 		break;
       
    53 	case EMemSpyCmdStackDataKernel:
       
    54         OnCmdStackDataKernelL();
       
    55 		break;
       
    56 #endif
       
    57 	case EMemSpyCmdStackInfoThread:
       
    58         OnCmdStackInfoL();
       
    59 		break;
       
    60 
       
    61     default:
       
    62         handled = CMemSpyViewBase::HandleCommandL( aCommand );
       
    63         break;
       
    64         }
       
    65     //
       
    66     return handled;
       
    67     }
       
    68 
       
    69 
       
    70 void CMemSpyViewThreadInfoItemStack::OnCmdStackInfoL()
       
    71     {
       
    72     iEngine.HelperStack().OutputStackInfoL( Thread() );
       
    73     }
       
    74 
       
    75 
       
    76 void CMemSpyViewThreadInfoItemStack::OnCmdStackDataUserL()
       
    77     {
       
    78     iEngine.HelperStack().OutputStackDataL( Thread(), EMemSpyDriverDomainUser );
       
    79     }
       
    80 
       
    81 
       
    82 void CMemSpyViewThreadInfoItemStack::OnCmdStackDataKernelL()
       
    83     {
       
    84     iEngine.HelperStack().OutputStackDataL( Thread(), EMemSpyDriverDomainKernel );
       
    85     }    
       
    86 
       
    87 
       
    88 void CMemSpyViewThreadInfoItemStack::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
       
    89     {
       
    90     if  ( aResourceId == R_MEMSPY_MENUPANE )
       
    91         {
       
    92         aMenuPane->SetItemDimmed( EMemSpyCmdStack, Thread().IsDead() );
       
    93         }
       
    94     }