Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: Babitflags.h

Class TBitFlagsT

class TBitFlagsT;

Description

A simple class which manages the process of setting and clearing flags in an abstract fashion.

Members

Defined in TBitFlagsT:
Assign(), Clear(), ClearAll(), IsClear(), IsSet(), Set(), SetAll(), SetValue(), TBitFlagsT(), TBitFlagsT(), TBitFlagsT(), Toggle(), Value(), iFlags, operator=(), operator==(), operator[]()


Construction and destruction


TBitFlagsT()

inline TBitFlagsT();

Description

Default constructor - initialize all flags to zero


TBitFlagsT()

inline TBitFlagsT(T aFlags);

Description

Initialize the whole flag to a certain value

Parameters

T aFlags


TBitFlagsT()

inline TBitFlagsT(const TBitFlagsT &aFlags);

Description

Copy constructor - initialize this flag object to mirror that of aFlags.

Parameters

const TBitFlagsT &aFlags

[Top]


Member functions


SetAll()

inline void SetAll();

Description

Set all the flags


ClearAll()

inline void ClearAll();

Description

Clear all the flags


Set()

inline void Set(TInt aFlagIndex);

Description

Set a particular flag

Parameters

TInt aFlagIndex


Clear()

inline void Clear(TInt aFlagIndex);

Description

Clear a particular flag

Parameters

TInt aFlagIndex


Assign()

inline void Assign(TInt aFlagIndex, TBool aValue);

Description

Set or clear a particular flag

If aValue is 1, then the flag is set If aValue is 0, then the flag is cleared

Parameters

TInt aFlagIndex

TBool aValue


Toggle()

inline void Toggle(TInt aFlagIndex);

Description

Change the state of a particular flag. If the flag at the specified index was clear, then it becomes set, otherwise it becomes clear.

Parameters

TInt aFlagIndex


operator[]()

inline TBool operator[](TInt aFlagIndex) const;

Description

Check if a particular flag is set or not

Parameters

TInt aFlagIndex

Return value

TBool

A boolean indicating whether the specified flag is set or clear


operator=()

inline TBitFlagsT &operator=(const TBitFlagsT &aFlags);

Description

Assignment operator - assign specific value to the whole flag, replacing any existing value.

Parameters

const TBitFlagsT &aFlags

Return value

TBitFlagsT &


operator==()

inline TBool operator==(const TBitFlagsT &aFlags);

Description

Compare the value of the whole flag with a given value.

Parameters

const TBitFlagsT &aFlags

Return value

TBool

A boolean indicating whether the two flags are identical.


IsSet()

inline TBool IsSet(TInt aFlagIndex) const;

Description

Check if a particular flag is set

Parameters

TInt aFlagIndex

Return value

TBool


IsClear()

inline TBool IsClear(TInt aFlagIndex) const;

Description

Check if a particular flag is clear

Parameters

TInt aFlagIndex

Return value

TBool


Value()

inline T Value() const;

Description

Access the underlying value of the flag.

Return value

T


SetValue()

inline void SetValue(T aFlags);

Description

Assign a new value (directly) to this flag object. Replaces any existing individual flag settings.

Parameters

T aFlags

[Top]


Member data


iFlags

T iFlags;

Description