Army Class Reference

the variables and methods that a army contains put in this file More...

#include <Army.h>

Collaboration diagram for Army:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Army (int _armyID)
 ctor
 ~Army ()
 dtor
void addScout (AIagent *_scout)
 add the scout the leader of the army
void addAgentToArmy (AIagent *_agent)
 add an Ai agent to the army
void addArmy (std::list< AIagent * > _aiagents)
 create an army
AIagentgetScout ()
 get the leader of the army
std::list< AIagent * > getArmyAgents ()
 get the list of aiagents
void sendMessage (const std::string _message)
 send message from the scout to the army
void setTargetPosForArmy (const ngl::Vec3 _pos)
 set the target for the army

Private Attributes

int m_ID
 the variable to hold the army ID
std::list< AIagent * > m_aiagents
 the variable to hold the agents in the army except for the scout
AIagentm_scout
 the variable to hold the leader

Detailed Description

the variables and methods that a army contains put in this file

Definition at line 20 of file Army.h.


Constructor & Destructor Documentation

Army::Army ( int  _armyID  ) 

ctor

Parameters:
[in] the ID of the army
Army::~Army (  ) 

dtor


Member Function Documentation

void Army::addAgentToArmy ( AIagent _agent  ) 

add an Ai agent to the army

Parameters:
[in] the AI agent _agent
void Army::addArmy ( std::list< AIagent * >  _aiagents  ) 

create an army

Parameters:
[in] the AI agents list _aiagents
void Army::addScout ( AIagent _scout  )  [inline]

add the scout the leader of the army

Parameters:
[in] the AI agent _scout

Definition at line 36 of file Army.h.

References m_scout.

00036 {m_scout = _scout;}

std::list<AIagent* > Army::getArmyAgents (  )  [inline]

get the list of aiagents

Definition at line 54 of file Army.h.

References m_aiagents.

00054 {return m_aiagents;}

AIagent* Army::getScout (  )  [inline]

get the leader of the army

Definition at line 50 of file Army.h.

References m_scout.

00050 {return m_scout;}

void Army::sendMessage ( const std::string  _message  ) 

send message from the scout to the army

Parameters:
[in] the message _message
void Army::setTargetPosForArmy ( const ngl::Vec3  _pos  ) 

set the target for the army

Parameters:
[in] the pos _pos

Member Data Documentation

std::list<AIagent* > Army::m_aiagents [private]

the variable to hold the agents in the army except for the scout

Definition at line 74 of file Army.h.

int Army::m_ID [private]

the variable to hold the army ID

Definition at line 70 of file Army.h.

AIagent* Army::m_scout [private]

the variable to hold the leader

Definition at line 78 of file Army.h.


The documentation for this class was generated from the following file:

Generated on 16 Aug 2013 for Multi-AgentSystem by  doxygen 1.6.1