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