sl@0: /*
sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description: 
sl@0: *
sl@0: */
sl@0: 
sl@0: 
sl@0: 
sl@0: 
sl@0: // INCLUDE FILES
sl@0: #include <Stiftestinterface.h>
sl@0: #include "tlocale.h"
sl@0: 
sl@0: // EXTERNAL DATA STRUCTURES
sl@0: //extern  ?external_data;
sl@0: 
sl@0: // EXTERNAL FUNCTION PROTOTYPES  
sl@0: //extern ?external_function( ?arg_type,?arg_type );
sl@0: 
sl@0: // CONSTANTS
sl@0: //const ?type ?constant_var = ?constant;
sl@0: 
sl@0: // MACROS
sl@0: //#define ?macro ?macro_def
sl@0: 
sl@0: // LOCAL CONSTANTS AND MACROS
sl@0: //const ?type ?constant_var = ?constant;
sl@0: //#define ?macro_name ?macro_def
sl@0: 
sl@0: // MODULE DATA STRUCTURES
sl@0: //enum ?declaration
sl@0: //typedef ?declaration
sl@0: 
sl@0: // LOCAL FUNCTION PROTOTYPES
sl@0: //?type ?function_name( ?arg_type, ?arg_type );
sl@0: 
sl@0: // FORWARD DECLARATIONS
sl@0: //class ?FORWARD_CLASSNAME;
sl@0: 
sl@0: // ============================= LOCAL FUNCTIONS ===============================
sl@0: 
sl@0: // -----------------------------------------------------------------------------
sl@0: // ?function_name ?description.
sl@0: // ?description
sl@0: // Returns: ?value_1: ?description
sl@0: //          ?value_n: ?description_line1
sl@0: //                    ?description_line2
sl@0: // -----------------------------------------------------------------------------
sl@0: //
sl@0: /*
sl@0: ?type ?function_name(
sl@0:     ?arg_type arg,  // ?description
sl@0:     ?arg_type arg)  // ?description
sl@0:     {
sl@0: 
sl@0:     ?code  // ?comment
sl@0: 
sl@0:     // ?comment
sl@0:     ?code
sl@0:     }
sl@0: */
sl@0: 
sl@0: // ============================ MEMBER FUNCTIONS ===============================
sl@0: 
sl@0: // -----------------------------------------------------------------------------
sl@0: // Ctlocale::Ctlocale
sl@0: // C++ default constructor can NOT contain any code, that
sl@0: // might leave.
sl@0: // -----------------------------------------------------------------------------
sl@0: //
sl@0: Ctlocale::Ctlocale( 
sl@0:     CTestModuleIf& aTestModuleIf ):
sl@0:         CScriptBase( aTestModuleIf )
sl@0:     {
sl@0:     }
sl@0: 
sl@0: // -----------------------------------------------------------------------------
sl@0: // Ctlocale::ConstructL
sl@0: // Symbian 2nd phase constructor can leave.
sl@0: // -----------------------------------------------------------------------------
sl@0: //
sl@0: void Ctlocale::ConstructL()
sl@0:     {
sl@0:     iLog = CStifLogger::NewL( KtlocaleLogPath, 
sl@0:                           KtlocaleLogFile,
sl@0:                           CStifLogger::ETxt,
sl@0:                           CStifLogger::EFile,
sl@0:                           EFalse );
sl@0: 
sl@0:     }
sl@0: 
sl@0: // -----------------------------------------------------------------------------
sl@0: // Ctlocale::NewL
sl@0: // Two-phased constructor.
sl@0: // -----------------------------------------------------------------------------
sl@0: //
sl@0: Ctlocale* Ctlocale::NewL( 
sl@0:     CTestModuleIf& aTestModuleIf )
sl@0:     {
sl@0:     #ifdef __ARMCC__	
sl@0:     #pragma diag_suppress 830
sl@0:     #endif
sl@0:     Ctlocale* self = new (ELeave) Ctlocale( aTestModuleIf );
sl@0:     
sl@0:     
sl@0:     CleanupStack::PushL( self );
sl@0:     self->ConstructL();
sl@0:     CleanupStack::Pop();
sl@0: 
sl@0:     return self;
sl@0: 
sl@0:     }
sl@0: 
sl@0: // Destructor
sl@0: Ctlocale::~Ctlocale()
sl@0:     { 
sl@0: 
sl@0:     // Delete resources allocated from test methods
sl@0:     Delete();
sl@0: 
sl@0:     // Delete logger
sl@0:     delete iLog; 
sl@0: 
sl@0:     }
sl@0: 
sl@0: // ========================== OTHER EXPORTED FUNCTIONS =========================
sl@0: 
sl@0: // -----------------------------------------------------------------------------
sl@0: // LibEntryL is a polymorphic Dll entry point.
sl@0: // Returns: CScriptBase: New CScriptBase derived object
sl@0: // -----------------------------------------------------------------------------
sl@0: //
sl@0: EXPORT_C CScriptBase* LibEntryL( 
sl@0:     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
sl@0:     {
sl@0: 
sl@0:     return ( CScriptBase* ) Ctlocale::NewL( aTestModuleIf );
sl@0: 
sl@0:     }
sl@0: 
sl@0: 
sl@0: //  End of File