Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

baseClient Class Reference

#include <baseClient.h>

Inheritance diagram for baseClient:

Inheritance graph
[legend]
Collaboration diagram for baseClient:

Collaboration graph
[legend]
List of all members.

Public Methods

 baseClient (ost::TCPSocket &sock, World *)
 ~baseClient ()
virtual void Run ()
virtual void Final ()
bool isAlive ()
 Checks if the client is alive (the variable) and if the conection is still up.

void walk ()
 Makes the semphore post, so the thread continue walking.

void dontWalk ()
WorldgetWorld ()
 returns actual world


Protected Attributes

ost::TCPStream * stream
bool alive
Worldworld

Detailed Description

The clients waits for new messages from the net and make the desired operation.

Definition at line 36 of file baseClient.h.


Constructor & Destructor Documentation

baseClient::baseClient ost::TCPSocket &    sock,
World   _world
 

Creates the stream from the socket

Definition at line 32 of file baseClient.cc.

References alive, log, stream, and world.

baseClient::~baseClient  
 

Destroys the client

Definition at line 43 of file baseClient.cc.

References log, and stream.


Member Function Documentation

void baseClient::dontWalk  
 

Makes the execution of the thread stop, and the numClients counter increment

Definition at line 66 of file baseClient.cc.

References World::numClients, and world.

Referenced by Client::endOfTurn(), GraphicClient::Run(), and ControlClient::Run().

virtual void baseClient::Final   [inline, virtual]
 

Definition at line 49 of file baseClient.h.

References log.

World* baseClient::getWorld void    [inline]
 

returns actual world

Definition at line 58 of file baseClient.h.

Referenced by Agent::Agent(), and Agent::getWorld().

bool baseClient::isAlive   [inline]
 

Checks if the client is alive (the variable) and if the conection is still up.

Definition at line 52 of file baseClient.h.

References alive.

void baseClient::Run void    [virtual]
 

Runs the wait-for-messages loop

Reimplemented in Client, ControlClient, and GraphicClient.

Definition at line 52 of file baseClient.cc.

References alive, log, and stream.

void baseClient::walk   [inline]
 

Makes the semphore post, so the thread continue walking.

Definition at line 54 of file baseClient.h.


Member Data Documentation

bool baseClient::alive [protected]
 

Is the client alive?

Definition at line 41 of file baseClient.h.

Referenced by baseClient(), Client::initialize(), isAlive(), GraphicClient::Run(), ControlClient::Run(), Client::Run(), and Run().

ost::TCPStream* baseClient::stream [protected]
 

The stream from where the data comes

Definition at line 39 of file baseClient.h.

Referenced by baseClient(), Client::clientLog(), Client::dropCylinder(), Client::endOfTurn(), Client::grow(), Client::initialize(), Client::move(), Client::newCylinder(), GraphicClient::Run(), ControlClient::Run(), Client::Run(), Run(), Client::sendEnergy(), Client::sendMessage(), and ~baseClient().

World* baseClient::world [protected]
 

The world where the client acts

Definition at line 43 of file baseClient.h.

Referenced by baseClient(), dontWalk(), Client::dropCylinder(), Client::grow(), Client::initialize(), Client::move(), Client::newCylinder(), GraphicClient::Run(), ControlClient::Run(), Client::sendEnergy(), Client::sendMessage(), and Client::~Client().


The documentation for this class was generated from the following files:
Generated on Mon Jun 17 19:54:13 2002 for Svas Server by doxygen1.2.16