Thread safe non-deterministic random integer generator. More...
#include <random_device.hpp>
Public Types | |
typedef concurrency::scoped_lock_type | scoped_lock_type |
typedef concurrency::mutex_type | mutex_type |
Public Member Functions | |
int_generator () | |
constructor More... | |
int_type | operator() () |
advances the engine's state and returns the generated value More... | |
Thread safe non-deterministic random integer generator.
This template class provides thread safe non-deterministic random integer generation. Numbers are produced in a uniformly distributed range from the smallest to largest value that int_type can store.
Thread-safety is provided via locking based on the concurrency template parameter.
Non-deterministic RNG is provided via websocketpp::lib which uses either C++11 or Boost 1.47+'s random_device class.
Call operator() to generate the next number
Definition at line 53 of file random_device.hpp.
typedef concurrency::scoped_lock_type websocketpp::random::random_device::int_generator< int_type, concurrency >::scoped_lock_type |
Definition at line 55 of file random_device.hpp.
typedef concurrency::mutex_type websocketpp::random::random_device::int_generator< int_type, concurrency >::mutex_type |
Definition at line 56 of file random_device.hpp.
|
inline |
constructor
Definition at line 60 of file random_device.hpp.
|
inline |
advances the engine's state and returns the generated value
Definition at line 63 of file random_device.hpp.