The Battle for Wesnoth  1.17.10+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 449 of file aspect.hpp.

Member Typedef Documentation

◆ factory_map

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

Definition at line 453 of file aspect.hpp.

◆ factory_map_pair

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

Definition at line 454 of file aspect.hpp.

◆ factory_ptr

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

Definition at line 452 of file aspect.hpp.

Constructor & Destructor Documentation

◆ aspect_factory()

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

Definition at line 466 of file aspect.hpp.

◆ ~aspect_factory()

virtual ai::aspect_factory::~aspect_factory ( )

Definition at line 475 of file aspect.hpp.

Member Function Documentation

◆ get_list()

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

Definition at line 456 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)

Definition at line 160 of file aspect.cpp.

References ERR_AI_ASPECT.

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