AuroraRuntime/Source/RNG/AuRandomDevice.hpp
Reece Wilson 124038df62 [*] Refactor public headers
[+] AuConsole::Commands::RemoveCommand
[+] EExtendedUsage::eServerAuth
[+] SysPanic2 for SysSafeLine hints (backtrace may contain optimized SysPanics, making tracing the true origin difficult)
[*] Reworked SysAssertions
[*] AuParse::EncodeHex now takes AuMemoryViewRead
[*] AuRng::ReadSecureRNG now takes AuMemoryViewWrite
[*] AuRng::ReadFastRNG now takes AuMemoryViewWrite
2023-01-15 06:05:22 +00:00

38 lines
1.1 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuRandomDevice.hpp
Date: 2021-9-3
Author: Reece
***/
#pragma once
#include "AuWELL.hpp"
namespace Aurora::RNG
{
struct RandomDevice : IRandomDevice
{
void Read(Memory::MemoryViewWrite view) override;
AuString NextString(AuUInt32 uLength, ERngStringCharacters type) override;
void NextString(char *pString, AuUInt32 uLength, ERngStringCharacters type) override;
AuUInt8 NextByte() override;
bool NextBoolean() override;
AuUInt32 NextU32() override;
AuUInt64 NextU64() override;
AuInt32 NextInt(AuInt32 uMin, AuInt32 uMax) override;
AuUInt32 NextU32(AuUInt32 uMin, AuUInt32 uMax) override;
double NextDecimal() override;
float NextNumber(float min, float max) override;
AuUInt32 NextIndex(AuUInt32 uCount /* = max + 1*/) override;
AuMemoryViewRead ToSeed() override;
void Init(const RandomDef &def);
private:
RandomDef def_;
WELLRand fast_;
};
}