tk::ctr::RNG class

RNG options: outsource searches to base templated on enum type.

Base classes

template<typename Enum>
class tk::Toggle
Toggle is the base for an Option, doing generic searches.

Constructors, destructors, conversion operators

RNG() explicit
Options constructor.

Public functions

auto param(RNGType rng) const -> const ParamType&
Return parameter based on Enum.
template<class tag, class Param, class Field>
auto param(RNGType rng, const Field& def, const Param& bundle) const -> Field
Return field from RNG parameters bundle.
auto lib(RNGType rng) const -> RNGLibType
Return RNG library type based on RNG options enum.
auto supportsSeq(RNGType rng) const -> bool
Return whether RNG supports sequence option.
template<class OptionType>
auto supportsOpt(RNGType rng, const OptionType& option) const -> bool
Return whether RNG supports sequence option given.

Function documentation

tk::ctr::RNG::RNG() explicit

Options constructor.

Simply initialize in-line and pass associations to base, which will handle client interactions

const ParamType& tk::ctr::RNG::param(RNGType rng) const

Return parameter based on Enum.

Parameters
rng in Enum value of the option requested
Returns Library-specific parameter of the option

Here 'parameter' is the library-specific identifier of the option, i.e., as the library identifies the given option

template<class tag, class Param, class Field>
Field tk::ctr::RNG::param(RNGType rng, const Field& def, const Param& bundle) const

Return field from RNG parameters bundle.

Parameters
rng in Enum value of the option
def in Default value of requested field if field is not found
bundle in Parameter bundle to search in
Returns Field for requested enum if found, default if not found

If user has specified it, return field. If user did not specify it, return default.

RNGLibType tk::ctr::RNG::lib(RNGType rng) const

Return RNG library type based on RNG options enum.

Parameters
rng in Enum value of the option
Returns Library type enum

bool tk::ctr::RNG::supportsSeq(RNGType rng) const

Return whether RNG supports sequence option.

Parameters
rng in Enum value of the option
Returns True if RNG supports sequence option

template<class OptionType>
bool tk::ctr::RNG::supportsOpt(RNGType rng, const OptionType& option) const

Return whether RNG supports sequence option given.

Parameters
rng in Enum value of the option
option in Option type
Returns True if RNG supports sequence option