Hoa Nguyen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/32958 )

Change subject: base: Tag API methods and variables in bitunion.hh
......................................................................

base: Tag API methods and variables in bitunion.hh

Change-Id: I322645801e9832014f54d4ed633796b082b06c6b
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
---
M src/base/bitunion.hh
1 file changed, 65 insertions(+), 17 deletions(-)



diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 7af053e..b8e4491 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -117,11 +117,25 @@
     using typename Impl::Type;

   public:
+    /**
+     * @ingroup api_bitunion
+     * @{
+     */
     BitfieldType() = default;
     BitfieldType(const BitfieldType &) = default;
+    /** @} */ // end of api_bitunion

+    /**
+     * @ingroup api_bitunion
+     */
     operator Type () const { return Impl::operator Type(); }
+    /**
+     * @ingroup api_bitunion
+     */
     Type operator=(const Type val) { return Impl::operator=(val); }
+    /**
+     * @ingroup api_bitunion
+     */
     Type
     operator=(BitfieldType<Base> const & other)
     {
@@ -321,10 +335,14 @@
         union { \
             type __storage;

-//This closes off the class and union started by the above macro. It is
-//followed by a typedef which makes "name" refer to a BitfieldOperator
-//class inheriting from the class and union just defined, which completes
-//building up the type for the user.
+/**
+ * This closes off the class and union started by the above macro. It is
+ * followed by a typedef which makes "name" refer to a BitfieldOperator
+ * class inheriting from the class and union just defined, which completes
+ * building up the type for the user.
+ *
+ * @ingroup api_bitunion
+ */
 #define EndBitUnion(name) \
         }; \
     }; \
@@ -343,11 +361,15 @@
         union { \
             fieldType<__VA_ARGS__> __storage;

-//This closes off the union created above and gives it a name. Unlike the top
-//level BitUnion, we're interested in creating an object instead of a type.
-//The operators are defined in the macro itself instead of a class for
-//technical reasons. If someone determines a way to move them to one, please
-//do so.
+/**
+ * This closes off the union created above and gives it a name. Unlike the top + * level BitUnion, we're interested in creating an object instead of a type.
+ * The operators are defined in the macro itself instead of a class for
+ * technical reasons. If someone determines a way to move them to one, please
+ * do so.
+ *
+ * @ingroup api_bitunion
+ */
 #define EndSubBitUnion(name) \
         }; \
         inline operator __StorageType () const \
@@ -357,20 +379,36 @@
         { return __storage = _storage;} \
     } name;

-//Regular bitfields
-//These define macros for read/write regular bitfield based subbitfields.
+/**
+ * Regular bitfields
+ * These define macros for read/write regular bitfield based subbitfields.
+ *
+ * @ingroup api_bitunion
+ */
 #define SubBitUnion(name, first, last) \
     __SubBitUnion(name, Bitfield, first, last)

-//Regular bitfields
-//These define macros for read/write regular bitfield based subbitfields.
+/**
+ * Regular bitfields
+ * These define macros for read/write regular bitfield based subbitfields.
+ *
+ * @ingroup api_bitunion
+ */
 #define SignedSubBitUnion(name, first, last) \
     __SubBitUnion(name, SignedBitfield, first, last)

-//Use this to define an arbitrary type overlayed with bitfields.
+/**
+ * Use this to define an arbitrary type overlayed with bitfields.
+ *
+ * @ingroup api_bitunion
+ */
 #define BitUnion(type, name) __BitUnion(type, name)

-//Use this to define conveniently sized values overlayed with bitfields.
+/**
+ * Use this to define conveniently sized values overlayed with bitfields.
+ *
+ * @ingroup api_bitunion
+ */
 #define BitUnion64(name) __BitUnion(uint64_t, name)
 #define BitUnion32(name) __BitUnion(uint32_t, name)
 #define BitUnion16(name) __BitUnion(uint16_t, name)
@@ -392,6 +430,9 @@

 //Also, BitUnionBaseType can be used on a BitUnion type directly.

+/**
+ * @ingroup api_bitunion
+ */
 template <typename T>
 using BitUnionType = BitfieldBackend::BitUnionOperators<T>;

@@ -410,6 +451,9 @@
     };
 }

+/**
+ * @ingroup api_bitunion
+ */
 template <typename T>
using BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType<T>::Type;

@@ -460,8 +504,12 @@
     }
 }

-//A default << operator which casts a bitunion to its underlying type and
-//passes it to BitfieldBackend::bitfieldBackendPrinter.
+/**
+ * A default << operator which casts a bitunion to its underlying type and
+ * passes it to BitfieldBackend::bitfieldBackendPrinter.
+ *
+ * @ingroup api_bitunion
+ */
 template <typename T>
 std::ostream &
 operator << (std::ostream &os, const BitUnionType<T> &bu)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32958
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I322645801e9832014f54d4ed633796b082b06c6b
Gerrit-Change-Number: 32958
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to