4#include "phproperty.hpp"
11 template<
class MaskT,
class FlagT, MaskT Mask = ~(MaskT())>
14 template<
class W
idgetClassT,
class ArgumentT, ArgumentT ArgumentID>
17 typedef MaskT mask_type;
18 typedef phproperty<mask_type> ph_property_t;
19 typedef typename ph_property_t::template bind<WidgetClassT, ArgumentT, ArgumentID> ph_bind_t;
24 typedef cppbitmasks::bitmask<MaskT, FlagT, Mask> value_type;
26 bind_internal(WidgetClassT *parent) :
31 void set(value_type value)
37 value_type get()
const
40 mask_type mask = _value.get();
41 std::memcpy(&bm, &mask,
sizeof(MaskT));
46 bool has(value_type value)
const
48 return get().has(value);
52 operator value_type()
const {
return get(); }
54 operator mask_type()
const {
return get(); }
57 bind_internal &operator=(value_type value) { set(value);
return *
this; }
60 value_type operator()(
void)
const {
return get(); }
63 void operator()(value_type value) { set(value);
return *
this; }
67 template<
class W
idgetClassT,
class ArgumentT, ArgumentT ArgumentID>
69 public bind_internal<WidgetClassT, ArgumentT, ArgumentID>
71 typedef bind_internal<WidgetClassT, ArgumentT, ArgumentID> internal_bind_t;
74 bind(WidgetClassT *parent) :
75 internal_bind_t(parent)
78 using internal_bind_t::operator=;