os/ossrv/lowlevellibsandfws/pluginfw/Framework/LoadManagerTest/LoadManagerTransitions.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // The definition of the transition classes on the CLoadManager class
    15 // 
    16 //
    17 
    18 // ______________________________________________________________________________
    19 //
    20 inline CLoadManager_UnitTestContext::CLoadManager_UnitTestContext(CDataLogger& aDataLogger,
    21 												MStateAccessor& aStateAccessor,
    22 												MTransitionObserver& aObserver)
    23 : CUnitTestContext(aDataLogger, aStateAccessor, aObserver)
    24 	{
    25 	//Do nothing
    26 	}
    27 
    28 inline CLoadManager_UnitTestContext::~CLoadManager_UnitTestContext()
    29 	{
    30 	delete iLoadManager;
    31 	delete iRegistryData;
    32 	}
    33 
    34 // ______________________________________________________________________________
    35 //
    36 _LIT(KLoadManagerNewLTransition,"CLoadManager_NewL_Transition");
    37 
    38 inline CLoadManager_NewL_Transition::CLoadManager_NewL_Transition(CUnitTestContext& aUTContext,
    39 													TTransitionValidator& aValidator)
    40 : CTransitionType(KLoadManagerNewLTransition, aUTContext, aValidator)
    41 	{
    42 	// Do nothing here.
    43 	}
    44 
    45 inline void CLoadManager_NewL_Transition::TransitMethodL()
    46 	{
    47 	Context().iLoadManager = CLoadManager::NewL();
    48 	}
    49 
    50 inline CLoadManager_UnitTestContext& CLoadManager_NewL_Transition::Context() const
    51 	{
    52 	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
    53 	}
    54 
    55 // ______________________________________________________________________________
    56 //
    57 _LIT(KLoadManagerDtorTransition,"CLoadManager_Dtor_Transition");
    58 
    59 inline CLoadManager_Dtor_Transition::CLoadManager_Dtor_Transition(CUnitTestContext& aUTContext,
    60 													TTransitionValidator& aValidator)
    61 : CTransition(KLoadManagerDtorTransition, aUTContext, aValidator)
    62 	{
    63 	// Do nothing here.
    64 	}
    65 
    66 inline void CLoadManager_Dtor_Transition::TransitMethodL()
    67 	{
    68 	delete Context().iLoadManager;
    69 	Context().iLoadManager = NULL;
    70 	}
    71 
    72 inline CLoadManager_UnitTestContext& CLoadManager_Dtor_Transition::Context() const
    73 	{
    74 	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
    75 	}
    76 
    77 // ______________________________________________________________________________
    78 //
    79 _LIT(KLoadManagerInstantiationMethodLTransition,"CLoadManager_InstantiationMethodL_Transition");
    80 
    81 inline CLoadManager_InstantiationMethodL_Transition::CLoadManager_InstantiationMethodL_Transition(CUnitTestContext& aUTContext,
    82 													TTransitionValidator& aValidator)
    83 : CTransition(KLoadManagerInstantiationMethodLTransition, aUTContext, aValidator)
    84 	{
    85 	// Do nothing here.
    86 	}
    87 
    88 inline void CLoadManager_InstantiationMethodL_Transition::TransitMethodL()
    89 	{
    90 	_LIT(KLoadManagerInstantiationMethodLTransitMethod, "CLoadManager::InstantiationMethodL transition");
    91 	Context().DataLogger().LogInformation(KLoadManagerInstantiationMethodLTransitMethod);
    92 	Context().iLoadMethod = Context().iLoadManager->InstantiationMethodL(Context().iUniqueImplementationUid,
    93  																		 Context().iDllEntry);
    94 	}
    95 
    96 inline CLoadManager_UnitTestContext& CLoadManager_InstantiationMethodL_Transition::Context() const
    97 	{
    98 	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
    99 	}
   100 
   101 // ______________________________________________________________________________
   102 //
   103 _LIT(KLoadManagerDestroyedThisTransition,"CLoadManager_DestroyedThis_Transition");
   104 
   105 inline CLoadManager_DestroyedThis_Transition::CLoadManager_DestroyedThis_Transition(CUnitTestContext& aUTContext,
   106 													TTransitionValidator& aValidator)
   107 : CTransition(KLoadManagerDestroyedThisTransition, aUTContext, aValidator)
   108 	{
   109 	// Do nothing here.
   110 	}
   111 
   112 inline void CLoadManager_DestroyedThis_Transition::TransitMethodL()
   113 	{
   114 	_LIT(KLoadManagerDestroyedThisTransitMethod, "CLoadManager::DestroyedThis transition");
   115 	Context().DataLogger().LogInformation(KLoadManagerDestroyedThisTransitMethod);
   116 	Context().iLoadManager->DestroyedThis(Context().iUniqueImplementationUid);
   117 	}
   118 
   119 inline CLoadManager_UnitTestContext& CLoadManager_DestroyedThis_Transition::Context() const
   120 	{
   121 	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
   122 	}
   123 
   124 // ______________________________________________________________________________
   125 //
   126 _LIT(KLoadManagerDestroyCreateTransition,"CLoadManager_DestroyCreate_Transition");
   127 
   128 inline CLoadManager_DestroyCreate_Transition::CLoadManager_DestroyCreate_Transition(CUnitTestContext& aUTContext,
   129 													TTransitionValidator& aValidator)
   130 : CTransition(KLoadManagerDestroyCreateTransition, aUTContext, aValidator)
   131 	{
   132 	// Do nothing here.
   133 	}
   134 
   135 inline void CLoadManager_DestroyCreate_Transition::TransitMethodL()
   136 	{
   137 	_LIT(KLoadManagerDestroyCreateTransitMethod, "CLoadManager_DestroyCreate_Transition");
   138 	Context().DataLogger().LogInformation(KLoadManagerDestroyCreateTransitMethod);
   139 	Context().iLoadManager->DestroyedThis(Context().iUniqueImplementationUid);
   140 	Context().iLoadMethod = Context().iLoadManager->InstantiationMethodL(Context().iUniqueImplementationUid,
   141  																		 Context().iDllEntry);
   142 
   143 	}
   144 
   145 inline CLoadManager_UnitTestContext& CLoadManager_DestroyCreate_Transition::Context() const
   146 	{
   147 	return REINTERPRET_CAST(CLoadManager_UnitTestContext&,iUTContext);
   148 	}
   149