ContentAccess::CBitset Class Reference

class ContentAccess::CBitset : public CBase

A container of bits.

The bits may be retrieved, set, and unset.

Inherits from

  • ContentAccess::CBitset
Public Member Functions
~CBitset()
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C voidInvert()
IMPORT_C TBoolIsSet(TInt)
IMPORT_C TBoolIsSetList(TInt, ...)
IMPORT_C TIntMaxBits()
IMPORT_C CBitset *NewL(TInt)
IMPORT_C CBitset *NewL(const CBitset &)
IMPORT_C CBitset *NewLC(TInt)
IMPORT_C CBitset *NewLC(const CBitset &)
IMPORT_C voidReset()
IMPORT_C voidSet(TInt)
IMPORT_C voidSetAll()
IMPORT_C voidSetListL(TInt, ...)
IMPORT_C voidUnset(TInt)
TBool operator!=(const CBitset &)
IMPORT_C CBitset &operator=(const CBitset &)
IMPORT_C TBooloperator==(const CBitset &)
Private Member Functions
CBitset()
CBitset(const CBitset &)
voidConstructL(TInt)
voidConstructL(const CBitset &)
voidIdentifyBit(TInt, TInt &, TInt &)
TBool ValidBit(TInt)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TUint8 *iBitSet
TInt iMaxBits
TInt iWidth

Constructor & Destructor Documentation

CBitset()

CBitset()[private]

CBitset(const CBitset &)

CBitset(const CBitset &aSource)[private]

Parameters

const CBitset & aSource

~CBitset()

~CBitset()[virtual]

Member Functions Documentation

ConstructL(TInt)

voidConstructL(TIntaMaxId)[private]

Parameters

TInt aMaxId

ConstructL(const CBitset &)

voidConstructL(const CBitset &aSource)[private]

Parameters

const CBitset & aSource

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalisation function that allows this object to be marshalled prior to being shipped over a client-server interface by related glue-code.

Parameters

RWriteStream & aStreamOn return, the .....

IdentifyBit(TInt, TInt &, TInt &)

voidIdentifyBit(TIntaBitId,
TInt &aByte,
TInt &aBitInByte
)const [private]

Converts from a bit ID to a byte and bit within one of the bit-field sets.

Parameters

TInt aBitIdThe bit ID being mapped.
TInt & aByteModified to contain the resultant byte number.
TInt & aBitInByteModified to contain the resultant bit number within the byte.

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalisation function that allows this object to to be unmarshalled after transfer across a client-server interface.

Parameters

RReadStream & aStreamOn return, the .....

Invert()

IMPORT_C voidInvert()

Inverts all bits in the set.

IsSet(TInt)

IMPORT_C TBoolIsSet(TIntaBit)const

Queries the single bit of the set.

panic
CafUtils 0 if aBit is out of range

Parameters

TInt aBitThe bit that requires testing.

IsSetList(TInt, ...)

IMPORT_C TBoolIsSetList(TIntaItems,
...
)const

Allows a caller to query multiple bits in the bitset.

Parameters

TInt aItemsThe number of items following in the parameter list.
...

MaxBits()

IMPORT_C TIntMaxBits()const

Gets the maximum number of settable/gettable bits.

NewL(TInt)

IMPORT_C CBitset *NewL(TIntaMaxBits)[static]

Constructs a new bitset object with a maximum number of bits.

Parameters

TInt aMaxBitsThe maximum number of bits this object may contain.

NewL(const CBitset &)

IMPORT_C CBitset *NewL(const CBitset &aSource)[static]

Copy constructor

Parameters

const CBitset & aSourceThe object to be copied from.

NewLC(TInt)

IMPORT_C CBitset *NewLC(TIntaMaxBits)[static]

Parameters

TInt aMaxBits

NewLC(const CBitset &)

IMPORT_C CBitset *NewLC(const CBitset &aSource)[static]

Parameters

const CBitset & aSource

Reset()

IMPORT_C voidReset()

Resets the entire bitset to zero.

Set(TInt)

IMPORT_C voidSet(TIntaBit)
Sets the 'aBit'th bit of the set.
panic
CafUtils 0 if aBit is out of range

Parameters

TInt aBitthe bit to set

SetAll()

IMPORT_C voidSetAll()

Sets all bits in the set to one.

SetListL(TInt, ...)

IMPORT_C voidSetListL(TIntaItems,
...
)

Allows a caller to set multiple bits in the bitset by allowing a variable-length parameter list.

Parameters

TInt aItemsThe number of items following in the parameter list.
...

Unset(TInt)

IMPORT_C voidUnset(TIntaBit)
Clears the 'aBit'th bit of the set.
panic
CafUtils 0 if aBit is out of range

Parameters

TInt aBitthe bit to clear

ValidBit(TInt)

TBool ValidBit(TIntaAttributeId)const [private, inline]

Tests whether the bit value is valid for this bitset.

Parameters

TInt aAttributeIdThe .....

operator!=(const CBitset &)

TBool operator!=(const CBitset &aSource)const [inline]

Parameters

const CBitset & aSource

operator=(const CBitset &)

IMPORT_C CBitset &operator=(const CBitset &aSource)

Assignment of a bitset.

Note that an assignment of a longer bitset to a shorter bitset will result in the shorter bitset being expanded. This function may leave.

Parameters

const CBitset & aSourceThe bitset ......

operator==(const CBitset &)

IMPORT_C TBooloperator==(const CBitset &aSource)const

Allows comparisons of CBitsets.

Note that it is possible to compare a longer bitset with a shorter one. However, only the relevant (low-order) bits are compared.

Parameters

const CBitset & aSourceThe bitset .....

Member Data Documentation

TUint8 * iBitSet

TUint8 *iBitSet[private]

The actual set of bits

TInt iMaxBits

TInt iMaxBits[private]

The maximum number of bits in this bitset

TInt iWidth

TInt iWidth[private]

The number of bytes required to allow for maxbits