The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ai::holder Class Reference

Base class that holds the AI and current AI parameters. More...

#include <manager.hpp>

Public Member Functions

 holder (side_number side, const config &cfg)
 
virtual ~holder ()
 
ai_compositeget_ai_ref ()
 
std::string describe_ai () const
 
config to_config () const
 
void modify_ai (const config &cfg)
 
void micro_ai (const config &cfg)
 
void append_ai (const config &cfg)
 
std::string get_ai_overview ()
 
std::string get_ai_structure ()
 
std::string get_ai_identifier () const
 
componentget_component (component *root, const std::string &path)
 

Private Member Functions

void init (side_number side)
 

Private Attributes

composite_ai_ptr ai_
 
std::unique_ptr< side_contextside_context_
 
std::unique_ptr< readonly_contextreadonly_context_
 
std::unique_ptr< readwrite_contextreadwrite_context_
 
std::unique_ptr< default_ai_contextdefault_ai_context_
 
side_number side_
 
config cfg_
 

Detailed Description

Base class that holds the AI and current AI parameters.

It is an implementation detail.

Definition at line 50 of file manager.hpp.

Constructor & Destructor Documentation

◆ holder()

ai::holder::holder ( side_number  side,
const config cfg 
)

Definition at line 74 of file manager.cpp.

References DBG_AI_MANAGER, and describe_ai().

◆ ~holder()

ai::holder::~holder ( )
virtual

Definition at line 128 of file manager.cpp.

References ai_, describe_ai(), and LOG_AI_MANAGER.

Member Function Documentation

◆ append_ai()

void ai::holder::append_ai ( const config cfg)

◆ describe_ai()

std::string ai::holder::describe_ai ( ) const

Definition at line 244 of file manager.cpp.

References ai_, cfg_, and side_.

Referenced by holder(), init(), and ~holder().

◆ get_ai_identifier()

std::string ai::holder::get_ai_identifier ( ) const

Definition at line 305 of file manager.cpp.

References cfg_.

Referenced by ai::manager::get_active_ai_identifier_for_side().

◆ get_ai_overview()

std::string ai::holder::get_ai_overview ( )

Definition at line 253 of file manager.cpp.

References ai_, get_ai_ref(), utils::join(), and s.

Referenced by ai::manager::get_active_ai_overview_for_side().

◆ get_ai_ref()

ai_composite & ai::holder::get_ai_ref ( )

◆ get_ai_structure()

std::string ai::holder::get_ai_structure ( )

◆ get_component()

component * ai::holder::get_component ( component root,
const std::string &  path 
)

◆ init()

void ai::holder::init ( side_number  side)
private

◆ micro_ai()

void ai::holder::micro_ai ( const config cfg)

Definition at line 147 of file manager.cpp.

References ai_, init(), and side_.

Referenced by append_ai(), and init().

◆ modify_ai()

void ai::holder::modify_ai ( const config cfg)

◆ to_config()

config ai::holder::to_config ( ) const

Member Data Documentation

◆ ai_

composite_ai_ptr ai::holder::ai_
private

◆ cfg_

config ai::holder::cfg_
private

Definition at line 84 of file manager.hpp.

Referenced by describe_ai(), get_ai_identifier(), init(), and to_config().

◆ default_ai_context_

std::unique_ptr<default_ai_context> ai::holder::default_ai_context_
private

Definition at line 82 of file manager.hpp.

Referenced by init(), and to_config().

◆ readonly_context_

std::unique_ptr<readonly_context> ai::holder::readonly_context_
private

Definition at line 80 of file manager.hpp.

Referenced by init(), and to_config().

◆ readwrite_context_

std::unique_ptr<readwrite_context> ai::holder::readwrite_context_
private

Definition at line 81 of file manager.hpp.

Referenced by init(), and to_config().

◆ side_

side_number ai::holder::side_
private

Definition at line 83 of file manager.hpp.

Referenced by describe_ai(), get_ai_ref(), get_component(), micro_ai(), and modify_ai().

◆ side_context_

std::unique_ptr<side_context> ai::holder::side_context_
private

Definition at line 79 of file manager.hpp.

Referenced by append_ai(), init(), and to_config().


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