1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/stdcpp/tsrc/BC/apps/tutility/inc/tutility.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,196 @@
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 +#ifndef TUTILITY_H
1.23 +#define TUTILITY_H
1.24 +
1.25 +// INCLUDES
1.26 +#include <StifLogger.h>
1.27 +#include <TestScripterInternal.h>
1.28 +#include <StifTestModule.h>
1.29 +
1.30 +
1.31 +class Integer
1.32 + {
1.33 + public:
1.34 + Integer( int x ) : val( x ) {}
1.35 + int get( ) { return val; }
1.36 + private:
1.37 + int val;
1.38 + };
1.39 +
1.40 +
1.41 +
1.42 +
1.43 +// CONSTANTS
1.44 +//const ?type ?constant_var = ?constant;
1.45 +
1.46 +// MACROS
1.47 +//#define ?macro ?macro_def
1.48 +#define TEST_MODULE_VERSION_MAJOR 50
1.49 +#define TEST_MODULE_VERSION_MINOR 9
1.50 +#define TEST_MODULE_VERSION_BUILD 06
1.51 +// Logging path
1.52 +_LIT( KtutilityLogPath, "\\logs\\testframework\\tutility\\" );
1.53 +// Log file
1.54 +_LIT( KtutilityLogFile, "tutility.txt" );
1.55 +_LIT( KtutilityLogFileWithTitle, "tutility_[%S].txt" );
1.56 +
1.57 +// FUNCTION PROTOTYPES
1.58 +//?type ?function_name(?arg_list);
1.59 +
1.60 +// FORWARD DECLARATIONS
1.61 +//class ?FORWARD_CLASSNAME;
1.62 +class Ctutility;
1.63 +
1.64 +// DATA TYPES
1.65 +//enum ?declaration
1.66 +//typedef ?declaration
1.67 +//extern ?data_type;
1.68 +
1.69 +// CLASS DECLARATION
1.70 +
1.71 +/**
1.72 +* Ctutility test class for STIF Test Framework TestScripter.
1.73 +* ?other_description_lines
1.74 +*
1.75 +* @lib ?library
1.76 +* @since ?Series60_version
1.77 +*/
1.78 +NONSHARABLE_CLASS(Ctutility) : public CScriptBase
1.79 + {
1.80 + public: // Constructors and destructor
1.81 +
1.82 + /**
1.83 + * Two-phased constructor.
1.84 + */
1.85 + static Ctutility* NewL( CTestModuleIf& aTestModuleIf );
1.86 +
1.87 + /**
1.88 + * Destructor.
1.89 + */
1.90 + virtual ~Ctutility();
1.91 +
1.92 + public: // New functions
1.93 +
1.94 + /**
1.95 + * ?member_description.
1.96 + * @since ?Series60_version
1.97 + * @param ?arg1 ?description
1.98 + * @return ?description
1.99 + */
1.100 + //?type ?member_function( ?type ?arg1 );
1.101 +
1.102 + public: // Functions from base classes
1.103 +
1.104 + /**
1.105 + * From CScriptBase Runs a script line.
1.106 + * @since ?Series60_version
1.107 + * @param aItem Script line containing method name and parameters
1.108 + * @return Symbian OS error code
1.109 + */
1.110 + virtual TInt RunMethodL( CStifItemParser& aItem );
1.111 + /**
1.112 + * Method used to log version of test module
1.113 + */
1.114 + void SendTestModuleVersion();
1.115 + protected: // New functions
1.116 +
1.117 + /**
1.118 + * ?member_description.
1.119 + * @since ?Series60_version
1.120 + * @param ?arg1 ?description
1.121 + * @return ?description
1.122 + */
1.123 + //?type ?member_function( ?type ?arg1 );
1.124 +
1.125 + protected: // Functions from base classes
1.126 +
1.127 + /**
1.128 + * From ?base_class ?member_description
1.129 + */
1.130 + //?type ?member_function();
1.131 +
1.132 + private:
1.133 +
1.134 + /**
1.135 + * C++ default constructor.
1.136 + */
1.137 + Ctutility( CTestModuleIf& aTestModuleIf );
1.138 +
1.139 + /**
1.140 + * By default Symbian 2nd phase constructor is private.
1.141 + */
1.142 + void ConstructL();
1.143 +
1.144 + // Prohibit copy constructor if not deriving from CBase.
1.145 + // ?classname( const ?classname& );
1.146 + // Prohibit assigment operator if not deriving from CBase.
1.147 + // ?classname& operator=( const ?classname& );
1.148 +
1.149 + /**
1.150 + * Frees all resources allocated from test methods.
1.151 + * @since ?Series60_version
1.152 + */
1.153 + void Delete();
1.154 +
1.155 + /**
1.156 + * Test methods are listed below.
1.157 + */
1.158 +
1.159 + /**
1.160 + * Example test method.
1.161 + * @since ?Series60_version
1.162 + * @param aItem Script line containing parameters.
1.163 + * @return Symbian OS error code.
1.164 + */
1.165 + virtual TInt Uninitialized_Copy( CStifItemParser& aItem );
1.166 + virtual TInt Uninitialized_Copy_n( CStifItemParser& aItem );
1.167 + virtual TInt Uninitialized_Fill( CStifItemParser& aItem );
1.168 + virtual TInt Uninitialized_Fill_n( CStifItemParser& aItem );
1.169 +
1.170 + //ADD NEW METHOD DEC HERE
1.171 +
1.172 + public: // Data
1.173 + // ?one_line_short_description_of_data
1.174 + //?data_declaration;
1.175 +
1.176 + protected: // Data
1.177 + // ?one_line_short_description_of_data
1.178 + //?data_declaration;
1.179 +
1.180 + private: // Data
1.181 +
1.182 + // ?one_line_short_description_of_data
1.183 + //?data_declaration;
1.184 +
1.185 + // Reserved pointer for future extension
1.186 + //TAny* iReserved;
1.187 +
1.188 + public: // Friend classes
1.189 + //?friend_class_declaration;
1.190 + protected: // Friend classes
1.191 + //?friend_class_declaration;
1.192 + private: // Friend classes
1.193 + //?friend_class_declaration;
1.194 +
1.195 + };
1.196 +
1.197 +#endif // TUTILITY_H
1.198 +
1.199 +// End of File