class TBitFlagsT |
A simple class which manages the process of setting and clearing flags in an abstract fashion.
Public Member Functions | |
---|---|
TBitFlagsT() | |
TBitFlagsT(T) | |
TBitFlagsT(const TBitFlagsT &) | |
void | Assign(TInt, TBool) |
void | Clear(TInt) |
void | ClearAll() |
TBool | IsClear(TInt) |
TBool | IsSet(TInt) |
void | Set(TInt) |
void | SetAll() |
void | SetValue(T) |
void | Toggle(TInt) |
T | Value() |
TBitFlagsT & | operator=(const TBitFlagsT &) |
TBool | operator==(const TBitFlagsT &) |
TBool | operator[](TInt) |
Private Member Functions | |
---|---|
T | FlagMask(TInt) |
Public Attributes | |
---|---|
T | iFlags |
TBitFlagsT | ( | T | aFlags | ) | [inline] |
Initialize the whole flag to a certain value
T aFlags |
TBitFlagsT | ( | const TBitFlagsT & | aFlags | ) | [inline] |
Copy constructor - initialize this flag object to mirror that of aFlags.
const TBitFlagsT & aFlags |
void | Assign | ( | TInt | aFlagIndex, |
TBool | aValue | |||
) | [inline] |
Set or clear a particular flag
If aValue is 1, then the flag is set If aValue is 0, then the flag is cleared
T | FlagMask | ( | TInt | aFlagIndex | ) | const [private, inline] |
Generate a mask for a particular flag
TInt aFlagIndex |
TBool | IsClear | ( | TInt | aFlagIndex | ) | const [inline] |
Check if a particular flag is clear
TInt aFlagIndex |
TBool | IsSet | ( | TInt | aFlagIndex | ) | const [inline] |
Check if a particular flag is set
TInt aFlagIndex |
void | SetValue | ( | T | aFlags | ) | [inline] |
Assign a new value (directly) to this flag object. Replaces any existing individual flag settings.
T aFlags |
void | Toggle | ( | TInt | aFlagIndex | ) | [inline] |
Change the state of a particular flag. If the flag at the specified index was clear, then it becomes set, otherwise it becomes clear.
TInt aFlagIndex |
TBitFlagsT & | operator= | ( | const TBitFlagsT & | aFlags | ) | [inline] |
Assignment operator - assign specific value to the whole flag, replacing any existing value.
const TBitFlagsT & aFlags |
TBool | operator== | ( | const TBitFlagsT & | aFlags | ) | [inline] |
Compare the value of the whole flag with a given value.
A boolean indicating whether the two flags are identical.
const TBitFlagsT & aFlags |
TBool | operator[] | ( | TInt | aFlagIndex | ) | const [inline] |
Check if a particular flag is set or not
A boolean indicating whether the specified flag is set or clear
TInt aFlagIndex |