|
BWAPI
|
#include <BuildOrder.h>

Public Member Functions | |
| BuildOrder (BuildOrderID id=BuildOrderID::None, std::string name="None") | |
| BuildOrder (BWAPI::Race race, BuildOrderID id, std::string name) | |
| int | addItem (BWAPI::UnitType type, std::list< CallBack > &callBacks=std::list< CallBack >(), int count=1, BuildingLocation position=BuildingLocation::Base) |
| int | addItem (BWAPI::TechType type, std::list< CallBack > &callBacks=std::list< CallBack >()) |
| int | addItem (BWAPI::UpgradeType type, int level=1, std::list< CallBack > &callBacks=std::list< CallBack >()) |
| int | addItem (BWAPI::UnitType type, int count, BuildingLocation position=BuildingLocation::Base, TaskType taskType=TaskType::BuildOrder) |
| int | addItem (BWAPI::UnitType type, int count, TaskType taskType, BuildingLocation position=BuildingLocation::Base) |
| int | addItem (BWAPI::UnitType type, TaskType taskType, std::list< CallBack > &callBacks=std::list< CallBack >(), int count=1, BuildingLocation position=BuildingLocation::Base) |
| int | addItem (BWAPI::TechType type, TaskType taskType, std::list< CallBack > &callBacks=std::list< CallBack >()) |
| int | addItem (BWAPI::UpgradeType type, int level, TaskType taskType, std::list< CallBack > &callBacks=std::list< CallBack >()) |
| int | addOrder (Order orderType, std::list< CallBack > &callBacks=std::list< CallBack >()) |
| void | addProduce (BWAPI::UnitType type, int weight, int priority=100, const Condition &unitCond=Condition(ConditionTest::None, true), const Condition &factoryCond=Condition(ConditionTest::None, true)) |
| void | addNextBuild (BuildOrderID id, Condition condition) |
| void | addSquad (SquadType type, int count=1) |
| void | setDefaultBuild (BuildOrderID fallbackBuild, int fallbackTime=0) |
| void | setArmyBehaviour (ArmyBehaviour armyBehaiour) |
| void | setStartingCondition (Condition condition) |
| BWAPI::Race | getRace () const |
| BuildOrderID | getID () const |
| const std::string & | getName () const |
| const std::deque< BuildItem > & | getBuildItems () const |
| const std::deque< OrderItem > & | getOrderItems () const |
| const std::list< UnitToProduce > & | getUnitsToProduce () const |
| const std::map< SquadType, int > & | getSquads () const |
| bool | isStartBuild () const |
| ArmyBehaviour | getArmyBehaiour () const |
| BuildOrderID | getFallbackBuild () const |
| int | getFallbackTime () const |
| const std::map< BuildOrderID, Condition > & | getNextBuilds () const |
Private Attributes | |
| BWAPI::Race | mRace |
| BuildOrderID | mID |
| std::string | mName |
| std::deque< BuildItem > | mItems |
| std::deque< OrderItem > | mOrders |
| std::list< UnitToProduce > | mProduces |
| std::map< SquadType, int > | mSquads |
| Condition | mStartingCondition |
| ArmyBehaviour | mArmyBehaiour |
| BuildOrderID | mFallbackBuild |
| int | mFallbackTime |
| std::map< BuildOrderID, Condition > | mNextBuilds |
| int | mItemCounter |
Definition at line 263 of file BuildOrder.h.
| BuildOrder::BuildOrder | ( | BuildOrderID | id = BuildOrderID::None, |
| std::string | name = "None" |
||
| ) |
Definition at line 3 of file BuildOrder.cpp.
: mItemCounter(0) , mRace(BWAPI::Races::Unknown) , mID(id) , mName(name) , mFallbackBuild(BuildOrderID::None) , mFallbackTime(0) , mArmyBehaiour(ArmyBehaviour::Default) { }
| BuildOrder::BuildOrder | ( | BWAPI::Race | race, |
| BuildOrderID | id, | ||
| std::string | name | ||
| ) |
Definition at line 14 of file BuildOrder.cpp.
: mItemCounter(0) , mRace(race) , mID(id) , mName(name) , mFallbackBuild(BuildOrderID::None) , mFallbackTime(0) , mArmyBehaiour(ArmyBehaviour::Default) { }
| int BuildOrder::addItem | ( | BWAPI::UnitType | type, |
| std::list< CallBack > & | callBacks = std::list<CallBack>(), |
||
| int | count = 1, |
||
| BuildingLocation | position = BuildingLocation::Base |
||
| ) |
Definition at line 25 of file BuildOrder.cpp.
References TaskTypeDef::BuildOrder.
Referenced by addItem(), and BuildOrderManagerClass::LoadProtossBuilds().
{
return addItem(type, TaskType::BuildOrder, callBacks, count, position);
}

