The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 ()
 
const std::string describe_ai ()
 
config to_config () const
 
void modify_ai (const config &cfg)
 
void append_ai (const config &cfg)
 
const std::string get_ai_overview ()
 
const std::string get_ai_structure ()
 
const 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_context
readwrite_context_
 
std::unique_ptr
< default_ai_context
default_ai_context_
 
side_number side_
 
config cfg_
 

Detailed Description

Base class that holds the AI and current AI parameters.

It is an implementation detail.

Todo:
1.9 move it out of public view

Definition at line 52 of file manager.hpp.

Constructor & Destructor Documentation

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

Definition at line 75 of file manager.cpp.

References DBG_AI_MANAGER, and describe_ai().

ai::holder::~holder ( )
virtual

Definition at line 125 of file manager.cpp.

References ai_, describe_ai(), and LOG_AI_MANAGER.

Member Function Documentation

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

Definition at line 175 of file manager.cpp.

References ai_, config::child_range(), facet(), and get_ai_ref().

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

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

Definition at line 221 of file manager.cpp.

References ai_, cfg_, and side_.

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

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

Definition at line 277 of file manager.cpp.

References cfg_.

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

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

Definition at line 233 of file manager.cpp.

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

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

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

Definition at line 282 of file manager.cpp.

References ai_, game_config::debug, ai::component_manager::get_component(), init(), and side_.

Referenced by intf_debug_ai().

void ai::holder::init ( side_number  side)
private
void ai::holder::modify_ai ( const config cfg)
config ai::holder::to_config ( ) const

Member Data Documentation

composite_ai_ptr ai::holder::ai_
private
config ai::holder::cfg_
private

Definition at line 90 of file manager.hpp.

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

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

Definition at line 88 of file manager.hpp.

Referenced by init(), and to_config().

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

Definition at line 86 of file manager.hpp.

Referenced by init(), and to_config().

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

Definition at line 87 of file manager.hpp.

Referenced by init(), and to_config().

side_number ai::holder::side_
private

Definition at line 89 of file manager.hpp.

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

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

Definition at line 85 of file manager.hpp.

Referenced by init(), and to_config().


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