Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Randomizer Class Reference

#include <random.h>

List of all members.

Public Methods

 Randomizer (void)
 Value (int limit)

Private Attributes

time_t seed

Friends

int operator * (Randomizer R, int limit)


Constructor & Destructor Documentation

Randomizer::Randomizer void   
 

Definition at line 25 of file random.c.

References seed.

00026 {
00027   time (&seed);
00028   srand (seed);
00029 }


Member Function Documentation

Randomizer::Value int    limit [inline]
 

Definition at line 37 of file random.h.

00037 { return (rand () % limit); }


Friends And Related Function Documentation

int operator * Randomizer    R,
int    limit
[friend]
 

Definition at line 38 of file random.h.

00039       { return R.Value (limit); }


Member Data Documentation

time_t Randomizer::seed [private]
 

Definition at line 34 of file random.h.

Referenced by Randomizer().


The documentation for this class was generated from the following files:
Generated on Sun Jul 6 23:07:18 2003 for Scotland Yard by doxygen1.2.15