Public Member Functions | Private Attributes | List of all members
rndm::SeedMaster< SEED >::EngineInfo_t Struct Reference

Information for each engine. More...

Public Member Functions

bool hasSeeder () const
 
bool isFrozen () const
 
void freeze (bool doFreeze=true)
 
void setSeeder (Seeder_t new_seeder)
 
template<typename... Args>
void applySeed (Args...args) const
 Execute the seeder (whatever arguments it has...) More...
 
template<typename... Args>
void autoApplySeed (Args...args) const
 Applies the seed unless frozen. More...
 

Private Attributes

Seeder_t seeder
 engine seeder More...
 
bool autoseed = true
 whether seeding can be automatic More...
 

Detailed Description

template<typename SEED>
struct rndm::SeedMaster< SEED >::EngineInfo_t

Information for each engine.

Definition at line 226 of file SeedMaster.h.

Member Function Documentation

template<typename SEED>
template<typename... Args>
void rndm::SeedMaster< SEED >::EngineInfo_t::applySeed ( Args...  args) const
inline

Execute the seeder (whatever arguments it has...)

Definition at line 236 of file SeedMaster.h.

237  { if (hasSeeder()) seeder(std::forward<Args>(args)...); }
static QCString args
Definition: declinfo.cpp:674
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:245
template<typename SEED>
template<typename... Args>
void rndm::SeedMaster< SEED >::EngineInfo_t::autoApplySeed ( Args...  args) const
inline

Applies the seed unless frozen.

Definition at line 241 of file SeedMaster.h.

242  { if (!isFrozen()) applySeed(std::forward<Args>(args)...); }
void applySeed(Args...args) const
Execute the seeder (whatever arguments it has...)
Definition: SeedMaster.h:236
static QCString args
Definition: declinfo.cpp:674
template<typename SEED>
void rndm::SeedMaster< SEED >::EngineInfo_t::freeze ( bool  doFreeze = true)
inline

Definition at line 231 of file SeedMaster.h.

231 { autoseed = !doFreeze; }
bool autoseed
whether seeding can be automatic
Definition: SeedMaster.h:246
template<typename SEED>
bool rndm::SeedMaster< SEED >::EngineInfo_t::hasSeeder ( ) const
inline

Definition at line 228 of file SeedMaster.h.

228 { return bool(seeder); }
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:245
int bool
Definition: qglobal.h:345
template<typename SEED>
bool rndm::SeedMaster< SEED >::EngineInfo_t::isFrozen ( ) const
inline

Definition at line 229 of file SeedMaster.h.

229 { return !autoseed; }
bool autoseed
whether seeding can be automatic
Definition: SeedMaster.h:246
template<typename SEED>
void rndm::SeedMaster< SEED >::EngineInfo_t::setSeeder ( Seeder_t  new_seeder)
inline

Definition at line 232 of file SeedMaster.h.

232 { seeder = new_seeder; }
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:245

Member Data Documentation

template<typename SEED>
bool rndm::SeedMaster< SEED >::EngineInfo_t::autoseed = true
private

whether seeding can be automatic

Definition at line 246 of file SeedMaster.h.

template<typename SEED>
Seeder_t rndm::SeedMaster< SEED >::EngineInfo_t::seeder
private

engine seeder

Definition at line 245 of file SeedMaster.h.


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