Logo
~Sockets~
~Examples~
~Contact~


PlayerFactory::PLAYER Struct Reference

Player properties struct. More...

#include <PlayerFactory.h>

Collaboration diagram for PlayerFactory::PLAYER:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLAYER (long l, const std::string &n, const std::string &p)
 ~PLAYER ()
void DisplayInventory (SmallSocket *p)
item_vGetInventory ()

Public Attributes

long nr
std::string m_name
std::string m_passwd
item_v m_inventory

Detailed Description

Player properties struct.

Definition at line 40 of file PlayerFactory.h.


Constructor & Destructor Documentation

PlayerFactory::PLAYER::PLAYER ( long  l,
const std::string &  n,
const std::string &  p 
) [inline]

Definition at line 42 of file PlayerFactory.h.

00042 : nr(l),m_name(n),m_passwd(p) {}

PlayerFactory::PLAYER::~PLAYER (  )  [inline]

Definition at line 43 of file PlayerFactory.h.

References m_inventory.

00044                 {
00045                         for (item_v::iterator it = m_inventory.begin(); it != m_inventory.end(); it++)
00046                         {
00047                                 ITEM *i = *it;
00048                                 delete i;
00049                         }
00050                 }


Member Function Documentation

void PlayerFactory::PLAYER::DisplayInventory ( SmallSocket p  ) 

Definition at line 119 of file PlayerFactory.cpp.

References m_inventory.

00120 {
00121         for (item_v::iterator it = m_inventory.begin(); it != m_inventory.end(); it++)
00122         {
00123                 ITEM *i = *it;
00124                 std::string str;
00125                 p -> Send(" " + i -> GetDescription() + "\n");
00126         }
00127 }

item_v& PlayerFactory::PLAYER::GetInventory (  )  [inline]

Definition at line 52 of file PlayerFactory.h.

References m_inventory.

00052 { return m_inventory; }


Member Data Documentation

Definition at line 53 of file PlayerFactory.h.

Definition at line 54 of file PlayerFactory.h.

Definition at line 55 of file PlayerFactory.h.


The documentation for this struct was generated from the following files:
Page, code, and content Copyright (C) 2006 by Anders Hedström
Generated on Mon Aug 29 20:21:47 2005 for C++ Sockets by  doxygen 1.4.4