The Battle for Wesnoth  1.15.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:
Inheritance graph

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 464 of file aspect.hpp.

Member Typedef Documentation

◆ factory_map

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

Definition at line 468 of file aspect.hpp.

◆ factory_map_pair

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

Definition at line 469 of file aspect.hpp.

◆ factory_ptr

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

Definition at line 467 of file aspect.hpp.

Constructor & Destructor Documentation

◆ aspect_factory()

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

Definition at line 481 of file aspect.hpp.

◆ ~aspect_factory()

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

Definition at line 490 of file aspect.hpp.

Member Function Documentation

◆ get_list()

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

Definition at line 471 of file aspect.hpp.

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

◆ 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 175 of file aspect.cpp.

References ERR_AI_ASPECT.


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