gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::Flags< T > Class Template Reference

Wrapper that groups a few flag bits under the same undelying container. More...

#include <flags.hh>

Public Types

typedef T Type
 

Public Member Functions

 Flags (Type flags=0)
 Initialize flags with a given value.
 
 operator const Type () const
 
const Flags< T > & operator= (T flags)
 
bool isSet (Type mask) const
 Verifies whether any bit matching the given mask is set.
 
bool allSet (Type mask) const
 Verifies whether no bits matching the given mask are set.
 
bool noneSet (Type mask) const
 Verifies whether no bits matching the given mask are set.
 
void clear ()
 Clear all flag's bits.
 
void clear (Type mask)
 Clear all flag's bits matching the given mask.
 
void set (Type mask)
 Set all flag's bits matching the given mask.
 
void set (Type mask, bool condition)
 Conditionally set or clear some bits of the flag, given a mask.
 
void replace (Type flags, Type mask)
 Replace the contents of the bits matching the mask with the corresponding bits in the provided flags.
 

Private Attributes

_flags
 The undelying container of the flags' bits.
 

Detailed Description

template<typename T>
class gem5::Flags< T >

Wrapper that groups a few flag bits under the same undelying container.

Template Parameters
TThe type of the underlying container. Must be an unsigned integer.

Definition at line 44 of file flags.hh.

Member Typedef Documentation

◆ Type

template<typename T >
typedef T gem5::Flags< T >::Type

Definition at line 53 of file flags.hh.

Member Data Documentation

◆ _flags


The documentation for this class was generated from the following file:

Generated on Tue Jun 18 2024 16:24:11 for gem5 by doxygen 1.11.0