The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
map_generator Class Referenceabstract

#include <map_generator.hpp>

Inheritance diagram for map_generator:
Inheritance graph

Public Member Functions

virtual ~map_generator ()
 
virtual bool allow_user_config () const
 Returns true if the map generator has an interactive screen, which allows the user to modify how the generator behaves. More...
 
virtual void user_config (CVideo &v)
 Display the interactive screen, which allows the user to modify how the generator behaves. More...
 
virtual std::string name () const =0
 Returns a string identifying the generator by name. More...
 
virtual std::string config_name () const =0
 Return a friendly name for the generator used to differentiate between different configs of the same generator. More...
 
virtual std::string create_map (boost::optional< boost::uint32_t > randomseed=boost::none)=0
 Creates a new map and returns it. More...
 
virtual config create_scenario (boost::optional< boost::uint32_t > randomseed=boost::none)
 

Detailed Description

Definition at line 36 of file map_generator.hpp.

Constructor & Destructor Documentation

virtual map_generator::~map_generator ( )
inlinevirtual

Definition at line 39 of file map_generator.hpp.

Member Function Documentation

bool map_generator::allow_user_config ( ) const
virtual

Returns true if the map generator has an interactive screen, which allows the user to modify how the generator behaves.

by default we don't allow user configs.

Reimplemented in lua_map_generator, and default_map_generator.

Definition at line 40 of file map_generator.cpp.

virtual std::string map_generator::config_name ( ) const
pure virtual

Return a friendly name for the generator used to differentiate between different configs of the same generator.

Implemented in lua_map_generator, cave_map_generator, and default_map_generator.

virtual std::string map_generator::create_map ( boost::optional< boost::uint32_t randomseed = boost::none)
pure virtual

Creates a new map and returns it.

args may contain arguments to the map generator.

Implemented in lua_map_generator, cave_map_generator, and default_map_generator.

Referenced by create_scenario(), and editor::context_manager::generate_map_dialog().

config map_generator::create_scenario ( boost::optional< boost::uint32_t randomseed = boost::none)
virtual

Reimplemented in lua_map_generator, cave_map_generator, and default_map_generator.

Definition at line 31 of file map_generator.cpp.

References create_map().

Referenced by lua_map_generator::create_scenario().

virtual std::string map_generator::name ( ) const
pure virtual

Returns a string identifying the generator by name.

The name should not contain spaces.

Implemented in lua_map_generator, cave_map_generator, and default_map_generator.

void map_generator::user_config ( CVideo v)
virtual

Display the interactive screen, which allows the user to modify how the generator behaves.

(This function will not be called if allow_user_config() returns false).

Reimplemented in lua_map_generator, and default_map_generator.

Definition at line 45 of file map_generator.cpp.

Referenced by gui2::teditor_generate_map::do_settings().


The documentation for this class was generated from the following files: