The Battle for Wesnoth  1.19.0-dev
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
ai::aspect_factory Class Referenceabstract

#include <aspect.hpp>

Inheritance diagram for ai::aspect_factory:

Public Types

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

Public Member Functions

virtual aspect_ptr get_new_instance (readonly_context &context, const config &cfg, const std::string &id)=0
 
 aspect_factory (const std::string &name)
 
virtual ~aspect_factory ()
 

Static Public Member Functions

static factory_mapget_list ()
 

Private Member Functions

bool is_duplicate (const std::string &name)
 

Detailed Description

Definition at line 448 of file aspect.hpp.

Member Typedef Documentation

◆ factory_map

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

Definition at line 452 of file aspect.hpp.

◆ factory_map_pair

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

Definition at line 453 of file aspect.hpp.

◆ factory_ptr

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

Definition at line 451 of file aspect.hpp.

Constructor & Destructor Documentation

◆ aspect_factory()

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

Definition at line 465 of file aspect.hpp.

References get_list(), and is_duplicate().

◆ ~aspect_factory()

virtual ai::aspect_factory::~aspect_factory ( )
inlinevirtual

Definition at line 474 of file aspect.hpp.

Member Function Documentation

◆ get_list()

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

◆ get_new_instance()

virtual aspect_ptr ai::aspect_factory::get_new_instance ( readonly_context context,
const config cfg,
const std::string &  id 
)
pure virtual

◆ is_duplicate()

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

Definition at line 160 of file aspect.cpp.

References ERR_AI_ASPECT, and get_list().

Referenced by aspect_factory().


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