diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-05-22 17:15:40 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-05-22 17:15:40 +0000 |
commit | ce793e31f387c0715fa5b50c20e06510cc3e95ff (patch) | |
tree | 5b15972bdcbe7a26933e8158f52b29fb014dc421 /src/stable/randomcmwc.h | |
parent | 2295579eb790d6eff6e54e84c01da6de10809a71 (diff) | |
download | libbu++-ce793e31f387c0715fa5b50c20e06510cc3e95ff.tar.gz libbu++-ce793e31f387c0715fa5b50c20e06510cc3e95ff.tar.bz2 libbu++-ce793e31f387c0715fa5b50c20e06510cc3e95ff.tar.xz libbu++-ce793e31f387c0715fa5b50c20e06510cc3e95ff.zip |
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.
Diffstat (limited to 'src/stable/randomcmwc.h')
-rw-r--r-- | src/stable/randomcmwc.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/stable/randomcmwc.h b/src/stable/randomcmwc.h new file mode 100644 index 0000000..747eb6a --- /dev/null +++ b/src/stable/randomcmwc.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2012 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | #ifndef BU_RANDOM_CMWC_H | ||
8 | #define BU_RANDOM_CMWC_H | ||
9 | |||
10 | #include "bu/randombase.h" | ||
11 | |||
12 | namespace Bu | ||
13 | { | ||
14 | class RandomCmwc : public RandomBase | ||
15 | { | ||
16 | public: | ||
17 | RandomCmwc(); | ||
18 | virtual ~RandomCmwc(); | ||
19 | |||
20 | virtual void seed( int32_t iSeed ); | ||
21 | |||
22 | virtual int32_t rand(); | ||
23 | |||
24 | private: | ||
25 | uint32_t *q, c; | ||
26 | }; | ||
27 | }; | ||
28 | |||
29 | #endif | ||