Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::RandomUtil类 参考

随机工具类 更多...

#include <RandomUtil.h>

Public 成员函数

template<>
float next ()
 
template<>
double next ()
 
template<>
float next (float min, float max)
 
template<>
double next (double min, double max)
 

静态 Public 成员函数

template<class RETURN_VALUE >
static RETURN_VALUE next ()
 
template<class RETURN_VALUE >
static RETURN_VALUE next (RETURN_VALUE min, RETURN_VALUE max)
 
static std::string nextString (size_t length, int required)
 
static uint64_t nextUnsignedInt64 ()
 
static std::random_device & getDevInstance () noexcept
 

静态 Public 属性

static constexpr int REQUIRED_UPPER_LETTER = 1
 
static constexpr int REQUIRED_LOWER_LETTER = 2
 
static constexpr int REQUIRED_DIGIT = 4
 
static constexpr int REQUIRED_SYMBOL = 8
 

静态 Private 成员函数

static std::string nextString (size_t length, bool upper, bool lower, bool digit, bool symbol)
 

静态 Private 属性

static const std::string UPPER_LETTER_LIST = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 
static const std::string LOWER_LETTER_LIST = "abcdefghijklmnopqrstuvwxyz"
 
static const std::string DIGIT_LIST = "01234567890"
 
static const std::string SYMBOL_LIST = "@#$&*()'\"%-+=/;:!,?._^[]{}|~\<>"
 
static std::random_device dev {}
 

详细描述

随机工具类

成员函数说明

◆ getDevInstance()

std::random_device & sese::RandomUtil::getDevInstance ( )
staticnoexcept

被这些函数引用 next() , 以及 next().

◆ next() [1/6]

template<class RETURN_VALUE >
RETURN_VALUE sese::RandomUtil::next ( )
inlinestatic

◆ next() [2/6]

template<>
float sese::RandomUtil::next ( )
inline

引用了 next().

◆ next() [3/6]

template<>
double sese::RandomUtil::next ( )
inline

引用了 next().

◆ next() [4/6]

template<>
double sese::RandomUtil::next ( double min,
double max )
inline

引用了 next().

◆ next() [5/6]

template<>
float sese::RandomUtil::next ( float min,
float max )
inline

引用了 next().

◆ next() [6/6]

template<class RETURN_VALUE >
RETURN_VALUE sese::RandomUtil::next ( RETURN_VALUE min,
RETURN_VALUE max )
inlinestatic

引用了 getDevInstance().

◆ nextString() [1/2]

std::string sese::RandomUtil::nextString ( size_t length,
bool upper,
bool lower,
bool digit,
bool symbol )
staticprivate

◆ nextString() [2/2]

std::string sese::RandomUtil::nextString ( size_t length,
int required )
static

引用了 nextString().

被这些函数引用 nextString().

◆ nextUnsignedInt64()

uint64_t sese::RandomUtil::nextUnsignedInt64 ( )
static

引用了 dev.

类成员变量说明

◆ dev

std::random_device sese::RandomUtil::dev {}
staticprivate

被这些函数引用 nextUnsignedInt64().

◆ DIGIT_LIST

const std::string sese::RandomUtil::DIGIT_LIST = "01234567890"
staticprivate

◆ LOWER_LETTER_LIST

const std::string sese::RandomUtil::LOWER_LETTER_LIST = "abcdefghijklmnopqrstuvwxyz"
staticprivate

◆ REQUIRED_DIGIT

int sese::RandomUtil::REQUIRED_DIGIT = 4
staticconstexpr

◆ REQUIRED_LOWER_LETTER

int sese::RandomUtil::REQUIRED_LOWER_LETTER = 2
staticconstexpr

◆ REQUIRED_SYMBOL

int sese::RandomUtil::REQUIRED_SYMBOL = 8
staticconstexpr

◆ REQUIRED_UPPER_LETTER

int sese::RandomUtil::REQUIRED_UPPER_LETTER = 1
staticconstexpr

◆ SYMBOL_LIST

const std::string sese::RandomUtil::SYMBOL_LIST = "@#$&*()'\"%-+=/;:!,?._^[]{}|~\<>"
staticprivate

◆ UPPER_LETTER_LIST

const std::string sese::RandomUtil::UPPER_LETTER_LIST = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
staticprivate

该类的文档由以下文件生成: