WebSocket++
0.8.3-dev
C++ websocket client/server library
|
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 | |
int_type | operator() () |
advances the engine's state and returns the generated value | |
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.