BWAPI  4.2.0
An API for interacting with Starcraft: Broodwar (1.16.1)
Public Member Functions | List of all members
BWAPI::Regionset Class Reference
Inheritance diagram for BWAPI::Regionset:
Inheritance graph

Public Member Functions

Position getCenter () const
Unitset getUnits (const UnitFilter &pred=nullptr) const
- Public Member Functions inherited from std::unordered_set< K >
unordered_set (T...args)
begin (T...args)
begin(int) (T...args)
bucket (T...args)
bucket_count (T...args)
bucket_size (T...args)
cbegin (T...args)
cbegin(int) (T...args)
cend (T...args)
cend(int) (T...args)
clear (T...args)
count (T...args)
emplace (T...args)
emplace_hint (T...args)
empty (T...args)
end (T...args)
end(int) (T...args)
equal_range (T...args)
erase (T...args)
find (T...args)
get_allocator (T...args)
hash_function (T...args)
insert (T...args)
key_eq (T...args)
load_factor (T...args)
max_bucket_count (T...args)
max_load_factor (T...args)
max_size (T...args)
operator= (T...args)
rehash (T...args)
reserve (T...args)
size (T...args)
swap (T...args)

Additional Inherited Members

- Public Attributes inherited from std::unordered_set< K >
keys

Detailed Description

A container that holds a set of Region objects.

Member Function Documentation

Position BWAPI::Regionset::getCenter () const

Retrieves the center of the region.

This position is used as the node of the region.

Returns
A Position indicating the center location of the Region, in pixels.
Unitset BWAPI::Regionset::getUnits (const UnitFilterpred = nullptr) const

Retrieves a Unitset containing all the units that are in this region.

Also has the ability to filter the units before the creation of the Unitset.

Parameters
pred(optional) If this parameter is used, it is a UnitFilter or function predicate that will retrieve only the units whose attributes match the given criteria. If omitted, then a default value of nullptr is used, in which case there is no filter.
Returns
A Unitset containing all units in this region that have met the requirements of pred.
See also
UnitFilter