The Battle for Wesnoth  1.19.0+dev
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ng::scenario Class Reference

#include <create_engine.hpp>

Inheritance diagram for ng::scenario:

Public Member Functions

 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
virtual std::string id () const
virtual std::string name () const
virtual std::string icon () const
virtual std::string description () const
virtual bool allow_era_choice () const
void set_data (const config &data)
const configdata () const
configdata ()

Protected Member Functions

void set_sides ()

Protected Attributes

std::unique_ptr< gamemapmap_
std::string map_hash_
- Protected Attributes inherited from ng::level
config data_

Private Member Functions

 scenario (const scenario &)=delete
scenariooperator= (const scenario &)=delete

Private Attributes

int num_players_

Detailed Description

Definition at line 119 of file create_engine.hpp.

Constructor & Destructor Documentation

◆ scenario() [1/2]

ng::scenario::scenario ( const config data)

Definition at line 50 of file create_engine.cpp.

References set_metadata().

◆ scenario() [2/2]

ng::scenario::scenario ( const scenario )

Member Function Documentation

◆ can_launch_game()

bool ng::scenario::can_launch_game ( ) const

Implements ng::level.

Definition at line 59 of file create_engine.cpp.

References map_.

◆ map_size()

std::string ng::scenario::map_size ( ) const

◆ num_players()

int ng::scenario::num_players ( ) const

Definition at line 128 of file create_engine.hpp.

References num_players_.

Referenced by gui2::dialogs::mp_create_game::update_details().

◆ operator=()

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

◆ player_count_filter()

bool ng::scenario::player_count_filter ( int  player_count) const

Implements ng::level.

Definition at line 135 of file create_engine.hpp.

References num_players_.

◆ set_metadata()

void ng::scenario::set_metadata ( )

Implements ng::level.

Reimplemented in ng::user_map.

Definition at line 64 of file create_engine.cpp.

References _(), ng::level::data_, e, ERR_CF, map_, and set_sides().

Referenced by scenario(), and gui2::dialogs::mp_create_game::update_details().

◆ set_sides()

void ng::scenario::set_sides ( )

Member Data Documentation

◆ map_

std::unique_ptr<gamemap> ng::scenario::map_

◆ map_hash_

std::string ng::scenario::map_hash_

Definition at line 145 of file create_engine.hpp.

◆ num_players_

int ng::scenario::num_players_

Definition at line 151 of file create_engine.hpp.

Referenced by num_players(), player_count_filter(), and set_sides().

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