The Battle for Wesnoth  1.15.0+dev
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
ng::level Class Referenceabstract

Base class for all level type classes. More...

#include <create_engine.hpp>

Inheritance diagram for ng::level:
Inheritance graph

Public Member Functions

 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 bool can_launch_game () const =0
 
virtual bool player_count_filter (int player_count) const =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 Attributes

config data_
 

Private Member Functions

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

Detailed Description

Base class for all level type classes.

Definition at line 58 of file create_engine.hpp.

Constructor & Destructor Documentation

◆ level() [1/2]

ng::level::level ( const config data)

Definition at line 46 of file create_engine.cpp.

◆ ~level()

virtual ng::level::~level ( )
virtualdefault

◆ level() [2/2]

ng::level::level ( const level )
privatedelete

Member Function Documentation

◆ allow_era_choice()

virtual bool ng::level::allow_era_choice ( ) const
inlinevirtual

◆ can_launch_game()

virtual bool ng::level::can_launch_game ( ) const
pure virtual

Implemented in ng::campaign, and ng::scenario.

◆ data() [1/2]

const config& ng::level::data ( ) const
inline

◆ data() [2/2]

config& ng::level::data ( )
inline

Definition at line 113 of file create_engine.hpp.

References data_.

◆ description()

virtual std::string ng::level::description ( ) const
inlinevirtual

◆ icon()

virtual std::string ng::level::icon ( ) const
inlinevirtual

Definition at line 88 of file create_engine.hpp.

References data_.

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

◆ id()

virtual std::string ng::level::id ( ) const
inlinevirtual

◆ MAKE_ENUM()

ng::level::MAKE_ENUM ( TYPE  ,
(SCENARIO, "scenario")(USER_MAP, "user_map")(USER_SCENARIO, "user_scenario")(RANDOM_MAP, "random_map")(CAMPAIGN, "campaign")(SP_CAMPAIGN, "sp_campaign")   
)
pure virtual

◆ name()

virtual std::string ng::level::name ( ) const
inlinevirtual

◆ operator=()

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

◆ player_count_filter()

virtual bool ng::level::player_count_filter ( int  player_count) const
pure virtual

Implemented in ng::campaign, and ng::scenario.

◆ set_data()

void ng::level::set_data ( const config data)
inline

Definition at line 103 of file create_engine.hpp.

References data(), and data_.

Referenced by ng::create_engine::init_generated_level_data().

Member Data Documentation

◆ data_

config ng::level::data_
protected

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