The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
replay_controller Class Reference

#include <replay_controller.hpp>

Inheritance diagram for replay_controller:
Inheritance graph

Classes

class  replay_stop_condition
 

Public Member Functions

 replay_controller (play_controller &controller, bool control_view, const boost::shared_ptr< config > &reset_state, const std::function< void()> &on_end_replay=nop)
 
 ~replay_controller ()
 
void play_replay ()
 
void stop_replay ()
 
void replay_next_turn ()
 
void replay_next_side ()
 
void replay_next_move ()
 
REPLAY_RETURN play_side_impl ()
 
bool recorder_at_end () const
 
bool should_stop () const
 
bool can_execute_command (const hotkey::hotkey_command &cmd, int index) const
 
bool is_controlling_view () const
 
bool allow_reset_replay () const
 
const boost::shared_ptr< config > & get_reset_state ()
 
void return_to_play_side (bool r=true)
 
void replay_show_everything ()
 
void replay_show_each ()
 
void replay_show_team1 ()
 
void update_teams ()
 
void update_viewing_player ()
 
- Public Member Functions inherited from events::observer
virtual ~observer ()
 

Static Public Member Functions

static void nop ()
 

Private Types

enum  REPLAY_VISION { HUMAN_TEAM, CURRENT_TEAM, SHOW_ALL }
 

Private Member Functions

void add_replay_theme ()
 
void init ()
 
void update_gui ()
 
void rebuild_replay_theme ()
 
void handle_generic_event (const std::string &name) override
 
void reset_replay_ui ()
 
void update_replay_ui ()
 
void replay_ui_playback_should_start ()
 
void replay_ui_playback_should_stop ()
 
std::shared_ptr< gui::buttonplay_button ()
 
std::shared_ptr< gui::buttonstop_button ()
 
std::shared_ptr< gui::buttonreset_button ()
 
std::shared_ptr< gui::buttonplay_turn_button ()
 
std::shared_ptr< gui::buttonplay_side_button ()
 
std::shared_ptr< gui::buttonplay_move_button ()
 
bool replay_ui_has_all_buttons ()
 

Private Attributes

play_controllercontroller_
 
boost::scoped_ptr
< replay_stop_condition
stop_condition_
 
events::command_disabler disabler_
 
boost::optional< REPLAY_VISIONvision_
 
boost::shared_ptr< configreset_state_
 
std::function< void()> on_end_replay_
 
bool return_to_play_side_
 

Detailed Description

Definition at line 25 of file replay_controller.hpp.

Member Enumeration Documentation

Enumerator
HUMAN_TEAM 
CURRENT_TEAM 
SHOW_ALL 

Definition at line 88 of file replay_controller.hpp.

Constructor & Destructor Documentation

replay_controller::replay_controller ( play_controller controller,
bool  control_view,
const boost::shared_ptr< config > &  reset_state,
const std::function< void()> &  on_end_replay = nop 
)
replay_controller::~replay_controller ( )

Member Function Documentation

void replay_controller::add_replay_theme ( )
private
bool replay_controller::allow_reset_replay ( ) const
inline

Definition at line 52 of file replay_controller.hpp.

References reset_state_.

Referenced by can_execute_command().

bool replay_controller::can_execute_command ( const hotkey::hotkey_command cmd,
int  index 
) const
const boost::shared_ptr<config>& replay_controller::get_reset_state ( )
inline

Definition at line 53 of file replay_controller.hpp.

References reset_state_.

void replay_controller::handle_generic_event ( const std::string name)
overrideprivatevirtual
void replay_controller::init ( )
private
bool replay_controller::is_controlling_view ( ) const
inline

Definition at line 51 of file replay_controller.hpp.

References vision_.

Referenced by can_execute_command().

static void replay_controller::nop ( )
inlinestatic

Definition at line 36 of file replay_controller.hpp.

std::shared_ptr< gui::button > replay_controller::play_button ( )
private
std::shared_ptr< gui::button > replay_controller::play_move_button ( )
private
void replay_controller::play_replay ( )
std::shared_ptr< gui::button > replay_controller::play_side_button ( )
private
REPLAY_RETURN replay_controller::play_side_impl ( )
std::shared_ptr< gui::button > replay_controller::play_turn_button ( )
private
void replay_controller::rebuild_replay_theme ( )
private
bool replay_controller::recorder_at_end ( ) const

Definition at line 291 of file replay_controller.cpp.

References replay::at_end(), and resources::recorder.

Referenced by can_execute_command().

void replay_controller::replay_next_move ( )
void replay_controller::replay_next_side ( )
void replay_controller::replay_next_turn ( )
void replay_controller::replay_show_each ( )
void replay_controller::replay_show_everything ( )
void replay_controller::replay_show_team1 ( )
bool replay_controller::replay_ui_has_all_buttons ( )
inlineprivate
void replay_controller::replay_ui_playback_should_start ( )
private
void replay_controller::replay_ui_playback_should_stop ( )
private
std::shared_ptr< gui::button > replay_controller::reset_button ( )
private
void replay_controller::reset_replay_ui ( )
private
void replay_controller::return_to_play_side ( bool  r = true)
inline

Definition at line 54 of file replay_controller.hpp.

References return_to_play_side_.

bool replay_controller::should_stop ( ) const
inline

Definition at line 49 of file replay_controller.hpp.

References stop_condition_.

Referenced by can_execute_command().

std::shared_ptr< gui::button > replay_controller::stop_button ( )
private
void replay_controller::stop_replay ( )
void replay_controller::update_gui ( )
private
void replay_controller::update_replay_ui ( )
private
void replay_controller::update_teams ( )
void replay_controller::update_viewing_player ( )

Member Data Documentation

play_controller& replay_controller::controller_
private
events::command_disabler replay_controller::disabler_
private

Definition at line 86 of file replay_controller.hpp.

std::function<void()> replay_controller::on_end_replay_
private

Definition at line 96 of file replay_controller.hpp.

Referenced by play_side_impl().

boost::shared_ptr<config> replay_controller::reset_state_
private

Definition at line 95 of file replay_controller.hpp.

Referenced by allow_reset_replay(), and get_reset_state().

bool replay_controller::return_to_play_side_
private

Definition at line 97 of file replay_controller.hpp.

Referenced by play_side_impl(), and return_to_play_side().

boost::scoped_ptr<replay_stop_condition> replay_controller::stop_condition_
private
boost::optional<REPLAY_VISION> replay_controller::vision_
private

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