The Battle for Wesnoth  1.15.2+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)
inline

Definition at line 58 of file contexts.hpp.

Member Function Documentation

◆ get_count()

int ai::recursion_counter::get_count ( ) const
inline

◆ is_ok()

bool ai::recursion_counter::is_ok ( ) const
inline

Check if more recursion is allowed.

Definition at line 83 of file contexts.hpp.

Member Data Documentation

◆ counter_

int ai::recursion_counter::counter_
private

Definition at line 90 of file contexts.hpp.

◆ MAX_COUNTER_VALUE

const int ai::recursion_counter::MAX_COUNTER_VALUE = 100
static

Definition at line 77 of file contexts.hpp.


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