BWAPI
Public Member Functions | Static Public Member Functions
AgentFactory Class Reference

#include <AgentFactory.h>

List of all members.

Public Member Functions

 ~AgentFactory ()
BaseAgentcreateAgent (Unit *unit)
bool isOfType (Unit *unit, UnitType type)

Static Public Member Functions

static AgentFactorygetInstance ()

Detailed Description

The agent system is built from a single base agent where all specific agents extends the base agent indirectly or directly. The AgentFactory class is a factory that creates the correct BaseAgent instance for a specific unit. This class shall always be used when a new agent is requested.

The AgentFactory is implemented as a singleton class. Each class that needs to access AgentFactory can request an instance, and all classes shares the same AgentFactory instance.

Author: Johan Hagelback (johan.hagelback@gmail.com)


Constructor & Destructor Documentation


Member Function Documentation

Creates the BaseAgent

Here is the call graph for this function:

Returns the instance to the class.

bool AgentFactory::isOfType ( Unit unit,
UnitType  type 
)

Returns true if the unit is of the specified type.

Here is the call graph for this function:


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