stdcpp/tsrc/BC/apps/BCCppWrap/src/BCCppWrapBlocks.cpp
changeset 31 ce057bb09d0b
parent 0 e4d67989cc36
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:       
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // [INCLUDE FILES] - do not remove
       
    20 #include <e32svr.h>
       
    21 #include <StifParser.h>
       
    22 #include <Stiftestinterface.h>
       
    23 #include "BCCppWrap.h"
       
    24 
       
    25 //Headers exported from CPP Wrappers API
       
    26 #include <fstream>
       
    27 #include <complex>
       
    28 #include <locale>
       
    29 #include <sstream>
       
    30 #include <streambuf>
       
    31 #include <iomanip>
       
    32 #include <iostream>
       
    33 #include <ios>
       
    34 #include <ostream>
       
    35 #include <iosfwd>
       
    36 #include <strstream>
       
    37 #include <istream>
       
    38 // EXTERNAL DATA STRUCTURES
       
    39 //extern  ?external_data;
       
    40 
       
    41 // EXTERNAL FUNCTION PROTOTYPES  
       
    42 //extern ?external_function( ?arg_type,?arg_type );
       
    43 
       
    44 // CONSTANTS
       
    45 //const ?type ?constant_var = ?constant;
       
    46 
       
    47 // MACROS
       
    48 //#define ?macro ?macro_def
       
    49 
       
    50 // LOCAL CONSTANTS AND MACROS
       
    51 //const ?type ?constant_var = ?constant;
       
    52 //#define ?macro_name ?macro_def
       
    53 
       
    54 // MODULE DATA STRUCTURES
       
    55 //enum ?declaration
       
    56 //typedef ?declaration
       
    57 
       
    58 // LOCAL FUNCTION PROTOTYPES
       
    59 //?type ?function_name( ?arg_type, ?arg_type );
       
    60 
       
    61 // FORWARD DECLARATIONS
       
    62 //class ?FORWARD_CLASSNAME;
       
    63 
       
    64 // ============================= LOCAL FUNCTIONS ===============================
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // ?function_name ?description.
       
    68 // ?description
       
    69 // Returns: ?value_1: ?description
       
    70 //          ?value_n: ?description_line1
       
    71 //                    ?description_line2
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 /*
       
    75 ?type ?function_name(
       
    76     ?arg_type arg,  // ?description
       
    77     ?arg_type arg)  // ?description
       
    78     {
       
    79 
       
    80     ?code  // ?comment
       
    81 
       
    82     // ?comment
       
    83     ?code
       
    84     }
       
    85 */
       
    86 
       
    87 // ============================ MEMBER FUNCTIONS ===============================
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CBCCppWrap::Delete
       
    91 // Delete here all resources allocated and opened from test methods. 
       
    92 // Called from destructor. 
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 void CBCCppWrap::Delete() 
       
    96     {
       
    97 
       
    98     }
       
    99 
       
   100 // -----------------------------------------------------------------------------
       
   101 // CBCCppWrap::RunMethodL
       
   102 // Run specified method. Contains also table of test mothods and their names.
       
   103 // -----------------------------------------------------------------------------
       
   104 //
       
   105 TInt CBCCppWrap::RunMethodL( 
       
   106     CStifItemParser& aItem ) 
       
   107     {
       
   108 
       
   109     static TStifFunctionInfo const KFunctions[] =
       
   110         {  
       
   111         // Copy this line for every implemented function.
       
   112         // First string is the function name used in TestScripter script file.
       
   113         // Second is the actual implementation member function. 
       
   114         ENTRY( "TestAPI", CBCCppWrap::TestAPI ),
       
   115         //ADD NEW ENTRY HERE
       
   116         // [test cases entries] - Do not remove
       
   117 
       
   118         };
       
   119 
       
   120     const TInt count = sizeof( KFunctions ) / 
       
   121                         sizeof( TStifFunctionInfo );
       
   122 
       
   123     return RunInternalL( KFunctions, count, aItem );
       
   124 
       
   125     }
       
   126 
       
   127 // -----------------------------------------------------------------------------
       
   128 // CBCCppWrap::TestAPI
       
   129 // TestAPI test method function.
       
   130 // (other items were commented in a header).
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 TInt CBCCppWrap::TestAPI( CStifItemParser& aItem )
       
   134     {
       
   135 
       
   136     // Print to UI
       
   137     _LIT( KBCCppWrap, "BCCppWrap" );
       
   138     _LIT( KTestAPI, "In TestAPI" );
       
   139     TestModuleIf().Printf( 0, KBCCppWrap, KTestAPI );
       
   140     // Print to log file
       
   141     iLog->Log( KTestAPI );
       
   142 
       
   143 		_LIT( KResult, "No functions to be tested");
       
   144 		_LIT( KComment, "CPP Wrapper API has passed");
       
   145     TestModuleIf().Printf( 0, KResult, KComment);
       
   146 
       
   147     return KErrNone;
       
   148 
       
   149     }
       
   150 
       
   151 // -----------------------------------------------------------------------------
       
   152 // CBCCppWrap::?member_function
       
   153 // ?implementation_description
       
   154 // (other items were commented in a header).
       
   155 // -----------------------------------------------------------------------------
       
   156 //
       
   157 /*
       
   158 TInt CBCCppWrap::?member_function(
       
   159    CItemParser& aItem )
       
   160    {
       
   161 
       
   162    ?code
       
   163 
       
   164    }
       
   165 */
       
   166 
       
   167 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   168 // None
       
   169 
       
   170 //  [End of File] - Do not remove