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