stdcpp/tsrc/Stdcpp_test/stlport/manual/stlport_istmit/src/stlport_istmit.cpp
changeset 0 e4d67989cc36
child 22 ddc455616bd6
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <Stiftestinterface.h>
       
    23 #include "stlport_istmit.h"
       
    24 #ifdef LIBC_OLD_BACKEND
       
    25 #include <mrtlib.h>
       
    26 #endif
       
    27 
       
    28 
       
    29 // EXTERNAL DATA STRUCTURES
       
    30 //extern  ?external_data;
       
    31 
       
    32 // EXTERNAL FUNCTION PROTOTYPES  
       
    33 //extern ?external_function( ?arg_type,?arg_type );
       
    34 
       
    35 // CONSTANTS
       
    36 //const ?type ?constant_var = ?constant;
       
    37 
       
    38 // MACROS
       
    39 //#define ?macro ?macro_def
       
    40 
       
    41 // LOCAL CONSTANTS AND MACROS
       
    42 //const ?type ?constant_var = ?constant;
       
    43 //#define ?macro_name ?macro_def
       
    44 
       
    45 // MODULE DATA STRUCTURES
       
    46 //enum ?declaration
       
    47 //typedef ?declaration
       
    48 
       
    49 // LOCAL FUNCTION PROTOTYPES
       
    50 //?type ?function_name( ?arg_type, ?arg_type );
       
    51 
       
    52 // FORWARD DECLARATIONS
       
    53 //class ?FORWARD_CLASSNAME;
       
    54 
       
    55 // ============================= LOCAL FUNCTIONS ===============================
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // ?function_name ?description.
       
    59 // ?description
       
    60 // Returns: ?value_1: ?description
       
    61 //          ?value_n: ?description_line1
       
    62 //                    ?description_line2
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 /*
       
    66 ?type ?function_name(
       
    67     ?arg_type arg,  // ?description
       
    68     ?arg_type arg)  // ?description
       
    69     {
       
    70 
       
    71     ?code  // ?comment
       
    72 
       
    73     // ?comment
       
    74     ?code
       
    75     }
       
    76 */
       
    77 
       
    78 // ============================ MEMBER FUNCTIONS ===============================
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // Cstlport_istmit::Cstlport_istmit
       
    82 // C++ default constructor can NOT contain any code, that
       
    83 // might leave.
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 Cstlport_istmit::Cstlport_istmit( 
       
    87     CTestModuleIf& aTestModuleIf ):
       
    88         CScriptBase( aTestModuleIf )
       
    89     {
       
    90     }
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 // Cstlport_istmit::ConstructL
       
    94 // Symbian 2nd phase constructor can leave.
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 void Cstlport_istmit::ConstructL()
       
    98     {
       
    99     iLog = CStifLogger::NewL( Kstlport_istmitLogPath, 
       
   100                           Kstlport_istmitLogFile,
       
   101                           CStifLogger::ETxt,
       
   102                           CStifLogger::EFile,
       
   103                           EFalse );
       
   104 
       
   105     }
       
   106 
       
   107 // -----------------------------------------------------------------------------
       
   108 // Cstlport_istmit::NewL
       
   109 // Two-phased constructor.
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 Cstlport_istmit* Cstlport_istmit::NewL( 
       
   113     CTestModuleIf& aTestModuleIf )
       
   114     {
       
   115 #ifdef LIBC_OLD_BACKEND
       
   116     MrtInit();
       
   117 #endif
       
   118     Cstlport_istmit* self = new (ELeave) Cstlport_istmit( aTestModuleIf );
       
   119 
       
   120     CleanupStack::PushL( self );
       
   121     self->ConstructL();
       
   122     CleanupStack::Pop();
       
   123 
       
   124     return self;
       
   125 
       
   126     }
       
   127 
       
   128 // Destructor
       
   129 Cstlport_istmit::~Cstlport_istmit()
       
   130     { 
       
   131     #ifdef LIBC_OLD_BACKEND
       
   132     MrtClose();
       
   133 #endif
       
   134 
       
   135     // Delete resources allocated from test methods
       
   136     Delete();
       
   137 
       
   138     // Delete logger
       
   139     delete iLog; 
       
   140 
       
   141     }
       
   142 
       
   143 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   144 
       
   145 // -----------------------------------------------------------------------------
       
   146 // LibEntryL is a polymorphic Dll entry point.
       
   147 // Returns: CScriptBase: New CScriptBase derived object
       
   148 // -----------------------------------------------------------------------------
       
   149 //
       
   150 EXPORT_C CScriptBase* LibEntryL( 
       
   151     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
   152     {
       
   153 
       
   154     return ( CScriptBase* ) Cstlport_istmit::NewL( aTestModuleIf );
       
   155 
       
   156     }
       
   157 
       
   158 // -----------------------------------------------------------------------------
       
   159 // E32Dll is a DLL entry point function.
       
   160 // Returns: KErrNone
       
   161 // -----------------------------------------------------------------------------
       
   162 //
       
   163 #ifndef EKA2 // Hide Dll entry point to EKA2
       
   164 GLDEF_C TInt E32Dll(
       
   165     TDllReason /*aReason*/) // Reason code
       
   166     {
       
   167     return(KErrNone);
       
   168 
       
   169     }
       
   170 #endif // EKA2
       
   171 
       
   172 //  End of File