Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Dv::Util::Random Class Reference

Class supporting random number generation. More...

#include <random.h>

List of all members.

Static Public Member Functions

unsigned long rand () throw (std::runtime_error)
 Produces a random unsigned long taken from /dev/urandom.


Detailed Description

Class supporting random number generation.

Example usage

    unsigned long key = Dv::Util::Random::rand();

Definition at line 21 of file random.h.


Member Function Documentation

unsigned long Dv::Util::Random::rand  )  throw (std::runtime_error) [static]
 

Produces a random unsigned long taken from /dev/urandom.

An exception is thrown if anything goes wrong, e.g. the file /dev/urandom cannot be opened.

Later extensions should automatically switch to another implementation if /dev/urandom is not available.


The documentation for this class was generated from the following file:
dvutil-0.13.15 [30 December, 2004]