base: Tag API methods and variables in channel_addr.hh

Change-Id: I91c806e88f035457f93dcfcee1833d6955a07807
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32960
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Hoa Nguyen
2020-08-19 23:39:36 -07:00
parent b695e09d07
commit b1a2f9393d

View File

@@ -51,7 +51,12 @@ class ChannelAddr
public:
using Type = Addr;
/** Explicit constructor assigning a value. */
/**
* Explicit constructor assigning a value.
*
* @ingroup api_channel_addr
* @{
*/
explicit constexpr ChannelAddr(Type _a) : a(_a) { }
/** Converting back to the value type. */
@@ -131,6 +136,8 @@ class ChannelAddr
constexpr bool operator==(const ChannelAddr &b) const { return a == b.a; }
constexpr bool operator!=(const ChannelAddr &b) const { return a != b.a; }
/** @} */ // end of api_channel_addr
private:
/** Member holding the actual value. */
Type a;
@@ -143,6 +150,10 @@ class ChannelAddr
class ChannelAddrRange
{
public:
/**
* @ingroup api_channel_addr
* @{
*/
constexpr ChannelAddrRange()
: ChannelAddrRange(ChannelAddr(1), ChannelAddr(0)) {}
@@ -165,6 +176,8 @@ class ChannelAddrRange
return a >= _start && a <= _end;
}
/** @} */ // end of api_channel_addr
protected:
ChannelAddr _start;
ChannelAddr _end;
@@ -186,6 +199,9 @@ namespace std
};
}
/**
* @ingroup api_channel_addr
*/
std::ostream &operator<<(std::ostream &out, const ChannelAddr &addr);
#endif // __BASE_CHANNEL_ADDR_HH__