The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 65 of file contexts.hpp.

Constructor & Destructor Documentation

ai::recursion_counter::recursion_counter ( int  counter)
inline

Definition at line 67 of file contexts.hpp.

References MAX_COUNTER_VALUE.

Member Function Documentation

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

Check if more recursion is allowed.

Definition at line 92 of file contexts.hpp.

References counter_, and MAX_COUNTER_VALUE.

Member Data Documentation

int ai::recursion_counter::counter_
private

Definition at line 99 of file contexts.hpp.

Referenced by get_count(), and is_ok().

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

Definition at line 86 of file contexts.hpp.

Referenced by ai::formula_ai::execute_variant(), is_ok(), and recursion_counter().


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