Class for autosaves. More...
#include <savegame.hpp>

Public Member Functions | |
| autosave_savegame (saved_game &gamestate, game_display &gui, const compression::format compress_saves) | |
| void | autosave (const bool disable_autosave, const int autosave_max, const int infinite_autosaves) |
Public Member Functions inherited from savegame::ingame_savegame | |
| ingame_savegame (saved_game &gamestate, game_display &gui, const compression::format compress_saves) | |
Public Member Functions inherited from savegame::savegame | |
| virtual | ~savegame () |
| bool | save_game_automatic (CVideo &video, bool ask_for_overwrite=false, const std::string &filename="") |
| Saves a game without user interaction, unless the file exists and it should be asked to overwrite it. More... | |
| bool | save_game_interactive (CVideo &video, const std::string &message, gui::DIALOG_TYPE dialog_type) |
| Save a game interactively through the savegame dialog. More... | |
| const std::string & | filename () const |
Private Member Functions | |
| virtual void | create_filename () |
| Create a filename for automatic saves. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from savegame::savegame | |
| savegame (saved_game &gamestate, const compression::format compress_saves, const std::string &title="Save") | |
| The only constructor of savegame. More... | |
| bool | save_game (CVideo *video=nullptr, const std::string &filename="") |
| Save a game without any further user interaction. More... | |
| void | set_filename (std::string filename) |
| Sets the filename and removes invalid characters. More... | |
| bool | check_filename (const std::string &filename, CVideo &video) |
| Check, if the filename contains illegal constructs like ".gz". More... | |
| void | set_error_message (const std::string &error_message) |
| Customize the standard error message. More... | |
| const std::string & | title () |
| const saved_game & | gamestate () |
| void | before_save () |
| If there needs to be some data fiddling before saving the game, this is the place to go. More... | |
Protected Attributes inherited from savegame::ingame_savegame | |
| game_display & | gui_ |
Class for autosaves.
Definition at line 219 of file savegame.hpp.
| savegame::autosave_savegame::autosave_savegame | ( | saved_game & | gamestate, |
| game_display & | gui, | ||
| const compression::format | compress_saves | ||
| ) |
Definition at line 579 of file savegame.cpp.
References _(), and savegame::savegame::set_error_message().
| void savegame::autosave_savegame::autosave | ( | const bool | disable_autosave, |
| const int | autosave_max, | ||
| const int | infinite_autosaves | ||
| ) |
Definition at line 586 of file savegame.cpp.
References savegame::ingame_savegame::gui_, savegame::remove_old_auto_saves(), savegame::savegame::save_game_automatic(), and display::video().
Referenced by playsingle_controller::before_human_turn(), and play_controller::do_autosave().
|
privatevirtual |
Create a filename for automatic saves.
Reimplemented from savegame::ingame_savegame.
Definition at line 596 of file savegame.cpp.
References _(), resources::classification, saved_game::classification(), savegame::savegame::filename(), savegame::savegame::gamestate(), saved_game::get_starting_pos(), game_classification::label, and savegame::savegame::set_filename().
1.8.8