Change-Id: I12eb94b43e190ee46f82fba7d2a3ef6c29fdee80
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33035
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
public:
typedef T Type;
+
+ /**
+ * @ingroup api_flags
+ * @{
+ */
Flags() : _flags(0) {}
Flags(Type flags) : _flags(flags) {}
+ /** @} */ // end of api_flags
+ /**
+ * @ingroup api_flags
+ */
operator const Type() const { return _flags; }
+ /**
+ * @ingroup api_flags
+ */
template <typename U>
const Flags<T> &
operator=(const Flags<U> &flags)
return *this;
}
+ /**
+ * @ingroup api_flags
+ */
const Flags<T> &
operator=(T flags)
{
return *this;
}
+ /**
+ * @ingroup api_flags
+ * @{
+ */
bool isSet() const { return _flags; }
bool isSet(Type flags) const { return (_flags & flags); }
bool allSet() const { return !(~_flags); }
{
_flags = (_flags & ~mask) | (flags & mask);
}
+ /** @} */ // end of api_flags
};
#endif // __BASE_FLAGS_HH__