Public Member Functions | Private Attributes

ai::gamestate_observer Class Reference

#include <gamestate_observer.hpp>

Inheritance diagram for ai::gamestate_observer:
Inheritance graph
[legend]
Collaboration diagram for ai::gamestate_observer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 gamestate_observer ()
virtual ~gamestate_observer ()
void handle_generic_event (const std::string &event_name)
bool is_gamestate_changed ()
 Check if the gamestate has changed since last reset reset is done once on construction, and can be done by hand via reset() method.
void reset ()
 Reset the counter of gamestate changes.

Private Attributes

int gamestate_change_counter_

Detailed Description

Definition at line 28 of file gamestate_observer.hpp.


Constructor & Destructor Documentation

ai::gamestate_observer::gamestate_observer (  ) 

Definition at line 28 of file gamestate_observer.cpp.

References ai::manager::add_gamestate_observer().

Here is the call graph for this function:

ai::gamestate_observer::~gamestate_observer (  )  [virtual]

Definition at line 35 of file gamestate_observer.cpp.

References ai::manager::remove_gamestate_observer().

Here is the call graph for this function:


Member Function Documentation

void ai::gamestate_observer::handle_generic_event ( const std::string &  event_name  )  [virtual]

Implements events::observer.

Definition at line 41 of file gamestate_observer.cpp.

References gamestate_change_counter_.

bool ai::gamestate_observer::is_gamestate_changed (  ) 

Check if the gamestate has changed since last reset reset is done once on construction, and can be done by hand via reset() method.

Returns:
has gamestate changed since last reset?

Definition at line 47 of file gamestate_observer.cpp.

References gamestate_change_counter_.

Referenced by ai::testing_ai_default::candidate_action_evaluation_loop::do_play_stage().

Here is the caller graph for this function:

void ai::gamestate_observer::reset (  ) 

Reset the counter of gamestate changes.

Definition at line 53 of file gamestate_observer.cpp.

References gamestate_change_counter_.


Member Data Documentation

Definition at line 55 of file gamestate_observer.hpp.

Referenced by handle_generic_event(), is_gamestate_changed(), and reset().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:00 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs