Mari's Tarot
 All Classes Files Functions Variables Enumerations Enumerator Friends
Public Member Functions | Public Attributes | Friends | List of all members
Team Class Reference

Team is the class handling team management. More...

#include <Team.hpp>

Collaboration diagram for Team:
Collaboration graph

Public Member Functions

bool contains (const string &name) const
 Inline function to test if a player belongs to this team. More...
 
double getScore () const
 Assessor returning the team's score. More...
 
bool isEmpty () const
 Return if the Team is empty. More...
 
void newGame ()
 To prepare a new game. More...
 
bool operator> (const Team &t) const
 To compare two teams regarding their score. More...
 
bool operator< (const Team &t) const
 To compare two teams regarding their score. More...
 

Public Attributes

map< string, shared_ptr< Player > > members
 A map of team members, to quickly have an hand on the player object knowing his/her name. More...
 

Friends

ostream & operator<< (ostream &, const Team &)
 Used to simplify team screen printings. More...
 

Detailed Description

Team is the class handling team management.

Member Function Documentation

bool Team::contains ( const string &  name) const
inline

Inline function to test if a player belongs to this team.

Parameters
nameThe considered player name. True iff the team contains the given player.
double Team::getScore ( ) const

Assessor returning the team's score.

bool Team::isEmpty ( ) const

Return if the Team is empty.

void Team::newGame ( )

To prepare a new game.

bool Team::operator< ( const Team t) const

To compare two teams regarding their score.

bool Team::operator> ( const Team t) const

To compare two teams regarding their score.

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const Team team 
)
friend

Used to simplify team screen printings.

Member Data Documentation

map<string, shared_ptr<Player> > Team::members

A map of team members, to quickly have an hand on the player object knowing his/her name.


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