Urho3D
Public Types | Public Member Functions | Protected Attributes | List of all members
Urho3D::FlagSet< E > Class Template Reference

A set of flags defined by an Enum. More...

#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/Container/FlagSet.h>

Public Types

using Enum = E
 Enum type.
 
using Integer = typename std::underlying_type< Enum >::type
 Integer type.
 

Public Member Functions

 FlagSet (Integer value)
 Ctor by integer.
 
 FlagSet ()=default
 Empty constructor.
 
 FlagSet (const FlagSet &another)=default
 Copy constructor.
 
 FlagSet (const Enum value)
 Construct from Enum value.
 
FlagSetoperator= (const FlagSet &rhs)=default
 Assignment operator from flagset.
 
FlagSetoperator&= (const Enum value)
 Bitwise AND against Enum value.
 
FlagSetoperator&= (const FlagSet value)
 Bitwise AND against flagset value.
 
FlagSetoperator|= (const Enum value)
 Bitwise OR against Enum value.
 
FlagSetoperator|= (const FlagSet value)
 Bitwise OR against flagset value.
 
FlagSetoperator^= (const Enum value)
 Bitwise XOR against Enum value.
 
FlagSetoperator^= (const FlagSet value)
 Bitwise XOR against flagset value.
 
FlagSet operator& (const Enum value) const
 Bitwise AND against Enum value.
 
FlagSet operator& (const FlagSet value) const
 Bitwise AND against flagset value.
 
FlagSet operator| (const Enum value) const
 Bitwise OR against Enum value.
 
FlagSet operator| (const FlagSet value) const
 Bitwise OR against flagset value.
 
FlagSet operator^ (const Enum value) const
 Bitwise XOR against Enum value.
 
FlagSet operator^ (const FlagSet value) const
 Bitwise XOR against flagset value.
 
FlagSet operator~ () const
 Bitwise negation.
 
bool operator! () const
 Boolean negation.
 
 operator bool () const
 Returns true if any flag is set.
 
 operator Integer () const
 Cast to underlying type of enum.
 
 operator Enum () const
 Cast to enum value.
 
 operator double () const
 Cast to double. Used by Lua bindings.
 
bool operator== (Enum rhs) const
 Equality check against enum value.
 
bool operator== (FlagSet rhs) const
 Equality check against another flagset.
 
bool operator!= (Enum rhs) const
 Non-equality check against enum value.
 
bool operator!= (FlagSet rhs) const
 Non-equality check against another flagset value.
 
bool Test (const Enum value) const
 Return true if specified enum value is set.
 
bool Test (const Integer flags) const
 Return true if specified bits are set.
 
Integer AsInteger () const
 Return underlying integer (constant).
 
IntegerAsInteger ()
 Return underlying integer (non-constant).
 
hash32 ToHash () const
 Return hash value.
 

Protected Attributes

Integer value_ = 0
 Value.
 

Detailed Description

template<class E>
class Urho3D::FlagSet< E >

A set of flags defined by an Enum.


The documentation for this class was generated from the following file: