Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

User Class Reference

#include <user.h>

List of all members.

Public Methods

 User (unsigned int id)
 User (const User &r_user)
virtual ~User ()
User & operator= (const User &r_user)
bool operator== (const User &r_user) const
bool operator== (unsigned int id) const
bool operator!= (unsigned int id) const
unsigned int Id ()

Private Attributes

unsigned int mClientId
 client id from server (socket)

int mState
 users state

string mName
 user's name


Detailed Description

The User class contains the minimum amount of attributes to reasonably maintain a socket user with a client.

Definition at line 15 of file user.h.


Constructor & Destructor Documentation

User::User (  unsigned int    id ) 
 

Constructor for User. There is no default constructor as all Users must be constructed with a socket id.

Definition at line 15 of file user.cpp.

User::User (  const User &    r_user ) 
 

Copy Constructor for User

Definition at line 28 of file user.cpp.

User::~User (    )  [virtual]
 

Destructor for User

Definition at line 22 of file user.cpp.


Member Function Documentation

unsigned int User::Id (    ) 
 

Return the ClientID

Returns :
the client ID or socket number

Definition at line 78 of file user.cpp.

References mClientId.

Referenced by Chat().

bool User::operator!= (  unsigned int    id )  const
 

Inequality operator for User

Parameters:
id  The user id this user is being compared to

Definition at line 69 of file user.cpp.

References mClientId.

User & User::operator= (  const User &    r_user ) 
 

Assignment operator for User

Parameters:
r_user  The user this user is being assigned to

Definition at line 37 of file user.cpp.

References mClientId, mName, and mState.

bool User::operator== (  unsigned int    id )  const
 

Equality operator for User

Parameters:
id  The user id this user is being compared to

Definition at line 60 of file user.cpp.

References mClientId.

bool User::operator== (  const User &    r_user )  const
 

Equality operator for User

Parameters:
r_user  The user this user is being compared to

Definition at line 51 of file user.cpp.

References mClientId.


Member Data Documentation

unsigned int User::mClientId [private]
 

client id from server (socket)

Definition at line 26 of file user.h.

Referenced by Id(), operator!=(), operator=(), and operator==().

string User::mName [private]
 

user's name

Definition at line 28 of file user.h.

Referenced by operator=().

int User::mState [private]
 

users state

Definition at line 27 of file user.h.

Referenced by operator=().


The documentation for this class was generated from the following files:
Generated on Mon Mar 29 23:12:58 2004 for Paradigm by doxygen1.2.17