| int BuildOrder::addItem | ( | BWAPI::TechType | type, |
| std::list< CallBack > & | callBacks = std::list<CallBack>() |
||
| ) |
Definition at line 30 of file BuildOrder.cpp.
References addItem(), and TaskTypeDef::BuildOrder.
{
return addItem(type, TaskType::BuildOrder, callBacks);
}

| int BuildOrder::addItem | ( | BWAPI::UpgradeType | type, |
| int | level = 1, |
||
| std::list< CallBack > & | callBacks = std::list<CallBack>() |
||
| ) |
Definition at line 35 of file BuildOrder.cpp.
References addItem(), and TaskTypeDef::BuildOrder.
{
return addItem(type, level, TaskType::BuildOrder, callBacks);
}

| int BuildOrder::addItem | ( | BWAPI::UnitType | type, |
| int | count, | ||
| BuildingLocation | position = BuildingLocation::Base, |
||
| TaskType | taskType = TaskType::BuildOrder |
||
| ) |
Definition at line 40 of file BuildOrder.cpp.
References addItem().
{
return addItem(type, taskType, std::list<CallBack>(), count, position);
}

| int BuildOrder::addItem | ( | BWAPI::UnitType | type, |
| int | count, | ||
| TaskType | taskType, | ||
| BuildingLocation | position = BuildingLocation::Base |
||
| ) |
Definition at line 45 of file BuildOrder.cpp.
References addItem().
{
return addItem(type, taskType, std::list<CallBack>(), count, position);
}

| int BuildOrder::addItem | ( | BWAPI::UnitType | type, |
| TaskType | taskType, | ||
| std::list< CallBack > & | callBacks = std::list<CallBack>(), |
||
| int | count = 1, |
||
| BuildingLocation | position = BuildingLocation::Base |
||
| ) |
Definition at line 50 of file BuildOrder.cpp.
References mItemCounter, and mItems.
{
mItems.push_back(BuildItem(type, count, ++mItemCounter, taskType, position, callBacks));
return mItemCounter;
}
| int BuildOrder::addItem | ( | BWAPI::TechType | type, |
| TaskType | taskType, | ||
| std::list< CallBack > & | callBacks = std::list<CallBack>() |
||
| ) |
Definition at line 57 of file BuildOrder.cpp.
References mItemCounter, and mItems.
{
mItems.push_back(BuildItem(type, ++mItemCounter, taskType, callBacks));
return mItemCounter;
}
| int BuildOrder::addItem | ( | BWAPI::UpgradeType | type, |
| int | level, | ||
| TaskType | taskType, | ||
| std::list< CallBack > & | callBacks = std::list<CallBack>() |
||
| ) |
Definition at line 64 of file BuildOrder.cpp.
References mItemCounter, and mItems.
{
mItems.push_back(BuildItem(type, level, ++mItemCounter, taskType, callBacks));
return mItemCounter;
}
| void BuildOrder::addNextBuild | ( | BuildOrderID | id, |
| Condition | condition | ||
| ) |
Definition at line 83 of file BuildOrder.cpp.
References mNextBuilds.
Referenced by BuildOrderManagerClass::LoadProtossBuilds().
{
mNextBuilds[id] = condition;
}

| int BuildOrder::addOrder | ( | Order | orderType, |
| std::list< CallBack > & | callBacks = std::list<CallBack>() |
||
| ) |
Definition at line 71 of file BuildOrder.cpp.
References mItemCounter, and mOrders.
Referenced by BuildOrderManagerClass::LoadProtossBuilds().
{
mOrders.push_back(OrderItem(orderType, ++mItemCounter, callBacks));
return mItemCounter;
}

| void BuildOrder::addProduce | ( | BWAPI::UnitType | type, |
| int | weight, | ||
| int | priority = 100, |
||
| const Condition & | unitCond = Condition(ConditionTest::None, true), |
||
| const Condition & | factoryCond = Condition(ConditionTest::None, true) |
||
| ) |
Definition at line 78 of file BuildOrder.cpp.
References mProduces.
Referenced by BuildOrderManagerClass::LoadProtossBuilds().
{
mProduces.push_back(UnitToProduce(type, weight, priority, unitCond, factoryCond));
}

| void BuildOrder::addSquad | ( | SquadType | type, |
| int | count = 1 |
||
| ) |
Definition at line 88 of file BuildOrder.cpp.
References mSquads.
Referenced by BuildOrderManagerClass::LoadProtossBuilds().

