BWAPI  4.2.0
An API for interacting with Starcraft: Broodwar (1.16.1)
Public Member Functions | List of all members
BWAPI::SetContainer< T, HashT > Class Template Reference
Inheritance diagram for BWAPI::SetContainer< T, HashT >:
Inheritance graph

Public Member Functions

bool contains (T const &value) const
template<class Pred >
void erase_if (const Pred &pred)
- 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

template<class T, class HashT = std::hash<int>>
class BWAPI::SetContainer< T, HashT >

This container is used to wrap convenience functions for BWAPI and be used as a bridge with a built-in set type.

Template Parameters
TType that this set contains.
HashTHash type. Defaults to integral hashing for BWAPI usage.

Member Function Documentation

void BWAPI::SetContainer< T, HashT >::erase_if (const Pred & pred)

Iterates the set and erases each element x where pred(x) returns true.

Parameters
predPredicate for removing elements.
See also
std::erase_if

References std::unordered_set< K >::begin(), std::unordered_set< K >::end(), and std::unordered_set< K >::erase().

bool BWAPI::SetContainer< T, HashT >::contains (T const & value) const

Checks if this set contains a specific value.

Parameters
valueValue to search for.

References std::unordered_set< K >::count().