00001 /* $Id: random.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2003 by David White <dave@whitevine.net> 00004 Copyright (C) 2005 - 2012 by Yann Dirson <ydirson@altern.org> 00005 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY. 00013 00014 See the COPYING file for more details. 00015 */ 00016 00017 /** @file */ 00018 00019 #ifndef RANDOM_HPP_INCLUDED 00020 #define RANDOM_HPP_INCLUDED 00021 00022 class config; 00023 00024 int get_random(); 00025 int get_random_nocheck(); 00026 const config* get_random_results(); 00027 void set_random_results(const config& cfg); 00028 00029 namespace rand_rng 00030 { 00031 00032 class rng; 00033 00034 struct set_random_generator { 00035 set_random_generator(rng* r); 00036 ~set_random_generator(); 00037 private: 00038 rng* old_; 00039 }; 00040 00041 } // ends rand_rng namespace 00042 00043 #endif
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:08 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |