The Battle for Wesnoth  1.17.0-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ng::user_map Class Reference

#include <create_engine.hpp>

Inheritance diagram for ng::user_map:

Public Member Functions

 user_map (const config &data, const std::string &name, gamemap *map)
void set_metadata ()
std::string id () const
 For user maps, the id and name are the same. More...
std::string name () const
std::string description () const
- Public Member Functions inherited from ng::scenario
 scenario (const config &data)
bool can_launch_game () const
void set_metadata ()
int num_players () const
std::string map_size () const
bool player_count_filter (int player_count) const
- Public Member Functions inherited from ng::level
 level (const config &data)
virtual ~level ()=default
 MAKE_ENUM (TYPE,(SCENARIO, "scenario")(USER_MAP, "user_map")(USER_SCENARIO, "user_scenario")(RANDOM_MAP, "random_map")(CAMPAIGN, "campaign")(SP_CAMPAIGN, "sp_campaign")) virtual void set_metadata()=0
virtual std::string icon () const
virtual bool allow_era_choice () const
void set_data (const config &data)
const configdata () const
configdata ()

Private Member Functions

 user_map (const user_map &)=delete
user_mapoperator= (const user_map &)=delete

Private Attributes

std::string name_

Additional Inherited Members

- Protected Member Functions inherited from ng::scenario
void set_sides ()
- Protected Attributes inherited from ng::scenario
std::unique_ptr< gamemapmap_
std::string map_hash_
- Protected Attributes inherited from ng::level
config data_

Detailed Description

Definition at line 163 of file create_engine.hpp.

Constructor & Destructor Documentation

◆ user_map() [1/2]

ng::user_map::user_map ( const config data,
const std::string &  name,
gamemap map 

Definition at line 126 of file create_engine.cpp.

References ng::scenario::map_, and set_metadata().

◆ user_map() [2/2]

ng::user_map::user_map ( const user_map )

Member Function Documentation

◆ description()

std::string ng::user_map::description ( ) const

Reimplemented from ng::level.

Definition at line 142 of file create_engine.cpp.

References _(), and ng::level::data_.

◆ id()

std::string ng::user_map::id ( ) const

For user maps, the id and name are the same.

Reimplemented from ng::level.

Definition at line 171 of file create_engine.hpp.

◆ name()

std::string ng::user_map::name ( ) const

Reimplemented from ng::level.

Definition at line 176 of file create_engine.hpp.

References ng::level::description(), and ng::level::operator=().

◆ operator=()

user_map& ng::user_map::operator= ( const user_map )

◆ set_metadata()

void ng::user_map::set_metadata ( )

Definition at line 137 of file create_engine.cpp.

References ng::scenario::set_sides().

Referenced by user_map().

Member Data Documentation

◆ name_

std::string ng::user_map::name_

Definition at line 187 of file create_engine.hpp.

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