Rudiments
/home/dmuse/src/rudiments/include/rudiments/randomnumber.h
00001 // Copyright (c) 1999-2002 David Muse
00002 // See the COPYING file for more information.
00003 
00004 #ifndef RUDIMENTS_RANDOMNUMBER_H
00005 #define RUDIMENTS_RANDOMNUMBER_H
00006 
00007 #include <rudiments/private/randomnumberincludes.h>
00008 
00009 #ifdef RUDIMENTS_NAMESPACE
00010 namespace rudiments {
00011 #endif
00012 
00033 class RUDIMENTS_DLLSPEC randomnumber {
00034         public:
00038                 static  int32_t getSeed();
00039 
00045                 static  int32_t generateNumber(int32_t seed);
00046 
00053                 static  int32_t generateScaledNumber(int32_t seed, 
00054                                                         int32_t lower,
00055                                                         int32_t upper);
00056 
00062                 static  int32_t scaleNumber(int32_t number,
00063                                                 int32_t lower,
00064                                                 int32_t upper);
00065 
00073                 static  int32_t getRandMax();
00074 
00077                 static  bool    needsMutex();
00078 
00082                 static  void    setMutex(mutex *mtx);
00083 };
00084 
00085 #ifdef RUDIMENTS_NAMESPACE
00086 }
00087 #endif
00088 
00089 #endif