This class represents the info a client has about a game on the server. More...
#include <data.hpp>
Public Types | |
enum | game_display_status { CLEAN, NEW, UPDATED, DELETED } |
Public Member Functions | |
game_info (const config &c, const config &game_config) | |
bool | can_join () const |
bool | can_observe () const |
const char * | display_status_string () const |
Public Attributes | |
surface | mini_map |
int | id |
std::string | map_data |
std::string | name |
std::string | scenario |
bool | remote_scenario |
std::string | map_info |
std::string | map_size_info |
std::string | era |
std::string | era_short |
std::string | gold |
std::string | support |
std::string | xp |
std::string | vision |
std::string | status |
std::string | time_limit |
size_t | vacant_slots |
unsigned int | current_turn |
bool | reloaded |
bool | started |
bool | fog |
bool | shroud |
bool | observers |
bool | shuffle_sides |
bool | use_map_settings |
bool | verified |
bool | password_required |
bool | have_era |
bool | have_all_mods |
bool | has_friends |
bool | has_ignored |
game_display_status | display_status |
This class represents the info a client has about a game on the server.
Definition at line 164 of file data.cpp.
References _(), _n(), config::child(), config::child_or_empty(), config::child_range(), current_turn, twml_exception::dev_message, e, config::empty(), era, era_short, ERR_CF, config::find_child(), fog, gamemap::h(), have_all_mods, have_era, i, lexical_cast(), map_data, map_info, map_size_info, game::error::message, filesystem::read_map(), reloaded, remote_scenario, scenario, shroud, started, status, time_limit, utils::unicode_multiplication_sign, vacant_slots, verified, vgettext(), vision, and gamemap::w().
bool game_info::can_join | ( | ) | const |
Definition at line 358 of file data.cpp.
References have_all_mods, have_era, started, and vacant_slots.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), gui2::tlobby_main::do_game_join(), gui2::tlobby_main::join_or_observe(), and gui2::tlobby_main::update_selected_game().
bool game_info::can_observe | ( | ) | const |
Definition at line 363 of file data.cpp.
References have_all_mods, have_era, preferences::is_authenticated(), and observers.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), gui2::tlobby_main::do_game_join(), and gui2::tlobby_main::update_selected_game().
const char * game_info::display_status_string | ( | ) | const |
unsigned int game_info::current_turn |
Definition at line 162 of file data.hpp.
Referenced by game_info().
game_display_status game_info::display_status |
Definition at line 184 of file data.hpp.
Referenced by display_status_string(), lobby_info::process_gamelist_diff(), and gui2::tlobby_main::update_gamelist_diff().
std::string game_info::era |
Definition at line 151 of file data.hpp.
Referenced by game_info(), and gui2::tlobby_main::make_game_row_data().
std::string game_info::era_short |
Definition at line 152 of file data.hpp.
Referenced by game_info(), and gui2::tlobby_main::make_game_row_data().
bool game_info::fog |
Definition at line 165 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), game_info(), and gui2::tlobby_main::make_game_row_data().
std::string game_info::gold |
Definition at line 154 of file data.hpp.
Referenced by gui2::tlobby_main::make_game_row_data().
bool game_info::has_friends |
Definition at line 175 of file data.hpp.
Referenced by lobby_info::process_userlist().
bool game_info::has_ignored |
Definition at line 176 of file data.hpp.
Referenced by lobby_info::process_userlist().
bool game_info::have_all_mods |
Definition at line 173 of file data.hpp.
Referenced by can_join(), can_observe(), and game_info().
bool game_info::have_era |
Definition at line 172 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), can_join(), can_observe(), game_info(), and gui2::tlobby_main::make_game_row_data().
int game_info::id |
Definition at line 144 of file data.hpp.
Referenced by gui2::tlobby_main::do_game_join(), lobby_info::process_gamelist(), gui2::tlobby_main::update_gamelist(), gui2::tlobby_main::update_gamelist_diff(), and gui2::tlobby_main::update_selected_game().
std::string game_info::map_data |
Definition at line 145 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), and game_info().
std::string game_info::map_info |
Definition at line 149 of file data.hpp.
Referenced by game_info(), gui2::tlobby_main::make_game_row_data(), and game_filter_general_string_part::match().
std::string game_info::map_size_info |
Definition at line 150 of file data.hpp.
Referenced by game_info(), and gui2::tlobby_main::make_game_row_data().
std::string game_info::name |
Definition at line 146 of file data.hpp.
Referenced by gui2::tlobby_main::make_game_row_data(), game_filter_general_string_part::match(), and gui2::tlobby_player_info::pre_show().
bool game_info::observers |
Definition at line 167 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), can_observe(), and gui2::tlobby_main::make_game_row_data().
bool game_info::password_required |
Definition at line 171 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), and gui2::tlobby_main::do_game_join().
bool game_info::reloaded |
Definition at line 163 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), game_info(), and gui2::tlobby_main::make_game_row_data().
bool game_info::remote_scenario |
Definition at line 148 of file data.hpp.
Referenced by game_info().
std::string game_info::scenario |
Definition at line 147 of file data.hpp.
Referenced by game_info(), and gui2::tlobby_main::make_game_row_data().
bool game_info::shroud |
Definition at line 166 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), game_info(), and gui2::tlobby_main::make_game_row_data().
bool game_info::shuffle_sides |
Definition at line 168 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents().
bool game_info::started |
Definition at line 164 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), can_join(), gui2::tlobby_main::do_game_join(), game_info(), and gui2::tlobby_main::make_game_row_data().
std::string game_info::status |
Definition at line 158 of file data.hpp.
Referenced by game_info(), and gui2::tlobby_main::make_game_row_data().
std::string game_info::support |
std::string game_info::time_limit |
Definition at line 159 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents(), game_info(), and gui2::tlobby_main::make_game_row_data().
bool game_info::use_map_settings |
Definition at line 169 of file data.hpp.
Referenced by gui2::tlobby_main::adjust_game_row_contents().
size_t game_info::vacant_slots |
Definition at line 160 of file data.hpp.
Referenced by can_join(), gui2::tlobby_main::game_filter_reload(), game_info(), and gui2::tlobby_main::make_game_row_data().
bool game_info::verified |
Definition at line 170 of file data.hpp.
Referenced by game_info().
std::string game_info::vision |
Definition at line 157 of file data.hpp.
Referenced by game_info(), and gui2::tlobby_main::make_game_row_data().
std::string game_info::xp |
Definition at line 156 of file data.hpp.
Referenced by gui2::tlobby_main::make_game_row_data().