File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515/* **************************************/ REACT_IMPL_BEGIN /* *************************************/
1616
17+ // /////////////////////////////////////////////////////////////////////////////////////////////////
18+ // / BitField
19+ // /////////////////////////////////////////////////////////////////////////////////////////////////
20+ template <typename T>
21+ class EnumFlags
22+ {
23+ public:
24+ using FlagsT = typename std::underlying_type<T>::type;
25+
26+ template <T x>
27+ void Set () { flags_ |= 1 << x; }
28+
29+ template <T x>
30+ void Clear () { flags_ &= ~(1 << x); }
31+
32+ template <T x>
33+ bool Test () const { return (flags_ & (1 << x)) != 0 ; }
34+
35+ private:
36+ FlagsT flags_ = 0 ;
37+ };
38+
1739// /////////////////////////////////////////////////////////////////////////////////////////////////
1840// / NodeVector
1941// /////////////////////////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments