Prepare MainVolume
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
#include "bits.hpp"
|
||||
|
||||
#define io_class__2option_map(option0, option1, bit_num) \
|
||||
constexpr void set_##option0() { \
|
||||
constexpr auto& set_##option0() { \
|
||||
this->raw_value = bit::clear(this->raw_value, bit_num); \
|
||||
return *this;\
|
||||
} \
|
||||
\
|
||||
constexpr void set_##option1() { \
|
||||
constexpr auto& set_##option1() { \
|
||||
this->raw_value = bit::set(this->raw_value, bit_num); \
|
||||
return *this; \
|
||||
}
|
||||
|
||||
#define io_class__2option_map_getter(type, option0, option1, name, bit_num) \
|
||||
@@ -20,4 +22,9 @@
|
||||
return static_cast<type>(bit::is_set(this->raw_value, bit_num)); \
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static constexpr void io_class__volatile_assign(volatile T& dst, const T& src) {
|
||||
dst.raw_value = src.raw_value;
|
||||
}
|
||||
|
||||
#endif //!__JABYENGINE_IO_CLASS_HELPER_HPP__
|
Reference in New Issue
Block a user