gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Private Attributes | List of all members
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 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 41 of file flags.hh.

Member Typedef Documentation

◆ Type

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

Definition at line 50 of file flags.hh.

Member Data Documentation

◆ _flags

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

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

Generated on Tue Jun 22 2021 15:28:38 for gem5 by doxygen 1.8.17