The Battle for Wesnoth  1.15.2+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:
Inheritance graph

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
 
 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 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 &)
 
void operator= (const scenario &)
 

Private Attributes

int num_players_
 

Detailed Description

Definition at line 126 of file create_engine.hpp.

Constructor & Destructor Documentation

◆ scenario() [1/2]

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

Definition at line 51 of file create_engine.cpp.

References set_metadata().

◆ scenario() [2/2]

ng::scenario::scenario ( const scenario )
private

Member Function Documentation

◆ can_launch_game()

bool ng::scenario::can_launch_game ( ) const
virtual

Implements ng::level.

Definition at line 60 of file create_engine.cpp.

References map_.

◆ map_size()

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

◆ num_players()

int ng::scenario::num_players ( ) const
inline

Definition at line 135 of file create_engine.hpp.

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

◆ operator=()

void ng::scenario::operator= ( const scenario )
private

◆ player_count_filter()

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

Implements ng::level.

Definition at line 142 of file create_engine.hpp.

◆ set_metadata()

void ng::scenario::set_metadata ( )

◆ set_sides()

void ng::scenario::set_sides ( )
protected

Member Data Documentation

◆ map_

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

◆ map_hash_

std::string ng::scenario::map_hash_
protected

Definition at line 152 of file create_engine.hpp.

◆ num_players_

int ng::scenario::num_players_
private

Definition at line 158 of file create_engine.hpp.

Referenced by set_sides().


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