From ce793e31f387c0715fa5b50c20e06510cc3e95ff Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 22 May 2012 17:15:40 +0000 Subject: Moved random to stable, just needs some minor tweaks. But it's already in use in a couple of core components, including in tempFile name generation. --- src/stable/randomsystem.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/stable/randomsystem.h (limited to 'src/stable/randomsystem.h') diff --git a/src/stable/randomsystem.h b/src/stable/randomsystem.h new file mode 100644 index 0000000..7106d58 --- /dev/null +++ b/src/stable/randomsystem.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2007-2012 Xagasoft, All rights reserved. + * + * This file is part of the libbu++ library and is released under the + * terms of the license contained in the file LICENSE. + */ +#ifndef BU_RANDOM_SYSTEM_H +#define BU_RANDOM_SYSTEM_H + +#include "bu/randombase.h" + +namespace Bu +{ + class File; + class RandomSystem : public RandomBase + { + public: + enum Type + { + Fast, + Good + }; + + RandomSystem( Type eType=Fast ); + virtual ~RandomSystem(); + + virtual void seed( int32_t iSeed ); + + virtual int32_t rand(); + + private: + Type eType; + File *pSrc; + }; +}; + +#endif -- cgit v1.2.3