NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
websocketpp::random::random_device::int_generator< int_type, concurrency > Class Template Reference

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...
 

Detailed Description

template<typename int_type, typename concurrency>
class websocketpp::random::random_device::int_generator< int_type, concurrency >

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.

Member Typedef Documentation

template<typename int_type, typename concurrency>
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.

template<typename int_type, typename concurrency>
typedef concurrency::mutex_type websocketpp::random::random_device::int_generator< int_type, concurrency >::mutex_type

Definition at line 56 of file random_device.hpp.

Constructor & Destructor Documentation

template<typename int_type, typename concurrency>
websocketpp::random::random_device::int_generator< int_type, concurrency >::int_generator ( )
inline

constructor

Definition at line 60 of file random_device.hpp.

Member Function Documentation

template<typename int_type, typename concurrency>
int_type websocketpp::random::random_device::int_generator< int_type, concurrency >::operator() ( )
inline

advances the engine's state and returns the generated value

Definition at line 63 of file random_device.hpp.


The documentation for this class was generated from the following file: