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

#include <create_engine.hpp>

Inheritance diagram for ng::campaign:
Inheritance graph

Public Member Functions

 campaign (const config &data)
 
bool can_launch_game () const
 
void set_metadata ()
 
void mark_if_completed ()
 
std::string id () const
 
bool allow_era_choice () const
 
int min_players () const
 
int max_players () const
 
bool player_count_filter (int player_count) const
 
std::pair< irdya_date, irdya_datedates () 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 name () const
 
virtual std::string icon () const
 
virtual std::string description () const
 
void set_data (const config &data)
 
const configdata () const
 
configdata ()
 

Private Member Functions

 campaign (const campaign &)=delete
 
void operator= (const campaign &)=delete
 

Private Attributes

std::string id_
 
bool allow_era_choice_
 
std::string image_label_
 
int min_players_
 
int max_players_
 
std::pair< irdya_date, irdya_datedates_
 

Additional Inherited Members

- Protected Attributes inherited from ng::level
config data_
 

Detailed Description

Definition at line 220 of file create_engine.hpp.

Constructor & Destructor Documentation

◆ campaign() [1/2]

ng::campaign::campaign ( const config data)

◆ campaign() [2/2]

ng::campaign::campaign ( const campaign )
privatedelete

Member Function Documentation

◆ allow_era_choice()

bool ng::campaign::allow_era_choice ( ) const
inlinevirtual

Reimplemented from ng::level.

Definition at line 236 of file create_engine.hpp.

◆ can_launch_game()

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

Implements ng::level.

Definition at line 201 of file create_engine.cpp.

References ng::level::data_, and config::empty().

◆ dates()

std::pair<irdya_date, irdya_date> ng::campaign::dates ( ) const
inline

◆ id()

std::string ng::campaign::id ( ) const
inlinevirtual

Reimplemented from ng::level.

Definition at line 231 of file create_engine.hpp.

◆ mark_if_completed()

void ng::campaign::mark_if_completed ( )

◆ max_players()

int ng::campaign::max_players ( ) const
inline

Definition at line 246 of file create_engine.hpp.

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

◆ min_players()

int ng::campaign::min_players ( ) const
inline

Definition at line 241 of file create_engine.hpp.

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

◆ operator=()

void ng::campaign::operator= ( const campaign )
privatedelete

◆ player_count_filter()

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

Implements ng::level.

Definition at line 251 of file create_engine.hpp.

◆ set_metadata()

void ng::campaign::set_metadata ( )

Definition at line 206 of file create_engine.cpp.

References ng::level::data_, image_label_, max_players_, and min_players_.

Referenced by campaign().

Member Data Documentation

◆ allow_era_choice_

bool ng::campaign::allow_era_choice_
private

Definition at line 266 of file create_engine.hpp.

◆ dates_

std::pair<irdya_date, irdya_date> ng::campaign::dates_
private

Definition at line 270 of file create_engine.hpp.

Referenced by campaign().

◆ id_

std::string ng::campaign::id_
private

Definition at line 265 of file create_engine.hpp.

◆ image_label_

std::string ng::campaign::image_label_
private

Definition at line 267 of file create_engine.hpp.

Referenced by set_metadata().

◆ max_players_

int ng::campaign::max_players_
private

Definition at line 269 of file create_engine.hpp.

Referenced by set_metadata().

◆ min_players_

int ng::campaign::min_players_
private

Definition at line 268 of file create_engine.hpp.

Referenced by set_metadata().


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