BWAPI
Public Member Functions | Static Public Member Functions | Protected Attributes
Task Class Reference

#include <Task.h>

Inheritance diagram for Task:
Inheritance graph
[legend]
Collaboration diagram for Task:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Task (Environment *env, string name, bool canBePreempted=true, int execValidationFreq=DEFAULT_TASK_VALIDATION_FREQ)
virtual ~Task (void)
virtual void cleanup ()
bool isType (TaskType)
double getPriority ()
TaskStatus getStatus ()
void setStatus (TaskStatus status)
void setStatus (TaskStatus status, string statusMessage)
int getId ()
string getName ()
int getCreationFrame ()
int getExecValidationFreq ()
bool mustSyncUp ()
bool canBePreempted ()
virtual void calculatePriority ()=0
virtual void evaluateStatus ()=0
virtual void evaluateNeededUnits ()=0
virtual double evaluateAptitude (Agent *agent)=0
bool needsMoreUnits ()
bool canExecute ()
string statusMessage ()
virtual bool execute (Agent *agent)=0
virtual void addAgent (Agent *agent)
virtual void removeAgent (Agent *agent)
void assignNeededAgents (AgentMap *agents)
virtual void displayInfo (int &row, Agent *agent)

Static Public Member Functions

static TaskSet filterSet (TaskSet *tasks, TaskType type)
static TaskSet filterSet (TaskSet *tasks, TaskType type, int maxCreationFrame)
static TaskSet filterSetByPriority (TaskSet *tasks, TaskType type, double priority)
static double scalePriority (double value, double maxPriority, double minPriority)

Protected Attributes

double _priority
TaskTypeSet _types
Environment_env
AgentSet _agents
TaskStatus _status
string _statusMessage
bool _canExecute
bool _needsMoreUnits
string _name
int _id
int _creationFrame
int _execValidationFreq
bool _canBePreempted
bool _filterTaskInfo
bool _syncUp

Constructor & Destructor Documentation

Task::Task ( Environment env,
string  name,
bool  canBePreempted = true,
int  execValidationFreq = DEFAULT_TASK_VALIDATION_FREQ 
)

Here is the call graph for this function:

Task::~Task ( void  ) [virtual]

Member Function Documentation

void Task::addAgent ( Agent agent) [virtual]

Reimplemented in AssaultSectorTask, ProtectUnitTask, AddonBuildTask, and AttackUnitTask.

Here is the caller graph for this function:

void Task::assignNeededAgents ( AgentMap agents)

Here is the call graph for this function:

virtual void Task::calculatePriority ( ) [pure virtual]

Here is the caller graph for this function:

bool Task::canExecute ( )

Here is the caller graph for this function:

void Task::cleanup ( ) [virtual]

Here is the caller graph for this function:

void Task::displayInfo ( int &  row,
Agent agent 
) [virtual]

Here is the call graph for this function:

Here is the caller graph for this function:

virtual double Task::evaluateAptitude ( Agent agent) [pure virtual]
virtual void Task::evaluateNeededUnits ( ) [pure virtual]
virtual void Task::evaluateStatus ( ) [pure virtual]
virtual bool Task::execute ( Agent agent) [pure virtual]
TaskSet Task::filterSet ( TaskSet tasks,
TaskType  type 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

TaskSet Task::filterSet ( TaskSet tasks,
TaskType  type,
int  maxCreationFrame 
) [static]

Here is the call graph for this function:

TaskSet Task::filterSetByPriority ( TaskSet tasks,
TaskType  type,
double  priority 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

int Task::getId ( )
string Task::getName ( )

Here is the caller graph for this function:

double Task::getPriority ( )

Here is the caller graph for this function:

bool Task::isType ( TaskType  type)

Here is the caller graph for this function:

bool Task::mustSyncUp ( )

Here is the caller graph for this function:

void Task::removeAgent ( Agent agent) [virtual]

Reimplemented in AssaultSectorTask, ProtectUnitTask, ExploreSectorTask, AddonBuildTask, and AttackUnitTask.

Here is the caller graph for this function:

double Task::scalePriority ( double  value,
double  maxPriority,
double  minPriority 
) [static]

Here is the caller graph for this function:

void Task::setStatus ( TaskStatus  status)

Here is the caller graph for this function:

void Task::setStatus ( TaskStatus  status,
string  statusMessage 
)

Here is the call graph for this function:

string Task::statusMessage ( )

Here is the caller graph for this function:


Member Data Documentation

AgentSet Task::_agents [protected]
bool Task::_canBePreempted [protected]
bool Task::_canExecute [protected]
int Task::_creationFrame [protected]
Environment* Task::_env [protected]
int Task::_execValidationFreq [protected]
bool Task::_filterTaskInfo [protected]
int Task::_id [protected]
string Task::_name [protected]
bool Task::_needsMoreUnits [protected]
double Task::_priority [protected]
string Task::_statusMessage [protected]
bool Task::_syncUp [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines