|
| SC2Type () |
| Default constructor.
|
|
| SC2Type (uint32_t type_id) |
| Construct from an integer, corresponds to the enum value.
|
|
| SC2Type (T type_id) |
| Construct from the enum.
|
|
bool | operator== (SC2Type< T > type_id) const |
|
bool | operator== (T type_id) const |
|
bool | operator== (uint32_t type_id) const |
|
bool | operator== (int type_id) const |
|
bool | operator!= (SC2Type< T > type_id) const |
|
bool | operator!= (T type_id) const |
|
bool | operator!= (uint32_t type_id) const |
|
bool | operator!= (int type_id) const |
|
bool | operator< (const SC2Type< T > &other) const |
| Test comparison.
|
|
| operator uint32_t () const |
| Cast to integer.
|
|
| operator T () const |
| Cast to enum type.
|
|
bool | IsValid () const |
|
std::string | to_string () const |
|
T | ToType () const |
|
template<class T>
class sc2::SC2Type< T >
Template class for defining common game enum types. The template parameter is the enum. This class allows for seamless conversion between enum types and integers, while maintaining strong typing. This means, for example, that a unit type ID can be converted back and forth from an integer, but can't be used when another type ID, e.g., an ability ID, is required as a parameter.