BWAPI  4.1.2
An API for interacting with Starcraft: Broodwar (1.16.1)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules
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

 SetContainer ()
 
 SetContainer (SetContainer const &other)
 
 SetContainer (SetContainer &&other)
 
 SetContainer (std::initializer_list< T > ilist)
 
template<class IterT >
 SetContainer (IterT _begin, IterT _end)
 
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.

Constructor & Destructor Documentation

template<class T, class HashT = std::hash<int>>
BWAPI::SetContainer< T, HashT >::SetContainer ( )
template<class T, class HashT = std::hash<int>>
BWAPI::SetContainer< T, HashT >::SetContainer ( SetContainer< T, HashT > const &  other)
template<class T, class HashT = std::hash<int>>
BWAPI::SetContainer< T, HashT >::SetContainer ( SetContainer< T, HashT > &&  other)
template<class T, class HashT = std::hash<int>>
BWAPI::SetContainer< T, HashT >::SetContainer ( std::initializer_list< T >  ilist)
template<class T, class HashT = std::hash<int>>
template<class IterT >
BWAPI::SetContainer< T, HashT >::SetContainer ( IterT  _begin,
IterT  _end 
)

Member Function Documentation

template<class T, class HashT = std::hash<int>>
template<class Pred >
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().

template<class T, class HashT = std::hash<int>>
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().