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

#include <contexts.hpp>

Inheritance diagram for ai::side_context_impl:

Public Member Functions

 side_context_impl (side_number side, const config &)
 
virtual ~side_context_impl ()
 
virtual side_number get_side () const override
 Get the side number. More...
 
virtual void set_side (side_number side) override
 Set the side number. More...
 
virtual side_contextget_side_context () override
 unwrap More...
 
virtual int get_recursion_count () const override
 Get the value of the recursion counter. More...
 
virtual config to_side_context_config () const override
 serialize this context to config More...
 
- Public Member Functions inherited from ai::side_context
virtual ~side_context ()
 empty destructor More...
 
 side_context ()
 empty constructor More...
 

Private Attributes

side_number side_
 
recursion_counter recursion_counter_
 

Detailed Description

Definition at line 953 of file contexts.hpp.

Constructor & Destructor Documentation

◆ side_context_impl()

ai::side_context_impl::side_context_impl ( side_number  side,
const config  
)
inline

Definition at line 955 of file contexts.hpp.

◆ ~side_context_impl()

virtual ai::side_context_impl::~side_context_impl ( )
inlinevirtual

Definition at line 960 of file contexts.hpp.

Member Function Documentation

◆ get_recursion_count()

int ai::side_context_impl::get_recursion_count ( ) const
overridevirtual

Get the value of the recursion counter.

Implements ai::side_context.

Definition at line 73 of file contexts.cpp.

References ai::recursion_counter::get_count(), and recursion_counter_.

◆ get_side()

virtual side_number ai::side_context_impl::get_side ( ) const
inlineoverridevirtual

Get the side number.

Implements ai::side_context.

Definition at line 962 of file contexts.hpp.

References side_.

◆ get_side_context()

virtual side_context& ai::side_context_impl::get_side_context ( )
inlineoverridevirtual

unwrap

Implements ai::side_context.

Definition at line 972 of file contexts.hpp.

◆ set_side()

virtual void ai::side_context_impl::set_side ( side_number  side)
inlineoverridevirtual

Set the side number.

Implements ai::side_context.

Definition at line 967 of file contexts.hpp.

References side_.

◆ to_side_context_config()

config ai::side_context_impl::to_side_context_config ( ) const
overridevirtual

serialize this context to config

Implements ai::side_context.

Definition at line 260 of file contexts.cpp.

Member Data Documentation

◆ recursion_counter_

recursion_counter ai::side_context_impl::recursion_counter_
private

Definition at line 983 of file contexts.hpp.

Referenced by get_recursion_count().

◆ side_

side_number ai::side_context_impl::side_
private

Definition at line 982 of file contexts.hpp.

Referenced by get_side(), and set_side().


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