The Battle for Wesnoth  1.15.1+dev
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
mp::game_info Struct Reference

This class represents the info a client has about a game on the server. More...

#include <lobby_data.hpp>

Classes

struct  required_addon
 

Public Types

enum  game_display_status { CLEAN, NEW, UPDATED, DELETED }
 
enum  ADDON_REQ { SATISFIED, NEED_DOWNLOAD, CANNOT_SATISFY }
 

Public Member Functions

 game_info (const config &c, const std::vector< std::string > &installed_addons)
 
bool can_join () const
 
bool can_observe () const
 
ADDON_REQ check_addon_version_compatibility (const config &local_item, const config &game)
 
const char * display_status_string () const
 
bool match_string_filter (const std::string &filter) const
 

Public Attributes

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::vector< std::pair< std::string, bool > > mod_info
 List of modification names and whether they're installed or not. More...
 
std::string gold
 
std::string support
 
std::string xp
 
std::string vision
 
std::string status
 
std::string time_limit
 
std::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 registered_users_only
 
bool verified
 
bool password_required
 
bool have_era
 
bool have_all_mods
 
bool has_friends
 
bool has_ignored
 
game_display_status display_status
 
std::vector< required_addonrequired_addons
 
ADDON_REQ addons_outcome
 

Detailed Description

This class represents the info a client has about a game on the server.

Definition at line 138 of file lobby_data.hpp.

Member Enumeration Documentation

◆ ADDON_REQ

Enumerator
SATISFIED 
NEED_DOWNLOAD 
CANNOT_SATISFY 

Definition at line 191 of file lobby_data.hpp.

◆ game_display_status

Enumerator
CLEAN 
NEW 
UPDATED 
DELETED 

Definition at line 183 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ game_info()

mp::game_info::game_info ( const config c,
const std::vector< std::string > &  installed_addons 
)

Member Function Documentation

◆ can_join()

bool mp::game_info::can_join ( ) const

◆ can_observe()

bool mp::game_info::can_observe ( ) const

◆ check_addon_version_compatibility()

game_info::ADDON_REQ mp::game_info::check_addon_version_compatibility ( const config local_item,
const config game 
)

◆ display_status_string()

const char * mp::game_info::display_status_string ( ) const

Definition at line 563 of file lobby_data.cpp.

References CLEAN, DELETED, display_status, ERR_CF, NEW, and UPDATED.

Referenced by mp::do_notify().

◆ match_string_filter()

bool mp::game_info::match_string_filter ( const std::string &  filter) const

Definition at line 580 of file lobby_data.cpp.

References chars_equal_insensitive(), map_info, and name.

Referenced by gui2::dialogs::mp_lobby::game_filter_reload().

Member Data Documentation

◆ addons_outcome

ADDON_REQ mp::game_info::addons_outcome

Definition at line 200 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::enter_game(), and game_info().

◆ current_turn

unsigned int mp::game_info::current_turn

Definition at line 166 of file lobby_data.hpp.

Referenced by game_info().

◆ display_status

game_display_status mp::game_info::display_status

◆ era

std::string mp::game_info::era

◆ era_short

std::string mp::game_info::era_short

Definition at line 153 of file lobby_data.hpp.

Referenced by game_info().

◆ fog

bool mp::game_info::fog

Definition at line 169 of file lobby_data.hpp.

Referenced by game_info().

◆ gold

std::string mp::game_info::gold

Definition at line 158 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().

◆ has_friends

bool mp::game_info::has_friends

◆ has_ignored

bool mp::game_info::has_ignored

◆ have_all_mods

bool mp::game_info::have_all_mods

Definition at line 178 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ have_era

bool mp::game_info::have_era

Definition at line 177 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ id

int mp::game_info::id

◆ map_data

std::string mp::game_info::map_data

Definition at line 146 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ map_info

std::string mp::game_info::map_info

Definition at line 150 of file lobby_data.hpp.

Referenced by game_info(), and match_string_filter().

◆ map_size_info

std::string mp::game_info::map_size_info

Definition at line 151 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ mod_info

std::vector<std::pair<std::string, bool> > mp::game_info::mod_info

List of modification names and whether they're installed or not.

Definition at line 156 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ name

std::string mp::game_info::name

◆ observers

bool mp::game_info::observers

◆ password_required

bool mp::game_info::password_required

◆ registered_users_only

bool mp::game_info::registered_users_only

Definition at line 174 of file lobby_data.hpp.

◆ reloaded

bool mp::game_info::reloaded

◆ remote_scenario

bool mp::game_info::remote_scenario

Definition at line 149 of file lobby_data.hpp.

Referenced by game_info().

◆ required_addons

std::vector<required_addon> mp::game_info::required_addons

◆ scenario

std::string mp::game_info::scenario

◆ shroud

bool mp::game_info::shroud

Definition at line 170 of file lobby_data.hpp.

Referenced by game_info().

◆ shuffle_sides

bool mp::game_info::shuffle_sides

Definition at line 172 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().

◆ started

bool mp::game_info::started

◆ status

std::string mp::game_info::status

Definition at line 162 of file lobby_data.hpp.

Referenced by game_info(), and gui2::dialogs::mp_lobby::make_game_row_data().

◆ support

std::string mp::game_info::support

Definition at line 159 of file lobby_data.hpp.

◆ time_limit

std::string mp::game_info::time_limit

Definition at line 163 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ use_map_settings

bool mp::game_info::use_map_settings

Definition at line 173 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().

◆ vacant_slots

std::size_t mp::game_info::vacant_slots

◆ verified

bool mp::game_info::verified

Definition at line 175 of file lobby_data.hpp.

Referenced by game_info().

◆ vision

std::string mp::game_info::vision

Definition at line 161 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents(), and game_info().

◆ xp

std::string mp::game_info::xp

Definition at line 160 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_lobby::adjust_game_row_contents().


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