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:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user