#include <save_index.hpp>
Public Member Functions | |
void | rebuild (const std::string &name) |
void | rebuild (const std::string &name, const time_t &modified) |
void | remove (const std::string &name) |
void | set_modified (const std::string &name, const time_t &modified) |
config & | get (const std::string &name) |
void | write_save_index () |
save_index_class () | |
Private Member Functions | |
config & | data (const std::string &name) |
config & | data () |
Private Attributes | |
bool | loaded_ |
config | data_ |
std::map< std::string, time_t > | modified_ |
Definition at line 77 of file save_index.hpp.
savegame::save_index_class::save_index_class | ( | ) |
Definition at line 108 of file save_index.cpp.
|
private |
Definition at line 115 of file save_index.cpp.
References config::add_child(), data(), and config::find_child().
|
private |
Definition at line 125 of file save_index.cpp.
References config::clear(), data_, e, ERR_SAVE, filesystem::get_save_index_file(), filesystem::istream_file(), loaded_, game::error::message, read(), read_gz(), and game::error::what().
Referenced by data(), get(), rebuild(), remove(), and write_save_index().
config & savegame::save_index_class::get | ( | const std::string & | name | ) |
Definition at line 83 of file save_index.cpp.
References data(), config::attribute_value::empty(), modified_, rebuild(), and config::attribute_value::to_int().
Referenced by savegame::loadgame::load_game(), and savegame::save_info::summary().
void savegame::save_index_class::rebuild | ( | const std::string & | name | ) |
Definition at line 51 of file save_index.cpp.
References filesystem::file_modified_time(), filesystem::get_saves_dir(), and replace_space2underbar().
Referenced by get().
void savegame::save_index_class::rebuild | ( | const std::string & | name, |
const time_t & | modified | ||
) |
Definition at line 58 of file save_index.cpp.
References data(), savegame::extract_summary_from_config(), log_scope, savegame::read_save_file(), and write_save_index().
void savegame::save_index_class::remove | ( | const std::string & | name | ) |
Definition at line 73 of file save_index.cpp.
References data(), config::remove_attribute(), and write_save_index().
Referenced by savegame::delete_game(), and savegame::savegame::finish_save_game().
void savegame::save_index_class::set_modified | ( | const std::string & | name, |
const time_t & | modified | ||
) |
Definition at line 79 of file save_index.cpp.
References modified_.
Referenced by savegame::create_save_info::operator()().
void savegame::save_index_class::write_save_index | ( | ) |
Definition at line 93 of file save_index.cpp.
References data(), e, ERR_SAVE, filesystem::get_save_index_file(), log_scope, compression::NONE, filesystem::ostream_file(), preferences::save_compression_format(), game::error::what(), write(), and write_gz().
|
private |
Definition at line 95 of file save_index.hpp.
Referenced by data().
|
private |
Definition at line 94 of file save_index.hpp.
Referenced by data().
|
private |
Definition at line 96 of file save_index.hpp.
Referenced by get(), and set_modified().