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