Classes.CFieldOps Class Reference

Inherits Classes.CTroop.

Inheritance diagram for Classes.CFieldOps:

Inheritance graph
[legend]
Collaboration diagram for Classes.CFieldOps:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

void setup ()
 'setup' method of jade agents.
void SetUpPriorities ()
 Definition of priorities for each kind of task.
boolean checkAmmoAction (String _sContent)
 Decides if agent accepts the CFA request.
void PerformTargetReached (CTask _CurrentTask)
 Action to do when this agent reaches the target of current task.
final int CreateAmmoPack ()
 Creates ammo packs if possible.

Static Protected Attributes

static int m_iPacksDelivered = 0
 inner variable used to name packs

Member Function Documentation

void Classes.CFieldOps.setup  )  [protected]
 

'setup' method of jade agents.

This method perform actions in common to CFieldOps agents (and derived classes) and calls parent's setup.

Parameters:
- 
Returns:
-

Reimplemented from Classes.CTroop.

void Classes.CFieldOps.SetUpPriorities  )  [protected]
 

Definition of priorities for each kind of task.

This method can be implemented in CTroop's derived classes to define the task's priorities in agreement to the role of the new class. Priorities must be defined in the array m_TaskPriority.

It's very useful to overload this method.

Parameters:
- 
Returns:
-

Reimplemented from Classes.CTroop.

boolean Classes.CFieldOps.checkAmmoAction String  _sContent  )  [protected]
 

Decides if agent accepts the CFA request.

This method is a decision function invoked when a CALL FOR AMMO request has arrived. Parameter sContent is the content of message received in CFA responder behaviour as result of a CallForAmmo request, so it must be: ( x , y , z ) ( ammo ) . By default, the return value is TRUE, so agents always accept all CFA requests.

It's very useful to overload this method.

Parameters:
_sContent 
Returns:
TRUE

void Classes.CFieldOps.PerformTargetReached CTask  _CurrentTask  )  [protected]
 

Action to do when this agent reaches the target of current task.

This method is called when this agent goes to state TARGET_REACHED. If current task is TASK_GIVE_AMMOPACKS, agent must give ammo packs, but in other case, it calls to parent's method.

It's very useful to overload this method.

Parameters:
_CurrentTask 
Returns:
-

Reimplemented from Classes.CTroop.

final int Classes.CFieldOps.CreateAmmoPack  )  [protected]
 

Creates ammo packs if possible.

This method allows to create medic packs if there is enough power in the agent's power bar.

Parameters:
- 
Returns:
iPacksDelivered: number of medic packs created


Member Data Documentation

int Classes.CFieldOps.m_iPacksDelivered = 0 [static, protected]
 

inner variable used to name packs


The documentation for this class was generated from the following file:
Generated on Fri Dec 16 20:13:46 2005 for JGomas by  doxygen 1.4.5