The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
seed_rng.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2014 - 2025
3 by Chris Beck <render787@gmail.com>
4 Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY.
12
13 See the COPYING file for more details.
14*/
15
16/*
17 This file provides a name space to store a source for seeds for
18 prgs. It should be boost::random_device on platforms that provide
19 this with our version of boost random, and otherwise should be the
20 system time I suppose.
21
22 The seed_rng::next_seed function provided probably shouldn't be used
23 anywhere except for default constructors of prg classes, or similar.
24*/
25
26#pragma once
27
28#include <cstdint>
29#include <string>
30
31namespace seed_rng {
32
33uint32_t next_seed();
34std::string next_seed_str();
35
36} // ends seed_rng namespace
uint32_t next_seed()
Definition seed_rng.cpp:32
std::string next_seed_str()
Definition seed_rng.cpp:37