gem5  v21.1.0.2
Public Types | Private Attributes | List of all members
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. More...
 
 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. More...
 
bool allSet (Type mask) const
 Verifies whether no bits matching the given mask are set. More...
 
bool noneSet (Type mask) const
 Verifies whether no bits matching the given mask are set. More...
 
void clear ()
 Clear all flag's bits. More...
 
void clear (Type mask)
 Clear all flag's bits matching the given mask. More...
 
void set (Type mask)
 Set all flag's bits matching the given mask. More...
 
void set (Type mask, bool condition)
 Conditionally set or clear some bits of the flag, given a mask. More...
 
void replace (Type flags, Type mask)
 Replace the contents of the bits matching the mask with the corresponding bits in the provided flags. More...
 

Private Attributes

_flags
 The undelying container of the flags' bits. More...
 

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

template<typename T >
T gem5::Flags< T >::_flags
private

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

Generated on Tue Sep 21 2021 12:27:35 for gem5 by doxygen 1.8.17