HOG2
Public Member Functions | Private Attributes | List of all members
GreedyDMUnit< environment > Class Template Reference

#include <GreedyDMUnit.h>

Inheritance diagram for GreedyDMUnit< environment >:
Inheritance graph
[legend]
Collaboration diagram for GreedyDMUnit< environment >:
Collaboration graph
[legend]

Public Member Functions

 GreedyDMUnit (xyLoc &startLoc)
 
 ~GreedyDMUnit ()
 
virtual const char * GetName ()
 
virtual bool MakeMove (environment *theEnv, OccupancyInterface< xyLoc, tDirection > *, SimulationInfo< xyLoc, tDirection, environment > *, tDirection &a)
 
virtual void UpdateLocation (environment *, xyLoc &newloc, bool success, SimulationInfo< xyLoc, tDirection, environment > *)
 
virtual void GetLocation (xyLoc &l)
 
virtual void OpenGLDraw (const environment *theEnv, const SimulationInfo< xyLoc, tDirection, environment > *) const
 
virtual void GetGoal (xyLoc &s)
 
void SetEnvironment (WeightedMap2DEnvironment *w)
 
- Public Member Functions inherited from Unit< xyLoc, tDirection, environment >
 Unit ()
 
virtual ~Unit ()
 
virtual bool Done ()
 
virtual double GetSpeed ()
 
void SetSpeed (double s)
 
virtual void LogStats (StatCollection *)
 log an stats that may have been computed during the last run More...
 
virtual void LogFinalStats (StatCollection *)
 log any final one-time stats before a simulation is ended More...
 
virtual void SetColor (GLfloat _r, GLfloat _g, GLfloat _b)
 
virtual void GetColor (GLfloat &_r, GLfloat &_g, GLfloat &_b) const
 
UnitGroup< xyLoc, tDirection, environment > * GetUnitGroup ()
 
void SetUnitGroup (UnitGroup< xyLoc, tDirection, environment > *_group)
 
virtual unsigned int GetNum ()
 
virtual void SetNum (unsigned int num)
 
virtual void StartNewTrial (StatCollection *)
 
virtual int GetPriority ()
 
virtual void SetPriority (int val)
 

Private Attributes

xyLoc loc
 
xyLoc prevLoc
 
WeightedMap2DEnvironmentwme
 

Detailed Description

template<class environment>
class GreedyDMUnit< environment >

Definition at line 5 of file GreedyDMUnit.h.

Constructor & Destructor Documentation

◆ GreedyDMUnit()

template<class environment >
GreedyDMUnit< environment >::GreedyDMUnit ( xyLoc startLoc)
inline

Definition at line 8 of file GreedyDMUnit.h.

◆ ~GreedyDMUnit()

template<class environment >
GreedyDMUnit< environment >::~GreedyDMUnit ( )
inline

Definition at line 9 of file GreedyDMUnit.h.

Member Function Documentation

◆ GetGoal()

template<class environment >
virtual void GreedyDMUnit< environment >::GetGoal ( xyLoc s)
inlinevirtual

Reimplemented from Unit< xyLoc, tDirection, environment >.

Definition at line 128 of file GreedyDMUnit.h.

References GreedyDMUnit< environment >::loc.

◆ GetLocation()

template<class environment >
virtual void GreedyDMUnit< environment >::GetLocation ( xyLoc l)
inlinevirtual

◆ GetName()

template<class environment >
virtual const char* GreedyDMUnit< environment >::GetName ( )
inlinevirtual

Implements Unit< xyLoc, tDirection, environment >.

Definition at line 11 of file GreedyDMUnit.h.

◆ MakeMove()

template<class environment >
virtual bool GreedyDMUnit< environment >::MakeMove ( environment *  theEnv,
OccupancyInterface< xyLoc, tDirection > *  ,
SimulationInfo< xyLoc, tDirection, environment > *  ,
tDirection a 
)
inlinevirtual

◆ OpenGLDraw()

template<class environment >
virtual void GreedyDMUnit< environment >::OpenGLDraw ( const environment *  theEnv,
const SimulationInfo< xyLoc, tDirection, environment > *   
) const
inlinevirtual

Implements Unit< xyLoc, tDirection, environment >.

Definition at line 125 of file GreedyDMUnit.h.

◆ SetEnvironment()

template<class environment >
void GreedyDMUnit< environment >::SetEnvironment ( WeightedMap2DEnvironment w)
inline

Definition at line 131 of file GreedyDMUnit.h.

References GreedyDMUnit< environment >::wme.

◆ UpdateLocation()

template<class environment >
virtual void GreedyDMUnit< environment >::UpdateLocation ( environment *  ,
xyLoc newloc,
bool  success,
SimulationInfo< xyLoc, tDirection, environment > *   
)
inlinevirtual

Member Data Documentation

◆ loc

template<class environment >
xyLoc GreedyDMUnit< environment >::loc
private

◆ prevLoc

template<class environment >
xyLoc GreedyDMUnit< environment >::prevLoc
private

Definition at line 134 of file GreedyDMUnit.h.

Referenced by GreedyDMUnit< environment >::UpdateLocation().

◆ wme

template<class environment >
WeightedMap2DEnvironment* GreedyDMUnit< environment >::wme
private

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