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

DALT_Server::ActionArbitrage Class Reference

This class manages the action queue for each cycle. More...

#include <action_arbitrage.h>

Collaboration diagram for DALT_Server::ActionArbitrage:

Collaboration graph
[legend]
List of all members.

Public Methods

 ActionArbitrage (map< int, Client *> *entity_dict)
virtual ~ActionArbitrage ()
virtual void processSuppliedActions ()
virtual void processRejectedActions ()
virtual void dispatchActions ()
virtual void dispatchAction (Action &a)
virtual bool queueAction (Action &new_action)
virtual bool actionsLeft ()

Protected Attributes

map<int, Client*>* entity_dictionary
list<Actionsupplied_actions
list<Actionaproved_actions
list<Actionrejected_actions

Detailed Description

This class manages the action queue for each cycle.

As the agents (and possibly the server) generate action requests, they all get translated into Actions are queued by this class. When all agents finish their main cycle, this class will deal with conflicting actions (possibly by re-initialising the processing cycle for agents) prioritise everything and then start dispatching the actions one by one to the relevant clients.

A cycle is not considered finished until the action list is empty

Author:
Vlad Mereuta


Constructor & Destructor Documentation

DALT_Server::ActionArbitrage::ActionArbitrage ( map< int, Client *> * entity_dict )
 

Parameters:
entity_dict  

DALT_Server::ActionArbitrage::~ActionArbitrage ( ) [virtual]
 


Member Function Documentation

bool DALT_Server::ActionArbitrage::actionsLeft ( ) [virtual]
 

tests whether there are actions still to be dispached.

Returns:
true if there are actions left, false otherwise

void DALT_Server::ActionArbitrage::dispatchAction ( Action & a ) [virtual]
 

Parameters:
a  

void DALT_Server::ActionArbitrage::dispatchActions ( ) [virtual]
 

void DALT_Server::ActionArbitrage::processRejectedActions ( ) [virtual]
 

void DALT_Server::ActionArbitrage::processSuppliedActions ( ) [virtual]
 

bool DALT_Server::ActionArbitrage::queueAction ( Action & new_action ) [virtual]
 

Parameters:
new_action  


Member Data Documentation

list< Action > DALT_Server::ActionArbitrage::aproved_actions [protected]
 

actions that were processed and were aproved.

map< int, Client *> * DALT_Server::ActionArbitrage::entity_dictionary [protected]
 

client/agent map.

list< Action > DALT_Server::ActionArbitrage::rejected_actions [protected]
 

actions that were processed and were rejected.

list< Action > DALT_Server::ActionArbitrage::supplied_actions [protected]
 

actions that were supplied to the arbitrage module.


The documentation for this class was generated from the following file:
Generated at Thu Jan 31 15:22:35 2002 for DALT Server by doxygen1.2.8 written by Dimitri van Heesch, © 1997-2001