|
BDE 4.39.x Production Release
|
#include <bslh_seedgenerator.h>
This class template implements a seed generator which takes a user supplied random number generator and uses it to generate an arbitrary length seed.
RANDOM_NUM_GEN to take advantage of the empty-base optimization. Public Member Functions | |
| SeedGenerator () | |
| SeedGenerator (const RANDOM_NUM_GEN &randomNumberGenerator) | |
| SeedGenerator (const SeedGenerator &original)=default | |
| ~SeedGenerator ()=default | |
| SeedGenerator & | operator= (const SeedGenerator &rhs)=default |
| void | generateSeed (char *seedLocation, size_t seedLength) |
|
inline |
Create a bslh::SeedGenerator that will default construct the parameterized RNG and use it to generate its seeds.
|
inlineexplicit |
Create a bslh::SeedGenerator that will use the specified randomNumberGenerator to generate its seeds.
|
default |
|
default |
|
inline |
Generate a seed of the specified seedLength bytes and store it at the specified seedLocation. The seed will be generated with bytes from the random number generator supplied at construction. All of the returned bytes will come from the RNG, meaning if the requested seed is larger than the return type of the RNG, the RNG will be called multiple times.
seedLocation can store seedLength bytes.
|
default |