#include <player.hpp>

Public Types | |
| enum | STATUS { LOBBY, PLAYING, OBSERVING } |
Public Member Functions | |
| player (const std::string &n, simple_wml::node &cfg, bool registered, const size_t max_messages=4, const size_t time_period=10, const bool sp=false, const bool moderator=false) | |
| void | set_status (STATUS status) |
| void | mark_available (const int game_id=0, const std::string &location="") |
| void | mark_registered (bool registered=true) |
| bool | registered () const |
| const std::string & | name () const |
| bool | selective_ping () const |
| const simple_wml::node * | config_address () const |
| bool | is_message_flooding () |
| bool | in_game () const |
| const game * | get_game () const |
| void | set_game (game *g) |
| void | set_moderator (bool moderator) |
| bool | is_moderator () const |
Private Attributes | |
| const std::string | name_ |
| simple_wml::node & | cfg_ |
| const bool | selective_ping_ |
| bool | registered_ |
| time_t | flood_start_ |
| unsigned int | messages_since_flood_start_ |
| const size_t | MaxMessages |
| const time_t | TimePeriod |
| STATUS | status_ |
| bool | moderator_ |
Definition at line 29 of file player.hpp.
Definition at line 32 of file player.hpp.
| wesnothd::player::player | ( | const std::string & | n, | |
| simple_wml::node & | cfg, | |||
| bool | registered, | |||
| const size_t | max_messages = 4, |
|||
| const size_t | time_period = 10, |
|||
| const bool | sp = false, |
|||
| const bool | moderator = false | |||
| ) |
Definition at line 22 of file player.cpp.
References cfg_, mark_available(), simple_wml::node::set_attr(), and simple_wml::node::set_attr_dup().

| const simple_wml::node* wesnothd::player::config_address | ( | ) | const [inline] |
Definition at line 55 of file player.hpp.
References cfg_.
| const game* wesnothd::player::get_game | ( | ) | const |
Referenced by in_game().

| bool wesnothd::player::in_game | ( | ) | const [inline] |
Definition at line 62 of file player.hpp.
References get_game().

| bool wesnothd::player::is_message_flooding | ( | ) |
Definition at line 82 of file player.cpp.
References flood_start_, MaxMessages, messages_since_flood_start_, and TimePeriod.
| bool wesnothd::player::is_moderator | ( | ) | const [inline] |
Definition at line 73 of file player.hpp.
References moderator_.
| void wesnothd::player::mark_available | ( | const int | game_id = 0, |
|
| const std::string & | location = "" | |||
| ) |
Definition at line 63 of file player.cpp.
References cfg_, LOBBY, simple_wml::node::set_attr(), simple_wml::node::set_attr_dup(), and set_status().
Referenced by player().


| void wesnothd::player::mark_registered | ( | bool | registered = true |
) |
Definition at line 76 of file player.cpp.
References cfg_, registered_, and simple_wml::node::set_attr().

| const std::string& wesnothd::player::name | ( | ) | const [inline] |
Definition at line 52 of file player.hpp.
References name_.
| bool wesnothd::player::registered | ( | ) | const [inline] |
Definition at line 49 of file player.hpp.
References registered_.
| bool wesnothd::player::selective_ping | ( | ) | const [inline] |
Definition at line 53 of file player.hpp.
References selective_ping_.
| void wesnothd::player::set_game | ( | game * | g | ) |
| void wesnothd::player::set_moderator | ( | bool | moderator | ) | [inline] |
Definition at line 72 of file player.hpp.
References moderator_.
| void wesnothd::player::set_status | ( | STATUS | status | ) |
Definition at line 43 of file player.cpp.
References cfg_, LOBBY, OBSERVING, PLAYING, simple_wml::node::set_attr(), and status_.
Referenced by mark_available().


simple_wml::node& wesnothd::player::cfg_ [private] |
Definition at line 77 of file player.hpp.
Referenced by config_address(), mark_available(), mark_registered(), player(), and set_status().
time_t wesnothd::player::flood_start_ [private] |
Definition at line 82 of file player.hpp.
Referenced by is_message_flooding().
const size_t wesnothd::player::MaxMessages [private] |
Definition at line 84 of file player.hpp.
Referenced by is_message_flooding().
unsigned int wesnothd::player::messages_since_flood_start_ [private] |
Definition at line 83 of file player.hpp.
Referenced by is_message_flooding().
bool wesnothd::player::moderator_ [private] |
Definition at line 87 of file player.hpp.
Referenced by is_moderator(), and set_moderator().
const std::string wesnothd::player::name_ [private] |
Definition at line 76 of file player.hpp.
Referenced by name().
bool wesnothd::player::registered_ [private] |
Definition at line 80 of file player.hpp.
Referenced by mark_registered(), and registered().
const bool wesnothd::player::selective_ping_ [private] |
Definition at line 78 of file player.hpp.
Referenced by selective_ping().
STATUS wesnothd::player::status_ [private] |
Definition at line 86 of file player.hpp.
Referenced by set_status().
const time_t wesnothd::player::TimePeriod [private] |
Definition at line 85 of file player.hpp.
Referenced by is_message_flooding().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:59 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |