#include <replay_recorder_base.hpp>
Public Member Functions | |
replay_recorder_base () | |
~replay_recorder_base () | |
void | swap (replay_recorder_base &other) |
void | swap (replay_recorder_base &&other) |
int | get_pos () const |
int | size () const |
config & | get_command_at (int pos) |
config & | add_child () |
config & | get_upload_log () |
void | remove_command (int index) |
config & | insert_command (int index) |
void | set_to_end () |
void | set_pos (int pos) |
void | append_config (const config &data) |
void | append_config (config &data) |
Clears the passed config. More... | |
void | write (config_writer &out) const |
void | write (config &out) const |
void | delete_upcoming_commands () |
bool | is_ancestor (const config &other_replay) const |
checks whether the parameter is an earlier state in the same "savegame gamestate branch" More... | |
Protected Attributes | |
config | upload_log_ |
boost::ptr_vector< config > | commands_ |
int | pos_ |
Definition at line 21 of file replay_recorder_base.hpp.
replay_recorder_base::replay_recorder_base | ( | void | ) |
Definition at line 18 of file replay_recorder_base.cpp.
replay_recorder_base::~replay_recorder_base | ( | void | ) |
Definition at line 27 of file replay_recorder_base.cpp.
config & replay_recorder_base::add_child | ( | ) |
Definition at line 55 of file replay_recorder_base.cpp.
References commands_, pos_, and size().
Referenced by replay::add_command(), and replay::redo().
void replay_recorder_base::append_config | ( | config & | data | ) |
Clears the passed config.
Definition at line 109 of file replay_recorder_base.cpp.
References commands_, data, config::swap(), and upload_log_.
void replay_recorder_base::append_config | ( | const config & | data | ) |
Definition at line 97 of file replay_recorder_base.cpp.
References commands_, data, and upload_log_.
Referenced by saved_game::set_data().
void replay_recorder_base::delete_upcoming_commands | ( | ) |
Definition at line 142 of file replay_recorder_base.cpp.
References commands_, and pos_.
Referenced by replay::delete_upcoming_commands().
config & replay_recorder_base::get_command_at | ( | int | pos | ) |
Definition at line 49 of file replay_recorder_base.cpp.
References commands_, and size().
Referenced by replay::add_chat_message_location(), replay::add_start_if_not_there_yet(), and replay::command().
int replay_recorder_base::get_pos | ( | ) | const |
Definition at line 39 of file replay_recorder_base.cpp.
References pos_.
Referenced by replay::add_chat_message_location(), replay::add_nonundoable_command(), replay::add_start_if_not_there_yet(), replay::at_end(), replay::get_last_real_command(), replay::get_next_action(), replay::peek_next_action(), replay::redo(), replay::revert_action(), and play_controller::to_config().
config & replay_recorder_base::get_upload_log | ( | ) |
Definition at line 71 of file replay_recorder_base.cpp.
References upload_log_.
Referenced by replay::add_log_data().
config & replay_recorder_base::insert_command | ( | int | index | ) |
Definition at line 86 of file replay_recorder_base.cpp.
References commands_, utf8::index(), pos_, and size().
Referenced by replay::add_config(), replay::add_nonundoable_command(), and replay::add_start_if_not_there_yet().
bool replay_recorder_base::is_ancestor | ( | const config & | other_replay | ) | const |
checks whether the parameter is an earlier state in the same "savegame gamestate branch"
Definition at line 147 of file replay_recorder_base.cpp.
References config::child_range(), commands_, and utf8::index().
void replay_recorder_base::remove_command | ( | int | index | ) |
Definition at line 76 of file replay_recorder_base.cpp.
References commands_, utf8::index(), pos_, and size().
Referenced by replay::remove_command().
void replay_recorder_base::set_pos | ( | int | pos | ) |
Definition at line 62 of file replay_recorder_base.cpp.
Referenced by replay::add_nonundoable_command(), replay::get_next_action(), campaign_controller::play_game(), replay::redo(), play_controller::reset_gamestate(), replay::revert_action(), and replay::start_replay().
void replay_recorder_base::set_to_end | ( | ) |
Definition at line 67 of file replay_recorder_base.cpp.
Referenced by campaign_controller::play_game(), replay::redo(), saved_game::set_data(), and replay::set_to_end().
int replay_recorder_base::size | ( | ) | const |
Definition at line 44 of file replay_recorder_base.cpp.
References commands_.
Referenced by add_child(), replay::add_config(), replay::add_nonundoable_command(), get_command_at(), insert_command(), replay::ncommands(), remove_command(), set_pos(), set_to_end(), and replay::speak().
|
inline |
void replay_recorder_base::swap | ( | replay_recorder_base & | other | ) |
Definition at line 32 of file replay_recorder_base.cpp.
References commands_, pos_, config::swap(), swap(), and upload_log_.
Referenced by saved_game::clear(), swap(), and saved_game::swap().
void replay_recorder_base::write | ( | config & | out | ) | const |
Definition at line 134 of file replay_recorder_base.cpp.
References config::add_child(), commands_, i, pos_, and upload_log_.
void replay_recorder_base::write | ( | config_writer & | out | ) | const |
Definition at line 125 of file replay_recorder_base.cpp.
References commands_, i, pos_, upload_log_, and config_writer::write_child().
Referenced by saved_game::to_config(), saved_game::write_config(), savegame::ingame_savegame::write_game(), and savegame::replay_savegame::write_game().
|
protected |
Definition at line 62 of file replay_recorder_base.hpp.
Referenced by add_child(), append_config(), delete_upcoming_commands(), get_command_at(), insert_command(), is_ancestor(), remove_command(), size(), swap(), and write().
|
protected |
Definition at line 63 of file replay_recorder_base.hpp.
Referenced by add_child(), delete_upcoming_commands(), get_pos(), insert_command(), remove_command(), set_pos(), set_to_end(), swap(), and write().
|
protected |
Definition at line 61 of file replay_recorder_base.hpp.
Referenced by append_config(), get_upload_log(), swap(), and write().