BWAPI  4.4.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 >
T unordered_set (T...args)
T begin (T...args)
T begin(int) (T...args)
T bucket (T...args)
T bucket_count (T...args)
T bucket_size (T...args)
T cbegin (T...args)
T cbegin(int) (T...args)
T cend (T...args)
T cend(int) (T...args)
T clear (T...args)
T count (T...args)
T emplace (T...args)
T emplace_hint (T...args)
T empty (T...args)
T end (T...args)
T end(int) (T...args)
T equal_range (T...args)
T erase (T...args)
T find (T...args)
T get_allocator (T...args)
T hash_function (T...args)
T insert (T...args)
T key_eq (T...args)
T load_factor (T...args)
T max_bucket_count (T...args)
T max_load_factor (T...args)
T max_size (T...args)
T operator= (T...args)
T rehash (T...args)
T reserve (T...args)
T size (T...args)
T swap (T...args)

Additional Inherited Members

- Public Attributes inherited from std::unordered_set< K >
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().