The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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)
 
virtual ~campaign ()
 
bool can_launch_game () const
 
surface create_image_surface (const SDL_Rect &image_rect)
 
void set_metadata ()
 
void mark_if_completed ()
 
std::string id () const
 
bool allow_era_choice () const
 
int min_players () const
 
int max_players () const
 
- Public Member Functions inherited from ng::level
 level (const config &data)
 
virtual ~level ()
 
 MAKE_ENUM (TYPE,(SCENARIO,"scenario")(USER_MAP,"user_map")(USER_SCENARIO,"user_scenario")(RANDOM_MAP,"random_map")(CAMPAIGN,"campaign")(SP_CAMPAIGN,"sp_campaign")) virtual bool can_launch_game() const =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 &)
 
void operator= (const campaign &)
 

Private Attributes

std::string id_
 
bool allow_era_choice_
 
std::string image_label_
 
int min_players_
 
int max_players_
 

Additional Inherited Members

- Protected Attributes inherited from ng::level
config data_
 

Detailed Description

Definition at line 147 of file create_engine.hpp.

Constructor & Destructor Documentation

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

Definition at line 324 of file create_engine.cpp.

ng::campaign::~campaign ( )
virtual

Definition at line 334 of file create_engine.cpp.

ng::campaign::campaign ( const campaign )
private

Member Function Documentation

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

Reimplemented from ng::level.

Definition at line 375 of file create_engine.cpp.

References allow_era_choice_.

bool ng::campaign::can_launch_game ( ) const

Definition at line 338 of file create_engine.cpp.

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

surface ng::campaign::create_image_surface ( const SDL_Rect &  image_rect)
virtual

Implements ng::level.

Definition at line 343 of file create_engine.cpp.

References image::get_image(), image_label_, and scale_surface().

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

Reimplemented from ng::level.

Definition at line 370 of file create_engine.cpp.

References id_.

Referenced by ng::create_engine::find_level_by_id(), and ng::create_engine::find_level_type_by_id().

void ng::campaign::mark_if_completed ( )

Definition at line 365 of file create_engine.cpp.

References ng::level::data_, and preferences::is_campaign_completed().

int ng::campaign::max_players ( ) const

Definition at line 385 of file create_engine.cpp.

References max_players_.

Referenced by mp::create::process_event_impl().

int ng::campaign::min_players ( ) const

Definition at line 380 of file create_engine.cpp.

References min_players_.

Referenced by mp::create::process_event_impl().

void ng::campaign::operator= ( const campaign )
private
void ng::campaign::set_metadata ( )
virtual

Implements ng::level.

Definition at line 351 of file create_engine.cpp.

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

Member Data Documentation

bool ng::campaign::allow_era_choice_
private

Definition at line 173 of file create_engine.hpp.

Referenced by allow_era_choice().

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

Definition at line 172 of file create_engine.hpp.

Referenced by id().

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

Definition at line 174 of file create_engine.hpp.

Referenced by create_image_surface(), and set_metadata().

int ng::campaign::max_players_
private

Definition at line 176 of file create_engine.hpp.

Referenced by max_players(), and set_metadata().

int ng::campaign::min_players_
private

Definition at line 175 of file create_engine.hpp.

Referenced by min_players(), and set_metadata().


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