kerneltest/e32test/lffs/randgen.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // randgen
       
    15 // Random number generator for the tests
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 #ifndef __RANDGEN_H__
       
    21 #define __RANDGEN_H__
       
    22 
       
    23 #include <e32std.h>
       
    24 
       
    25 
       
    26 class TRandomGenerator
       
    27 	{
       
    28 	public:
       
    29 		TRandomGenerator();
       
    30 		inline void SetSeed( const TInt64& aSeed );
       
    31 		TUint Next();
       
    32 
       
    33 	private:
       
    34 		TInt64	iValue;
       
    35 	};
       
    36 
       
    37 
       
    38 inline void TRandomGenerator::SetSeed( const TInt64& aSeed )
       
    39 	{
       
    40 	iValue = aSeed;
       
    41 	}
       
    42 
       
    43 
       
    44 #endif