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

#include <contexts.hpp>

Public Member Functions

 recursion_counter (int counter)
int get_count () const
 Get the current value of the recursion counter. More...
bool is_ok () const
 Check if more recursion is allowed. More...

Static Public Attributes

static const int MAX_COUNTER_VALUE = 100

Private Attributes

int counter_

Detailed Description

Definition at line 56 of file contexts.hpp.

Constructor & Destructor Documentation

◆ recursion_counter()

ai::recursion_counter::recursion_counter ( int  counter)

Definition at line 58 of file contexts.hpp.

Member Function Documentation

◆ get_count()

int ai::recursion_counter::get_count ( ) const

◆ is_ok()

bool ai::recursion_counter::is_ok ( ) const

Check if more recursion is allowed.

Definition at line 80 of file contexts.hpp.

Member Data Documentation

◆ counter_

int ai::recursion_counter::counter_

Definition at line 87 of file contexts.hpp.


const int ai::recursion_counter::MAX_COUNTER_VALUE = 100

Definition at line 75 of file contexts.hpp.

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