TStreamPos Class Reference

#include <s32buf.h>

Link against: eposprvtyp.lib

class TStreamPos

Detailed Description

Holds the position of the read or write mark within a seekable stream.

Position is the offset from the beginning of a seekable stream. The class provides convenient operators for performing arithmetic on the offset value and for doing comparisons between stream position objects.

It can be considered as an absolute stream position.

Objects of this type are usually created as a result of calling MStreamBuf::SeekL() or MStreamBuf::TellL(); they allow a program to remember the current read position in a stream buffer and reset it to the same location later.

See also: MStreamBuf::SeekL() MStreamBuf::TellL()

Constructor & Destructor Documentation

TStreamPos ( )

TStreamPos()[inline]

Constructs an empty stream position object.

TStreamPos ( TInt )

TStreamPos(TIntanOffset)[inline]

Constructs the stream position object from the specified value.

ParameterDescription
anOffsetThe position value.

Member Function Documentation

Offset ( )

TInt Offset()const [inline]

Gets the stream position value.

Returns: The stream position value.

operator!= ( TStreamPos )

TBool operator!=(TStreamPosaPos)const [inline]

Tests whether the stream position is not equal to the specified stream position.

ParameterDescription
aPosThe stream position to be compared.

Returns: True, if this object's stream position value is not equal to the specified stream position's value; false, otherwise.

operator+ ( TInt )

TStreamPos operator+(TIntanOffset)const [inline]

Gets a stream position object that holds the result of adding the specified value to this object's stream position value.

ParameterDescription
anOffsetThe value to be added.

Returns: The stream position object holding the result of the calculation.

operator+= ( TInt )

TStreamPos &operator+=(TIntanOffset)[inline]

Adds the specified value to this stream position object.

ParameterDescription
anOffsetThe value to be added.

Returns: A reference to this stream position object.

operator- ( TStreamPos )

TInt operator-(TStreamPosaPos)const [inline]

Gets the result of subtracting the specified stream position value from this object's stream position value.

ParameterDescription
aPosThe stream position whose value is to be subtracted.

Returns: The result of the calculation.

operator- ( TInt )

TStreamPos operator-(TIntanOffset)const [inline]

Gets a stream position object that holds the result of subtracting the specified value from this object's stream position value.

ParameterDescription
anOffsetThe value to be subtracted.

Returns: The stream position object holding the result of the calculation.

operator-= ( TInt )

TStreamPos &operator-=(TIntanOffset)[inline]

Subtracts the specified value from this stream position object.

ParameterDescription
anOffsetThe value to be subtracted.

Returns: A reference to this stream position object.

operator< ( TStreamPos )

TBool operator<(TStreamPosaPos)const [inline]

Tests whether the stream position is less than the specified stream position.

ParameterDescription
aPosThe stream position to be compared.

Returns: True, if this object's stream position value is less than the specified stream position's value; false, otherwise.

operator<= ( TStreamPos )

TBool operator<=(TStreamPosaPos)const [inline]

Tests whether the stream position is less than or equal to the specified stream position.

ParameterDescription
aPosThe stream position to be compared.

Returns: True, if this object's stream position value is less than or equal to the specified stream position's value; false, otherwise.

operator== ( TStreamPos )

TBool operator==(TStreamPosaPos)const [inline]

Tests whether the stream position is equal to the specified stream position.

ParameterDescription
aPosThe stream position to be compared.

Returns: True, if this object's stream position value is equal to the specified stream position's value; false, otherwise.

operator> ( TStreamPos )

TBool operator>(TStreamPosaPos)const [inline]

Tests whether the stream position is greater than the specified stream position.

ParameterDescription
aPosThe stream position to be compared.

Returns: True, if this object's stream position value is greater than the specified stream position's value; false, otherwise.

operator>= ( TStreamPos )

TBool operator>=(TStreamPosaPos)const [inline]

Tests whether the stream position is greater than or equal to the specified stream position.

ParameterDescription
aPosThe stream position to be compared.

Returns: True, if this object's stream position value is greater than or equal to the specified stream position's value; false, otherwise.