23 #ifndef _BASE_FLAG_HPP_ 24 #define _BASE_FLAG_HPP_ 32 inline flag (
const T &init_flags);
37 inline flag &
set (
const T &flags);
39 inline bool is_set (
const T &flags);
44 static inline void set_flag (T &where_to_set,
const T &what_to_set);
45 static inline void clear_flag (T &where_to_clear,
const T &what_to_clear);
46 static inline bool is_flag_set (
const T &where_to_check,
const T &what_to_check);
47 static inline bool is_flag_all_set (
const T &where_to_check,
const T &what_to_check);
48 static inline bool is_flag_any_set (
const T &where_to_check,
const T &what_to_check);
117 return (
m_flags & flags) == flags;
137 where_to_set = where_to_set | what_to_set;
144 where_to_clear = where_to_clear & (~what_to_clear);
158 return (where_to_check & what_to_check) == what_to_check;
164 return (where_to_check & what_to_check) != 0;
static void clear_flag(T &where_to_clear, const T &what_to_clear)
bool is_all_set(const T &flags)
static bool is_flag_any_set(const T &where_to_check, const T &what_to_check)
bool is_any_set(const T &flags)
static void set_flag(T &where_to_set, const T &what_to_set)
static bool is_flag_all_set(const T &where_to_check, const T &what_to_check)
flag & clear(const T &flags)
flag & operator=(const flag< T > &other)
static bool is_flag_set(const T &where_to_check, const T &what_to_check)
flag & set(const T &flags)
bool is_set(const T &flags)