modm API documentation
|
#include <modm/architecture/interface/register.hpp>
Public Typedefs | |
typedef T | UnderlyingType |
The integer type internally used to represent the register. | |
Public Member Functions | |
constexpr | FlagsGroup () |
default constructor initializes value to zero | |
constexpr | FlagsGroup (FlagsGroup const &o) |
copy constructor | |
constexpr | FlagsGroup (typename T::UnderlyingType value) |
explicit underlying type constructor | |
constexpr | FlagsGroup (typename T::EnumType value) |
enum type constructor | |
constexpr | FlagsGroup (::modm::FlagsOperators< typename T::EnumType, typename T::UnderlyingType > value) |
Flags operators and Flags constructor. | |
constexpr | operator bool () const |
constexpr bool | operator! () const |
Returns true if value is zero. | |
Public Attributes | |
UnderlyingType | value |
The underlying integer value. | |
Class for grouping several Flags classes together.
This variadic template class allows you to create a type which provides constructor overloads for the provided types.
This will allow you to cast the passed Flags classes into one class, but not other classes. Notice that this cast destroys type information (naturally) and therefore you cannot use any of the Flags classes type-safe operator overloads. The same reasoning applies here as in the Register class.
T... | the Flags classes to be grouped. Must all have the same underlying types. |
|
inheritedinlineexplicitconstexpr |
Returns true
if value
is non-zero
The compiler will allow implicit conversions to bool in the following contexts: