The Battle for Wesnoth  1.13.4+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 modify_side_ai_config (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_
 
side_contextside_context_
 
readonly_contextreadonly_context_
 
readwrite_contextreadwrite_context_
 
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.

Todo:
1.9 move it out of public view

Definition at line 55 of file manager.hpp.

Constructor & Destructor Documentation

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

Definition at line 79 of file manager.cpp.

References DBG_AI_MANAGER, and describe_ai().

ai::holder::~holder ( )
virtual

Member Function Documentation

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

Definition at line 241 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 297 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 253 of file manager.cpp.

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

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

ai_composite & ai::holder::get_ai_ref ( )

Definition at line 143 of file manager.cpp.

References ai_, init(), and side_.

Referenced by ai::manager::get_active_ai_for_side(), get_ai_overview(), get_ai_structure(), and modify_ai().

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

Definition at line 302 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)
void ai::holder::modify_side_ai_config ( 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 91 of file manager.hpp.

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

default_ai_context* ai::holder::default_ai_context_
private

Definition at line 89 of file manager.hpp.

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

readonly_context* ai::holder::readonly_context_
private

Definition at line 87 of file manager.hpp.

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

readwrite_context* ai::holder::readwrite_context_
private

Definition at line 88 of file manager.hpp.

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

side_number ai::holder::side_
private

Definition at line 90 of file manager.hpp.

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

side_context* ai::holder::side_context_
private

Definition at line 86 of file manager.hpp.

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


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