1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/stdcpp/tsrc/BC/apps/BCCppWrap/src/BCCppWrapBlocks.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,170 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +// [INCLUDE FILES] - do not remove
1.23 +#include <e32svr.h>
1.24 +#include <StifParser.h>
1.25 +#include <Stiftestinterface.h>
1.26 +#include "BCCppWrap.h"
1.27 +
1.28 +//Headers exported from CPP Wrappers API
1.29 +#include <fstream>
1.30 +#include <complex>
1.31 +#include <locale>
1.32 +#include <sstream>
1.33 +#include <streambuf>
1.34 +#include <iomanip>
1.35 +#include <iostream>
1.36 +#include <ios>
1.37 +#include <ostream>
1.38 +#include <iosfwd>
1.39 +#include <strstream>
1.40 +#include <istream>
1.41 +// EXTERNAL DATA STRUCTURES
1.42 +//extern ?external_data;
1.43 +
1.44 +// EXTERNAL FUNCTION PROTOTYPES
1.45 +//extern ?external_function( ?arg_type,?arg_type );
1.46 +
1.47 +// CONSTANTS
1.48 +//const ?type ?constant_var = ?constant;
1.49 +
1.50 +// MACROS
1.51 +//#define ?macro ?macro_def
1.52 +
1.53 +// LOCAL CONSTANTS AND MACROS
1.54 +//const ?type ?constant_var = ?constant;
1.55 +//#define ?macro_name ?macro_def
1.56 +
1.57 +// MODULE DATA STRUCTURES
1.58 +//enum ?declaration
1.59 +//typedef ?declaration
1.60 +
1.61 +// LOCAL FUNCTION PROTOTYPES
1.62 +//?type ?function_name( ?arg_type, ?arg_type );
1.63 +
1.64 +// FORWARD DECLARATIONS
1.65 +//class ?FORWARD_CLASSNAME;
1.66 +
1.67 +// ============================= LOCAL FUNCTIONS ===============================
1.68 +
1.69 +// -----------------------------------------------------------------------------
1.70 +// ?function_name ?description.
1.71 +// ?description
1.72 +// Returns: ?value_1: ?description
1.73 +// ?value_n: ?description_line1
1.74 +// ?description_line2
1.75 +// -----------------------------------------------------------------------------
1.76 +//
1.77 +/*
1.78 +?type ?function_name(
1.79 + ?arg_type arg, // ?description
1.80 + ?arg_type arg) // ?description
1.81 + {
1.82 +
1.83 + ?code // ?comment
1.84 +
1.85 + // ?comment
1.86 + ?code
1.87 + }
1.88 +*/
1.89 +
1.90 +// ============================ MEMBER FUNCTIONS ===============================
1.91 +
1.92 +// -----------------------------------------------------------------------------
1.93 +// CBCCppWrap::Delete
1.94 +// Delete here all resources allocated and opened from test methods.
1.95 +// Called from destructor.
1.96 +// -----------------------------------------------------------------------------
1.97 +//
1.98 +void CBCCppWrap::Delete()
1.99 + {
1.100 +
1.101 + }
1.102 +
1.103 +// -----------------------------------------------------------------------------
1.104 +// CBCCppWrap::RunMethodL
1.105 +// Run specified method. Contains also table of test mothods and their names.
1.106 +// -----------------------------------------------------------------------------
1.107 +//
1.108 +TInt CBCCppWrap::RunMethodL(
1.109 + CStifItemParser& aItem )
1.110 + {
1.111 +
1.112 + static TStifFunctionInfo const KFunctions[] =
1.113 + {
1.114 + // Copy this line for every implemented function.
1.115 + // First string is the function name used in TestScripter script file.
1.116 + // Second is the actual implementation member function.
1.117 + ENTRY( "TestAPI", CBCCppWrap::TestAPI ),
1.118 + //ADD NEW ENTRY HERE
1.119 + // [test cases entries] - Do not remove
1.120 +
1.121 + };
1.122 +
1.123 + const TInt count = sizeof( KFunctions ) /
1.124 + sizeof( TStifFunctionInfo );
1.125 +
1.126 + return RunInternalL( KFunctions, count, aItem );
1.127 +
1.128 + }
1.129 +
1.130 +// -----------------------------------------------------------------------------
1.131 +// CBCCppWrap::TestAPI
1.132 +// TestAPI test method function.
1.133 +// (other items were commented in a header).
1.134 +// -----------------------------------------------------------------------------
1.135 +//
1.136 +TInt CBCCppWrap::TestAPI( CStifItemParser& aItem )
1.137 + {
1.138 +
1.139 + // Print to UI
1.140 + _LIT( KBCCppWrap, "BCCppWrap" );
1.141 + _LIT( KTestAPI, "In TestAPI" );
1.142 + TestModuleIf().Printf( 0, KBCCppWrap, KTestAPI );
1.143 + // Print to log file
1.144 + iLog->Log( KTestAPI );
1.145 +
1.146 + _LIT( KResult, "No functions to be tested");
1.147 + _LIT( KComment, "CPP Wrapper API has passed");
1.148 + TestModuleIf().Printf( 0, KResult, KComment);
1.149 +
1.150 + return KErrNone;
1.151 +
1.152 + }
1.153 +
1.154 +// -----------------------------------------------------------------------------
1.155 +// CBCCppWrap::?member_function
1.156 +// ?implementation_description
1.157 +// (other items were commented in a header).
1.158 +// -----------------------------------------------------------------------------
1.159 +//
1.160 +/*
1.161 +TInt CBCCppWrap::?member_function(
1.162 + CItemParser& aItem )
1.163 + {
1.164 +
1.165 + ?code
1.166 +
1.167 + }
1.168 +*/
1.169 +
1.170 +// ========================== OTHER EXPORTED FUNCTIONS =========================
1.171 +// None
1.172 +
1.173 +// [End of File] - Do not remove