playrho::FlagGuard< T > Class Template Reference
Flag guard type. More...
#include <FlagGuard.hpp>
Public Member Functions | |
FlagGuard (T &flag, T value) | |
Initializing constructor. More... | |
FlagGuard (const FlagGuard< T > &value)=default | |
Copy constructor. More... | |
FlagGuard (FlagGuard< T > &&value) noexcept=default | |
Move constructor. More... | |
FlagGuard< T > & | operator= (const FlagGuard< T > &value)=default |
Copy assignment operator. More... | |
FlagGuard< T > & | operator= (FlagGuard< T > &&value) noexcept=default |
Move assignment operator. More... | |
~FlagGuard () noexcept | |
Destructor. More... | |
FlagGuard ()=delete | |
Detailed Description
template<typename T>
class playrho::FlagGuard< T >
Flag guard type.
Definition at line 30 of file FlagGuard.hpp.
Constructor & Destructor Documentation
◆ FlagGuard() [1/4]
template<typename T >
|
inline |
Initializing constructor.
Sets the given flag variable to the bitwise or of it with the given value and then unsets those bits on destruction of this instance.
- Parameters
-
flag Flag variable to set until the destruction of this instance. value Bit value to or with the flag variable on construction.
Definition at line 38 of file FlagGuard.hpp.
◆ FlagGuard() [2/4]
template<typename T >
|
default |
Copy constructor.
◆ FlagGuard() [3/4]
template<typename T >
|
defaultnoexcept |
Move constructor.
◆ ~FlagGuard()
template<typename T >
|
inlinenoexcept |
Destructor.
Unsets the bits that were set on construction.
Definition at line 58 of file FlagGuard.hpp.
◆ FlagGuard() [4/4]
template<typename T >
|
delete |
Member Function Documentation
◆ operator=() [1/2]
template<typename T >
|
default |
Copy assignment operator.
◆ operator=() [2/2]
template<typename T >
|
defaultnoexcept |
Move assignment operator.
The documentation for this class was generated from the following file:
- Common/FlagGuard.hpp