Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: s32strm.h
Link against: estor.lib

Class TCardinality

TCardinality

Support

Supported from 5.0

Description

Compact stream format for positive integer values in the range 0 to 536,870,911 ((2^29)-1). Values in the range 0-127 are stored in a single byte, 128-16383 in two bytes and other values in 4 bytes.

The class provides conversion to and from TInt, and both externalization and internalization functions. It is used to significant effect within Symbian code.

Defined in TCardinality:
ExternalizeL(), InternalizeL(), TCardinality(), TInt()

See also:


Construction and destruction


TCardinality()

TCardinality(TInt aCount);

Description

Constructs the object with the specified value.

Parameters

TInt aCount

The value for this object.

[Top]


Member functions


ExternalizeL()

void ExternalizeL(RWriteStream& aStream) const;

Description

Externalises this object to a write stream.

The existence of this function means that the standard templated operator<<() can be used to externalise objects of this class.

Parameters

RWriteStream& aStream

Stream to which the object should be externalised.

See also:


InternalizeL()

void InternalizeL(RReadStream& aStream);

Description

Internalizes this object from a read stream.

The existence of this function means that the standard templated operator>>() can be used to internalise objects of this class.

Parameters

RReadStream& aStream

Stream store from which the objet is to be internalised.

Leave codes

 

This function may leave if there is a problem reading from the stream, or if internalisation causes an out of memory error.

See also:


TInt()

operator TInt() const;

Description

Returns the integer stored within this object.