os/ossrv/stdcpp/tsrc/BC/apps/tutility/inc/tutility.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:       
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
#ifndef TUTILITY_H
sl@0
    20
#define TUTILITY_H
sl@0
    21
sl@0
    22
//  INCLUDES
sl@0
    23
#include <StifLogger.h>
sl@0
    24
#include <TestScripterInternal.h>
sl@0
    25
#include <StifTestModule.h>
sl@0
    26
sl@0
    27
sl@0
    28
class Integer 
sl@0
    29
   {
sl@0
    30
   public:
sl@0
    31
      Integer( int x ) : val( x ) {}
sl@0
    32
      int get( ) { return val; }
sl@0
    33
   private:
sl@0
    34
      int val;
sl@0
    35
   };
sl@0
    36
sl@0
    37
sl@0
    38
sl@0
    39
sl@0
    40
// CONSTANTS
sl@0
    41
//const ?type ?constant_var = ?constant;
sl@0
    42
sl@0
    43
// MACROS
sl@0
    44
//#define ?macro ?macro_def
sl@0
    45
#define TEST_MODULE_VERSION_MAJOR 50
sl@0
    46
#define TEST_MODULE_VERSION_MINOR 9
sl@0
    47
#define TEST_MODULE_VERSION_BUILD 06
sl@0
    48
// Logging path
sl@0
    49
_LIT( KtutilityLogPath, "\\logs\\testframework\\tutility\\" ); 
sl@0
    50
// Log file
sl@0
    51
_LIT( KtutilityLogFile, "tutility.txt" ); 
sl@0
    52
_LIT( KtutilityLogFileWithTitle, "tutility_[%S].txt" );
sl@0
    53
sl@0
    54
// FUNCTION PROTOTYPES
sl@0
    55
//?type ?function_name(?arg_list);
sl@0
    56
sl@0
    57
// FORWARD DECLARATIONS
sl@0
    58
//class ?FORWARD_CLASSNAME;
sl@0
    59
class Ctutility;
sl@0
    60
sl@0
    61
// DATA TYPES
sl@0
    62
//enum ?declaration
sl@0
    63
//typedef ?declaration
sl@0
    64
//extern ?data_type;
sl@0
    65
sl@0
    66
// CLASS DECLARATION
sl@0
    67
sl@0
    68
/**
sl@0
    69
*  Ctutility test class for STIF Test Framework TestScripter.
sl@0
    70
*  ?other_description_lines
sl@0
    71
*
sl@0
    72
*  @lib ?library
sl@0
    73
*  @since ?Series60_version
sl@0
    74
*/
sl@0
    75
