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::CompareFilter< PType, RType, Container > Class Template Reference

Public Member Functions

template<typename T >
 CompareFilter (const T &predicate)
 
bool isValid () const
 
UnaryFilter< PType > operator!= (const RType &cmp) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator% (const T &other) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator& (const T &other) const
 
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator& (RType other) const
 
RType operator() (PType u) const
 
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator* (RType other) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator* (const T &other) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator+ (const T &other) const
 
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator+ (RType other) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator- (const T &other) const
 
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator- (RType other) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator/ (const T &other) const
 
UnaryFilter< PType > operator< (const RType &cmp) const
 
UnaryFilter< PType > operator<= (const RType &cmp) const
 
UnaryFilter< PType > operator== (const RType &cmp) const
 
UnaryFilter< PType > operator> (const RType &cmp) const
 
UnaryFilter< PType > operator>= (const RType &cmp) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator^ (const T &other) const
 
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator^ (RType other) const
 
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator| (RType other) const
 
template<typename T >
CompareFilter< PType, RType,
std::function< RType(PType)> > 
operator| (const T &other) const
 

Detailed Description

template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
class BWAPI::CompareFilter< PType, RType, Container >

The CompareFilter is a container in which a stored function predicate returns a value.

Arithmetic and bitwise operators will return a new CompareFilter that applies the operation to the result of the original functor. If any relational operators are used, then it creates a UnaryFilter that returns the result of the operation.

Template Parameters
PTypeThe parameter type, which is the type passed into the functor.
RType(optional) The functor's return type. It is int by default.
Container(optional) Storage container for the function predicate. It is std::function<RType(PType)> by default.

Constructor & Destructor Documentation

template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
BWAPI::CompareFilter< PType, RType, Container >::CompareFilter ( const T &  predicate)

Member Function Documentation

template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
UnaryFilter<PType> BWAPI::CompareFilter< PType, RType, Container >::operator== ( const RType &  cmp) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
UnaryFilter<PType> BWAPI::CompareFilter< PType, RType, Container >::operator!= ( const RType &  cmp) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
UnaryFilter<PType> BWAPI::CompareFilter< PType, RType, Container >::operator<= ( const RType &  cmp) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
UnaryFilter<PType> BWAPI::CompareFilter< PType, RType, Container >::operator>= ( const RType &  cmp) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
UnaryFilter<PType> BWAPI::CompareFilter< PType, RType, Container >::operator< ( const RType &  cmp) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
UnaryFilter<PType> BWAPI::CompareFilter< PType, RType, Container >::operator> ( const RType &  cmp) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator+ ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator+ ( RType  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator- ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator- ( RType  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator| ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator| ( RType  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator& ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator& ( RType  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator* ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator* ( RType  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator^ ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator^ ( RType  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator/ ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
template<typename T >
CompareFilter<PType,RType,std::function<RType(PType)> > BWAPI::CompareFilter< PType, RType, Container >::operator% ( const T &  other) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
RType BWAPI::CompareFilter< PType, RType, Container >::operator() ( PType  u) const
template<typename PType, typename RType = int, class Container = std::function<RType(PType)>>
bool BWAPI::CompareFilter< PType, RType, Container >::isValid ( ) const