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