stdcpp/tsrc/Stdcpp_test/stlport/auto/stlport_queue/src/stlport_queue.cpp
changeset 31 ce057bb09d0b
child 45 4b03adbd26ca
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     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_queue.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_queue::Cstlport_queue
       
    80 // C++ default constructor can NOT contain any code, that
       
    81 // might leave.
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 Cstlport_queue::Cstlport_queue( 
       
    85     CTestModuleIf& aTestModuleIf ):
       
    86         CScriptBase( aTestModuleIf )
       
    87     {
       
    88     }
       
    89 
       
    90 // -----------------------------------------------------------------------------
       
    91 // Cstlport_queue::ConstructL
       
    92 // Symbian 2nd phase constructor can leave.
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 void Cstlport_queue::ConstructL()
       
    96     {
       
    97     iLog = CStifLogger::NewL( Kstlport_queueLogPath, 
       
    98                           Kstlport_queueLogFile,
       
    99                           CStifLogger::ETxt,
       
   100                           CStifLogger::EFile,
       
   101                           EFalse );
       
   102 
       
   103     }
       
   104 
       
   105 // -----------------------------------------------------------------------------
       
   106 // Cstlport_queue::NewL
       
   107 // Two-phased constructor.
       
   108 // -----------------------------------------------------------------------------
       
   109 //
       
   110 Cstlport_queue* Cstlport_queue::NewL( 
       
   111     CTestModuleIf& aTestModuleIf )
       
   112     {
       
   113 #ifdef LIBC_OLD_BACKEND
       
   114     MrtInit();
       
   115 #endif
       
   116  #ifdef __ARMCC__
       
   117     #pragma diag_suppress 830
       
   118  #endif    
       
   119     Cstlport_queue* self = new (ELeave) Cstlport_queue( aTestModuleIf );
       
   120 
       
   121  
       
   122     CleanupStack::PushL( self );
       
   123     self->ConstructL();
       
   124     CleanupStack::Pop();
       
   125 
       
   126     return self;
       
   127 
       
   128     }
       
   129 
       
   130 // Destructor
       
   131 Cstlport_queue::~Cstlport_queue()
       
   132     { 
       
   133 #ifdef LIBC_OLD_BACKEND
       
   134     MrtClose();
       
   135 #endif
       
   136     // Delete resources allocated from test methods
       
   137     Delete();
       
   138 
       
   139     // Delete logger
       
   140     delete iLog; 
       
   141 
       
   142     }
       
   143 
       
   144 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   145 
       
   146 // -----------------------------------------------------------------------------
       
   147 // LibEntryL is a polymorphic Dll entry point.
       
   148 // Returns: CScriptBase: New CScriptBase derived object
       
   149 // -----------------------------------------------------------------------------
       
   150 //
       
   151 EXPORT_C CScriptBase* LibEntryL( 
       
   152     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
       
   153     {
       
   154 
       
   155     return ( CScriptBase* ) Cstlport_queue::NewL( aTestModuleIf );
       
   156 
       
   157     }
       
   158 
       
   159 // -----------------------------------------------------------------------------
       
   160 // E32Dll is a DLL entry point function.
       
   161 // Returns: KErrNone
       
   162 // -----------------------------------------------------------------------------
       
   163 //
       
   164 #ifndef EKA2 // Hide Dll entry point to EKA2
       
   165 GLDEF_C TInt E32Dll(
       
   166     TDllReason /*aReason*/) // Reason code
       
   167     {
       
   168     return(KErrNone);
       
   169 
       
   170     }
       
   171 #endif // EKA2
       
   172 
       
   173 //  End of File