aboutsummaryrefslogtreecommitdiff
path: root/src/experimental/random.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-05-22 17:15:40 +0000
committerMike Buland <eichlan@xagasoft.com>2012-05-22 17:15:40 +0000
commitce793e31f387c0715fa5b50c20e06510cc3e95ff (patch)
tree5b15972bdcbe7a26933e8158f52b29fb014dc421 /src/experimental/random.cpp
parent2295579eb790d6eff6e54e84c01da6de10809a71 (diff)
downloadlibbu++-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/experimental/random.cpp')
-rw-r--r--src/experimental/random.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/experimental/random.cpp b/src/experimental/random.cpp
deleted file mode 100644
index 725948a..0000000
--- a/src/experimental/random.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
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#include "bu/random.h"
8
9#include "bu/randombasic.h"
10
11Bu::Random::Random() :
12 pGen( NULL )
13{
14 pGen = new RandomBasic();
15}
16
17Bu::Random::~Random()
18{
19 delete pGen;
20 pGen = NULL;
21}
22
23int32_t Bu::Random::rand()
24{
25 return getInstance().pGen->rand();
26}
27
28void Bu::Random::seed( int32_t iSeed )
29{
30 getInstance().pGen->seed( iSeed );
31}
32