| ArmyBehaviour BuildOrder::getArmyBehaiour | ( | ) | const [inline] |
| const std::deque<BuildItem>& BuildOrder::getBuildItems | ( | ) | const [inline] |
| BuildOrderID BuildOrder::getFallbackBuild | ( | ) | const [inline] |
| int BuildOrder::getFallbackTime | ( | ) | const [inline] |
| BuildOrderID BuildOrder::getID | ( | ) | const [inline] |
| const std::string& BuildOrder::getName | ( | ) | const [inline] |
Definition at line 296 of file BuildOrder.h.
References mName.
Referenced by BuildOrderManagerClass::changeCurrentBuild().
{ return mName; }

| const std::map<BuildOrderID, Condition>& BuildOrder::getNextBuilds | ( | ) | const [inline] |
| const std::deque<OrderItem>& BuildOrder::getOrderItems | ( | ) | const [inline] |
| BWAPI::Race BuildOrder::getRace | ( | ) | const [inline] |
| const std::map<SquadType, int>& BuildOrder::getSquads | ( | ) | const [inline] |
| const std::list<UnitToProduce>& BuildOrder::getUnitsToProduce | ( | ) | const [inline] |
| bool BuildOrder::isStartBuild | ( | ) | const [inline] |
Definition at line 303 of file BuildOrder.h.
References Condition::evauluate(), and mStartingCondition.
{ return mStartingCondition.evauluate(); }

| void BuildOrder::setArmyBehaviour | ( | ArmyBehaviour | armyBehaiour | ) |
Definition at line 99 of file BuildOrder.cpp.
References mArmyBehaiour.
Referenced by BuildOrderManagerClass::LoadProtossBuilds().
{
mArmyBehaiour = armyBehaiour;
}

| void BuildOrder::setDefaultBuild | ( | BuildOrderID | fallbackBuild, |
| int | fallbackTime = 0 |
||
| ) |
Definition at line 93 of file BuildOrder.cpp.
References mFallbackBuild, and mFallbackTime.
Referenced by BuildOrderManagerClass::LoadProtossBuilds().
{
mFallbackBuild = fallbackBuild;
mFallbackTime = fallbackTime;
}

| void BuildOrder::setStartingCondition | ( | Condition | condition | ) |
Definition at line 104 of file BuildOrder.cpp.
References mStartingCondition.
Referenced by BuildOrderManagerClass::LoadProtossBuilds().
{
mStartingCondition = condition;
}

ArmyBehaviour BuildOrder::mArmyBehaiour [private] |
Definition at line 323 of file BuildOrder.h.
Referenced by getArmyBehaiour(), and setArmyBehaviour().
BuildOrderID BuildOrder::mFallbackBuild [private] |
Definition at line 325 of file BuildOrder.h.
Referenced by getFallbackBuild(), and setDefaultBuild().
int BuildOrder::mFallbackTime [private] |
Definition at line 326 of file BuildOrder.h.
Referenced by getFallbackTime(), and setDefaultBuild().
BuildOrderID BuildOrder::mID [private] |
Definition at line 313 of file BuildOrder.h.
Referenced by getID().
int BuildOrder::mItemCounter [private] |
Definition at line 329 of file BuildOrder.h.
Referenced by addItem(), and addOrder().
std::deque<BuildItem> BuildOrder::mItems [private] |
Definition at line 316 of file BuildOrder.h.
Referenced by addItem(), and getBuildItems().
std::string BuildOrder::mName [private] |
Definition at line 314 of file BuildOrder.h.
Referenced by getName().
std::map<BuildOrderID, Condition> BuildOrder::mNextBuilds [private] |
Definition at line 327 of file BuildOrder.h.
Referenced by addNextBuild(), and getNextBuilds().
std::deque<OrderItem> BuildOrder::mOrders [private] |
Definition at line 317 of file BuildOrder.h.
Referenced by addOrder(), and getOrderItems().
std::list<UnitToProduce> BuildOrder::mProduces [private] |
Definition at line 318 of file BuildOrder.h.
Referenced by addProduce(), and getUnitsToProduce().
BWAPI::Race BuildOrder::mRace [private] |
Definition at line 312 of file BuildOrder.h.
Referenced by getRace().
std::map<SquadType, int> BuildOrder::mSquads [private] |
Definition at line 319 of file BuildOrder.h.
Referenced by addSquad(), and getSquads().
Condition BuildOrder::mStartingCondition [private] |
Definition at line 321 of file BuildOrder.h.
Referenced by isStartBuild(), and setStartingCondition().
1.7.6.1