NONSHARABLE_CLASS(Ctutility) : public CScriptBase
sl@0
    76
    {
sl@0
    77
    public:  // Constructors and destructor
sl@0
    78
sl@0
    79
        /**
sl@0
    80
        * Two-phased constructor.
sl@0
    81
        */
sl@0
    82
        static Ctutility* NewL( CTestModuleIf& aTestModuleIf );
sl@0
    83
sl@0
    84
        /**
sl@0
    85
        * Destructor.
sl@0
    86
        */
sl@0
    87
        virtual ~Ctutility();
sl@0
    88
sl@0
    89
    public: // New functions
sl@0
    90
sl@0
    91
        /**
sl@0
    92
        * ?member_description.
sl@0
    93
        * @since ?Series60_version
sl@0
    94
        * @param ?arg1 ?description
sl@0
    95
        * @return ?description
sl@0
    96
        */
sl@0
    97
        //?type ?member_function( ?type ?arg1 );
sl@0
    98
sl@0
    99
    public: // Functions from base classes
sl@0
   100
sl@0
   101
        /**
sl@0
   102
        * From CScriptBase Runs a script line.
sl@0
   103
        * @since ?Series60_version
sl@0
   104
        * @param aItem Script line containing method name and parameters
sl@0
   105
        * @return Symbian OS error code
sl@0
   106
        */
sl@0
   107
        virtual TInt RunMethodL( CStifItemParser& aItem );
sl@0
   108
				/**
sl@0
   109
         * Method used to log version of test module
sl@0
   110
         */
sl@0
   111
        void SendTestModuleVersion();
sl@0
   112
    protected:  // New functions
sl@0
   113
sl@0
   114
        /**
sl@0
   115
        * ?member_description.
sl@0
   116
        * @since ?Series60_version
sl@0
   117
        * @param ?arg1 ?description
sl@0
   118
        * @return ?description
sl@0
   119
        */
sl@0
   120
        //?type ?member_function( ?type ?arg1 );
sl@0
   121
sl@0
   122
    protected:  // Functions from base classes
sl@0
   123
sl@0
   124
        /**
sl@0
   125
        * From ?base_class ?member_description
sl@0
   126
        */
sl@0
   127
        //?type ?member_function();
sl@0
   128
sl@0
   129
    private:
sl@0
   130
sl@0
   131
        /**
sl@0
   132
        * C++ default constructor.
sl@0
   133
        */
sl@0
   134
        Ctutility( CTestModuleIf& aTestModuleIf );
sl@0
   135
sl@0
   136
        /**
sl@0
   137
        * By default Symbian 2nd phase constructor is private.
sl@0
   138
        */
sl@0
   139
        void ConstructL();
sl@0
   140
sl@0
   141
        // Prohibit copy constructor if not deriving from CBase.
sl@0
   142
        // ?classname( const ?classname& );
sl@0
   143
        // Prohibit assigment operator if not deriving from CBase.
sl@0
   144
        // ?classname& operator=( const ?classname& );
sl@0
   145
sl@0
   146
        /**
sl@0
   147
        * Frees all resources allocated from test methods.
sl@0
   148
        * @since ?Series60_version
sl@0
   149
        */
sl@0
   150
        void Delete();
sl@0
   151
sl@0
   152
        /**
sl@0
   153
        * Test methods are listed below. 
sl@0
   154
        */
sl@0
   155
sl@0
   156
        /**
sl@0
   157
        * Example test method.
sl@0
   158
        * @since ?Series60_version
sl@0
   159
        * @param aItem Script line containing parameters.
sl@0
   160
        * @return Symbian OS error code.
sl@0
   161
        */
sl@0
   162
        virtual TInt Uninitialized_Copy( CStifItemParser& aItem );
sl@0
   163
        virtual TInt Uninitialized_Copy_n( CStifItemParser& aItem );
sl@0
   164
        virtual TInt Uninitialized_Fill( CStifItemParser& aItem );
sl@0
   165
        virtual TInt Uninitialized_Fill_n( CStifItemParser& aItem );
sl@0
   166
        
sl@0
   167
        //ADD NEW METHOD DEC HERE
sl@0
   168
sl@0
   169
    public:     // Data
sl@0
   170
        // ?one_line_short_description_of_data
sl@0
   171
        //?data_declaration;
sl@0
   172
sl@0
   173
    protected:  // Data
sl@0
   174
        // ?one_line_short_description_of_data
sl@0
   175
        //?data_declaration;
sl@0
   176
sl@0
   177
    private:    // Data
sl@0
   178
        
sl@0
   179
        // ?one_line_short_description_of_data
sl@0
   180
        //?data_declaration;
sl@0
   181
sl@0
   182
        // Reserved pointer for future extension
sl@0
   183
        //TAny* iReserved;
sl@0
   184
sl@0
   185
    public:     // Friend classes
sl@0
   186
        //?friend_class_declaration;
sl@0
   187
    protected:  // Friend classes
sl@0
   188
        //?friend_class_declaration;
sl@0
   189
    private:    // Friend classes
sl@0
   190
        //?friend_class_declaration;
sl@0
   191
sl@0
   192
    };
sl@0
   193
sl@0
   194
#endif      // TUTILITY_H
sl@0
   195
sl@0
   196
// End of File