![]() |
chigraph
master
Systems programming language written for beginners in LLVM
|
A template class for type-safe flags. More...
#include <chi/Support/Flags.hpp>
Public Member Functions | |
Flags ()=default | |
Default constructor. | |
Flags (Enum e) | |
Constructor from an Enum type. More... | |
Flags (const Flags &fl)=default | |
Copy constructor. More... | |
Flags (Flags &&fl)=default | |
Move constructor. More... | |
Flags | operator & (const Flags &rhs) const |
Bitwise AND. More... | |
Flags & | operator &= (const Flags &rhs) |
Bitwise AND assignment. More... | |
operator bool () const | |
Check if the flags object isn't set to zero Useful for use after a & More... | |
bool | operator! () const |
See if one Flags object isn't equal to the other. More... | |
Flags & | operator= (const Flags &fl)=default |
Copy assignment. More... | |
Flags & | operator= (Flags &&fl)=default |
Move assignment. More... | |
bool | operator== (const Flags &rhs) const |
See if one Flags object is equal to the other. More... | |
Flags | operator| (const Flags &rhs) const |
Bitwise OR. More... | |
Flags & | operator|= (const Flags &rhs) |
Bitwise OR assignment. More... | |
A template class for type-safe flags.
Usage:
|
inline |
Constructor from an Enum
type.
e | The enum to copy from |
Definition at line 34 of file Flags.hpp.
References chi::Flags< Enum >::Flags(), and chi::Flags< Enum >::operator=().
|
default |
Copy constructor.
fl | The Flags object to copy from |
|
default |
Move constructor.
fl | The Flags object to move from |
|
inline |
|
inline |
Bitwise AND assignment.
rhs | The Flags obejct to AND *this with |
*this
Definition at line 89 of file Flags.hpp.
References chi::Flags< Enum >::Flags().
|
inlineexplicit |
|
inline |
|
default |
Copy assignment.
fl | The Flags object to copy from |
*this
Referenced by chi::Flags< Enum >::Flags().
|
default |
|
inline |
|
inline |
|
inline |