player Class Reference

#include <player.hpp>

Collaboration diagram for player:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 player (const std::string &n, simple_wml::node &cfg, const size_t max_messages=4, const size_t time_period=10)
void mark_available (const int game_id=0, const std::string location="")
const std::string & name () const
simple_wml::nodeconfig_address () const
bool silenced () const
bool is_message_flooding ()

Private Attributes

const std::string name_
simple_wml::nodecfg_
time_t flood_start_
unsigned int messages_since_flood_start_
const size_t MaxMessages
const time_t TimePeriod


Detailed Description

Definition at line 25 of file player.hpp.


Constructor & Destructor Documentation

player::player ( const std::string &  n,
simple_wml::node cfg,
const size_t  max_messages = 4,
const size_t  time_period = 10 
)

Definition at line 19 of file player.cpp.

References cfg_, mark_available(), and simple_wml::node::set_attr_dup().


Member Function Documentation

void player::mark_available ( const int  game_id = 0,
const std::string  location = "" 
)

Definition at line 28 of file player.cpp.

References cfg_, simple_wml::node::set_attr(), and simple_wml::node::set_attr_dup().

Referenced by player().

const std::string& player::name (  )  const [inline]

Definition at line 34 of file player.hpp.

References name_.

simple_wml::node* player::config_address (  )  const [inline]

Definition at line 36 of file player.hpp.

References cfg_.

bool player::silenced (  )  const [inline]

Definition at line 38 of file player.hpp.

References MaxMessages, and messages_since_flood_start_.

bool player::is_message_flooding (  ) 

Definition at line 35 of file player.cpp.

References flood_start_, MaxMessages, messages_since_flood_start_, and TimePeriod.


Member Data Documentation

const std::string player::name_ [private]

Definition at line 42 of file player.hpp.

Referenced by name().

Definition at line 43 of file player.hpp.

Referenced by config_address(), mark_available(), and player().

time_t player::flood_start_ [private]

Definition at line 45 of file player.hpp.

Referenced by is_message_flooding().

unsigned int player::messages_since_flood_start_ [private]

Definition at line 46 of file player.hpp.

Referenced by is_message_flooding(), and silenced().

const size_t player::MaxMessages [private]

Definition at line 47 of file player.hpp.

Referenced by is_message_flooding(), and silenced().

const time_t player::TimePeriod [private]

Definition at line 48 of file player.hpp.

Referenced by is_message_flooding().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs