The Battle for Wesnoth  1.15.1+dev
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
ai::stage_factory Class Referenceabstract

#include <stage.hpp>

Inheritance diagram for ai::stage_factory:
Inheritance graph

Public Types

typedef std::shared_ptr< stage_factoryfactory_ptr
 
typedef std::map< std::string, factory_ptrfactory_map
 
typedef std::pair< const std::string, factory_ptrfactory_map_pair
 

Public Member Functions

virtual stage_ptr get_new_instance (ai_context &context, const config &cfg)=0
 
 stage_factory (const std::string &name)
 
virtual ~stage_factory ()
 

Static Public Member Functions

static factory_mapget_list ()
 

Private Member Functions

bool is_duplicate (const std::string &name)
 

Detailed Description

Definition at line 94 of file stage.hpp.

Member Typedef Documentation

◆ factory_map

typedef std::map<std::string, factory_ptr> ai::stage_factory::factory_map

Definition at line 98 of file stage.hpp.

◆ factory_map_pair

typedef std::pair<const std::string, factory_ptr> ai::stage_factory::factory_map_pair

Definition at line 99 of file stage.hpp.

◆ factory_ptr

typedef std::shared_ptr< stage_factory > ai::stage_factory::factory_ptr

Definition at line 97 of file stage.hpp.

Constructor & Destructor Documentation

◆ stage_factory()

ai::stage_factory::stage_factory ( const std::string &  name)
inline

Definition at line 111 of file stage.hpp.

◆ ~stage_factory()

virtual ai::stage_factory::~stage_factory ( )
inlinevirtual

Definition at line 120 of file stage.hpp.

Member Function Documentation

◆ get_list()

static factory_map& ai::stage_factory::get_list ( )
inlinestatic

Definition at line 101 of file stage.hpp.

Referenced by ai::engine_cpp::do_parse_stage_from_config().

◆ get_new_instance()

virtual stage_ptr ai::stage_factory::get_new_instance ( ai_context context,
const config cfg 
)
pure virtual

◆ is_duplicate()

bool ai::stage_factory::is_duplicate ( const std::string &  name)
private

Definition at line 114 of file stage.cpp.

References ERR_AI_STAGE, and gui2::event::find().


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