Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::AgentControl Class Reference

NetControl node that manages the communication with agents in cooperation with the GameControlServer. More...

#include <agentcontrol.h>

Inheritance diagram for oxygen::AgentControl:

Inheritance graph
[legend]
Collaboration diagram for oxygen::AgentControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AgentControl ()
virtual ~AgentControl ()
virtual void ClientConnect (boost::shared_ptr< Client > client)
 called when a new client connects
virtual void ClientDisconnect (boost::shared_ptr< Client > client)
 called when a client disconnects
virtual void StartCycle ()
 forwards all pending messages from all connected agents to the GameControlServer
virtual void EndCycle ()
 generates and sends sense updates to all connected agents

Protected Member Functions

virtual void OnLink ()
 This method is called, when the hierarchy object has been linked to a parent.
virtual void OnUnlink ()
 This rountine is called, before the hierarchy object is removed from the parent.

Protected Attributes

boost::shared_ptr< GameControlServermGameControlServer
 cached reference to the GameControlServer

Detailed Description

NetControl node that manages the communication with agents in cooperation with the GameControlServer.

Definition at line 34 of file agentcontrol.h.


Constructor & Destructor Documentation

AgentControl::AgentControl  ) 
 

Definition at line 32 of file agentcontrol.cpp.

References oxygen::NetControl::mLocalAddr.

AgentControl::~AgentControl  )  [virtual]
 

Definition at line 37 of file agentcontrol.cpp.


Member Function Documentation

virtual void oxygen::AgentControl::ClientConnect boost::shared_ptr< Client >  client  )  [virtual]
 

called when a new client connects

virtual void oxygen::AgentControl::ClientDisconnect boost::shared_ptr< Client >  client  )  [virtual]
 

called when a client disconnects

void AgentControl::EndCycle  )  [virtual]
 

generates and sends sense updates to all connected agents

Reimplemented from oxygen::NetControl.

Definition at line 136 of file agentcontrol.cpp.

References oxygen::NetControl::EndCycle(), zeitgeist::Object::GetLog(), oxygen::NetControl::mClients, mGameControlServer, oxygen::NetControl::mNetMessage, and oxygen::NetControl::SendMessage().

Here is the call graph for this function:

void AgentControl::OnLink  )  [protected, virtual]
 

This method is called, when the hierarchy object has been linked to a parent.

At that point, traversal can commence. It can be overridden to support custom 'link' behavior.

Reimplemented from zeitgeist::Leaf.

Definition at line 41 of file agentcontrol.cpp.

References zeitgeist::Object::GetLog(), oxygen::SimControlNode::GetSimulationServer(), mGameControlServer, and zeitgeist::Leaf::OnLink().

Here is the call graph for this function:

void AgentControl::OnUnlink  )  [protected, virtual]
 

This rountine is called, before the hierarchy object is removed from the parent.

It can be overridden to support custom 'unlink' behavior.

Reimplemented from zeitgeist::Leaf.

Definition at line 55 of file agentcontrol.cpp.

References mGameControlServer, and zeitgeist::Leaf::OnUnlink().

Here is the call graph for this function:

void AgentControl::StartCycle  )  [virtual]
 

forwards all pending messages from all connected agents to the GameControlServer

Reimplemented from oxygen::NetControl.

Definition at line 81 of file agentcontrol.cpp.

References oxygen::NetControl::mBuffers, oxygen::NetControl::mClients, mGameControlServer, oxygen::NetControl::mNetMessage, and oxygen::NetControl::StartCycle().

Here is the call graph for this function:


Member Data Documentation

boost::shared_ptr<GameControlServer> oxygen::AgentControl::mGameControlServer [protected]
 

cached reference to the GameControlServer

Definition at line 59 of file agentcontrol.h.

Referenced by EndCycle(), OnLink(), OnUnlink(), and StartCycle().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:47:25 2006 for rcssserver3d by  doxygen 1.4.4