ContentAccess::CBitset Class Reference

class ContentAccess::CBitset : public CBase

A container of bits.

The bits may be retrieved, set, and unset.

Inherits from

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)

void ConstructL ( TInt aMaxId ) [private]

Parameters

TInt aMaxId

ConstructL(const CBitset &)

void ConstructL ( const CBitset & aSource ) [private]

Parameters

const CBitset & aSource

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( 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 & aStream On return, the .....

IdentifyBit(TInt, TInt &, TInt &)

void IdentifyBit ( TInt aBitId,
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 aBitId The bit ID being mapped.
TInt & aByte Modified to contain the resultant byte number.
TInt & aBitInByte Modified to contain the resultant bit number within the byte.

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

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

Parameters

RReadStream & aStream On return, the .....

Invert()

IMPORT_C void Invert ( )

Inverts all bits in the set.

IsSet(TInt)

IMPORT_C TBool IsSet ( TInt aBit ) const

Queries the single bit of the set.

panic
CafUtils 0 if aBit is out of range

Parameters

TInt aBit The bit that requires testing.

IsSetList(TInt, ...)

IMPORT_C TBool IsSetList ( TInt aItems,
...
) const

Allows a caller to query multiple bits in the bitset.

Parameters

TInt aItems The number of items following in the parameter list.
...

MaxBits()

IMPORT_C TInt MaxBits ( ) const

Gets the maximum number of settable/gettable bits.

NewL(TInt)

IMPORT_C CBitset * NewL ( TInt aMaxBits ) [static]

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

Parameters

TInt aMaxBits The maximum number of bits this object may contain.

NewL(const CBitset &)

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

Copy constructor

Parameters

const CBitset & aSource The object to be copied from.

NewLC(TInt)

IMPORT_C CBitset * NewLC ( TInt aMaxBits ) [static]

Parameters

TInt aMaxBits

NewLC(const CBitset &)

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

Parameters

const CBitset & aSource

Reset()

IMPORT_C void Reset ( )

Resets the entire bitset to zero.

Set(TInt)

IMPORT_C void Set ( TInt aBit )
Sets the 'aBit'th bit of the set.
panic
CafUtils 0 if aBit is out of range

Parameters

TInt aBit the bit to set

SetAll()

IMPORT_C void SetAll ( )

Sets all bits in the set to one.

SetListL(TInt, ...)

IMPORT_C void SetListL ( TInt aItems,
...
)

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

Parameters

TInt aItems The number of items following in the parameter list.
...

Unset(TInt)

IMPORT_C void Unset ( TInt aBit )
Clears the 'aBit'th bit of the set.
panic
CafUtils 0 if aBit is out of range

Parameters

TInt aBit the bit to clear

ValidBit(TInt)

TBool ValidBit ( TInt aAttributeId ) const [private, inline]

Tests whether the bit value is valid for this bitset.

Parameters

TInt aAttributeId The .....

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 & aSource The bitset ......

operator==(const CBitset &)

IMPORT_C TBool operator== ( 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 & aSource The 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