Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <S32BUF.H>
Link against: estor.lib

Class TStreamTransfer

class TStreamTransfer;

Description

Stream transfer object.

Holds and maintains a value that represents how much data is to be transferred, or remains to be transferred, between streams.

Objects of this type are used by ReadL() and WriteL() functions of MStreamBuf.

Members

Defined in TStreamTransfer:


Construction and destruction


TStreamTransfer()

inline TStreamTransfer();

Description

Constructs a stream transfer object specifying that there is no explicit limit to the amount of data that can be transferred between streams.

The amount of data to be transferred is only limited by the streams themselves.

The arithmetical operators do not change the state of an unlimited stream transfer object.


TStreamTransfer(TInt)

inline TStreamTransfer(TInt aMaxLength);

Description

Constructs a stream transfer object specifying a length value.

This value represents the maximum amount of data that can be transferred between streams.

Parameters

TInt aMaxLength

The maximum length of data that can be transferred. In debug mode, the function raises a STORE-Stream 13 panic, if this value is negative.


TStreamTransfer(TUnlimited)

inline TStreamTransfer(TUnlimited);

Description

Constructs a stream transfer object specifying that there is no explicit limit to the amount of data that can be transferred between streams.

The amount of data to be transferred is only limited by the streams themselves.

The arithmetical operators do not change the state of an unlimited stream transfer object.

Parameters

TStreamTransfer::TUnlimited

[Top]


Member functions


operator==(TInt)const

inline TBool operator==(TInt aLength) const;

Description

Tests whether the stream transfer value is equal to the specified value.

Parameters

TInt aLength

The length to compared. In debug mode, the function raises a STORE-Stream 13 panic, if this value is negative.

Return value

TBool

True, if the stream transfer value is equal to the specified value; false, otherwise.


operator>(TInt)const

inline TBool operator>(TInt aLength) const;

Description

Tests whether the stream transfer value is greater than the specified value.

Parameters

TInt aLength

The length to compared. In debug mode, the function raises a STORE-Stream 13 panic, if this value is negative.

Return value

TBool

True, if the stream transfer value is greater than the specified value; false, otherwise.


operator-(TInt)const

inline TStreamTransfer operator-(TInt aLength) const;

Description

Subtracts the specified value from the stream transfer value.

If this stream transfer object was originally constructed as an unlimited type, i.e. using the TStreamTransfer::TStreamTransfer(TUnlimited) constructor, then this operator does not change the state of the object, and it remains an unlimited type.

Parameters

TInt aLength

The length to be subtracted. In debug mode, the function raises a STORE-Stream 13 panic, if this value is negative.

Return value

TStreamTransfer

A stream transfer object containing the result of the subtraction.


operator[](TInt)const

inline TInt operator[](TInt aMaxLength) const;

Description

Parameters

TInt aMaxLength

Return value

TInt


operator-=(TInt)

inline TStreamTransfer& operator-=(TInt aLength);

Description

Subtracts the specified value from the stream transfer value, updating this stream transfer object.

If this stream transfer object was originally constructed as an unlimited type, i.e. using the TStreamTransfer::TStreamTransfer(TUnlimited) constructor, then this operator does not change the state of the object, and it remains an unlimited type.

If this stream transfer object was not an unlimited type, then, in debug mode, the function raises a STORE-Stream 13 panic, if the result of the calculation is negative.

Parameters

TInt aLength

The length to be subtracted. In debug mode, the function raises a STORE-Stream 13 panic, if this value is negative.

Return value

TStreamTransfer &

A reference to this stream transfer object.


Left()const

inline TInt Left() const;

Description

Gets the stream transfer value.

Return value

TInt

The current stream transfer value.

[Top]


Member enumerations


Enum TUnlimited

TUnlimited

Description

An enumerator type passed to a constructor of this class to indicate that there is no explicit limit to the amount of data that can be transferred between streams. The enumeration is not used.

EUnlimited