From d66e1d272f34b6bed893a8ffb647f69728596d34 Mon Sep 17 00:00:00 2001 From: Hoa Nguyen Date: Thu, 20 Aug 2020 13:54:34 -0700 Subject: [PATCH] base: Tag API methods in flags.hh Change-Id: I12eb94b43e190ee46f82fba7d2a3ef6c29fdee80 Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33035 Maintainer: Bobby R. Bruce Tested-by: kokoro Reviewed-by: Bobby R. Bruce Reviewed-by: Jason Lowe-Power --- src/base/flags.hh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/base/flags.hh b/src/base/flags.hh index 0b0a80390..c9525fae2 100644 --- a/src/base/flags.hh +++ b/src/base/flags.hh @@ -37,11 +37,23 @@ class Flags 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 const Flags & operator=(const Flags &flags) @@ -50,6 +62,9 @@ class Flags return *this; } + /** + * @ingroup api_flags + */ const Flags & operator=(T flags) { @@ -57,6 +72,10 @@ class Flags return *this; } + /** + * @ingroup api_flags + * @{ + */ bool isSet() const { return _flags; } bool isSet(Type flags) const { return (_flags & flags); } bool allSet() const { return !(~_flags); } @@ -72,6 +91,7 @@ class Flags { _flags = (_flags & ~mask) | (flags & mask); } + /** @} */ // end of api_flags }; #endif // __BASE_FLAGS_HH__ -- 2.30.2