HOG2
Public Member Functions | Private Attributes | List of all members
UnitGroup< state, action, environment > Class Template Reference

#include <UnitGroup.h>

Inheritance diagram for UnitGroup< state, action, environment >:
Inheritance graph
[legend]

Public Member Functions

virtual ~UnitGroup ()
 
virtual const char * GetName ()
 
virtual bool MakeMove (Unit< state, action, environment > *u, environment *e, SimulationInfo< state, action, environment > *si, action &a)
 
virtual void UpdateLocation (Unit< state, action, environment > *u, environment *e, state &loc, bool success, SimulationInfo< state, action, environment > *si)
 
void AddUnit (Unit< state, action, environment > *u)
 
virtual bool Done ()
 
void RemoveUnit (Unit< state, action, environment > *u)
 
virtual void StartNewTrial (StatCollection *c)
 
virtual void OpenGLDraw (const environment *, const SimulationInfo< state, action, environment > *) const
 
virtual std::vector< Unit< state, action, environment > * > GetMembers ()
 
unsigned int GetNumMembers ()
 
Unit< state, action, environment > * GetMember (int which) const
 

Private Attributes

std::vector< Unit< state, action, environment > * > members
 

Detailed Description

template<class state, class action, class environment>
class UnitGroup< state, action, environment >

Definition at line 31 of file UnitGroup.h.

Constructor & Destructor Documentation

◆ ~UnitGroup()

template<class state , class action , class environment >
virtual UnitGroup< state, action, environment >::~UnitGroup ( )
inlinevirtual

Definition at line 33 of file UnitGroup.h.

Member Function Documentation

◆ AddUnit()

template<class state , class action , class environment >
void UnitGroup< state, action, environment >::AddUnit ( Unit< state, action, environment > *  u)
inline

Definition at line 47 of file UnitGroup.h.

Referenced by Unit< xyLoc, tDirection, MapEnvironment >::SetUnitGroup().

◆ Done()

template<class state , class action , class environment >
virtual bool UnitGroup< state, action, environment >::Done ( )
inlinevirtual

Reimplemented in SharedAMapGroup.

Definition at line 59 of file UnitGroup.h.

Referenced by UnitGroup< xyLoc, tDirection, MapEnvironment >::Done().

◆ GetMember()

template<class state , class action , class environment >
Unit<state,action,environment>* UnitGroup< state, action, environment >::GetMember ( int  which) const
inline

Definition at line 95 of file UnitGroup.h.

◆ GetMembers()

template<class state , class action , class environment >
virtual std::vector<Unit<state,action,environment> *> UnitGroup< state, action, environment >::GetMembers ( )
inlinevirtual

◆ GetName()

template<class state , class action , class environment >
virtual const char* UnitGroup< state, action, environment >::GetName ( )
inlinevirtual

Reimplemented in WeightedUnitGroup< state, action, environment >, and SharedAMapGroup.

Definition at line 35 of file UnitGroup.h.

◆ GetNumMembers()

template<class state , class action , class environment >
unsigned int UnitGroup< state, action, environment >::GetNumMembers ( )
inline

Definition at line 94 of file UnitGroup.h.

◆ MakeMove()

template<class state , class action , class environment >
virtual bool UnitGroup< state, action, environment >::MakeMove ( Unit< state, action, environment > *  u,
environment *  e,
SimulationInfo< state, action, environment > *  si,
action &  a 
)
inlinevirtual

Reimplemented in WeightedUnitGroup< state, action, environment >.

Definition at line 37 of file UnitGroup.h.

◆ OpenGLDraw()

template<class state , class action , class environment >
virtual void UnitGroup< state, action, environment >::OpenGLDraw ( const environment *  ,
const SimulationInfo< state, action, environment > *   
) const
inlinevirtual

Reimplemented in WeightedUnitGroup< state, action, environment >.

Definition at line 91 of file UnitGroup.h.

◆ RemoveUnit()

template<class state , class action , class environment >
void UnitGroup< state, action, environment >::RemoveUnit ( Unit< state, action, environment > *  u)
inline

Definition at line 70 of file UnitGroup.h.

Referenced by Unit< xyLoc, tDirection, MapEnvironment >::SetUnitGroup().

◆ StartNewTrial()

template<class state , class action , class environment >
virtual void UnitGroup< state, action, environment >::StartNewTrial ( StatCollection c)
inlinevirtual

Reimplemented in SharedAMapGroup.

Definition at line 83 of file UnitGroup.h.

◆ UpdateLocation()

template<class state , class action , class environment >
virtual void UnitGroup< state, action, environment >::UpdateLocation ( Unit< state, action, environment > *  u,
environment *  e,
state &  loc,
bool  success,
SimulationInfo< state, action, environment > *  si 
)
inlinevirtual

Reimplemented in WeightedUnitGroup< state, action, environment >.

Definition at line 42 of file UnitGroup.h.

Member Data Documentation

◆ members

template<class state , class action , class environment >
std::vector<Unit<state, action, environment> *> UnitGroup< state, action, environment >::members
private

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