Class: TRandomAccessStream

Declaration: RandomAccessStream.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TStream

Inherited By:

TChunkyStream TContiguousGrowingStream TContiguousMemoryStream TFileStream

Purpose:

TRandomAccessStream is an abstract class that can accept and provide binary data and can be repositioned through operators which seek and query the position of the random access stream.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive classes from TRandomAccessStream.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TRandomAccessStream::~TRandomAccessStream

virtual ~ TRandomAccessStream ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Call this function directly to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::GetPosition

virtual StreamPosition GetPosition () const

Interface Category:

API.

Purpose:

A pure virtual function that returns the current position in the stream. The behavior of this operator is determined by the derived class.

Calling Context:

Call this function directly to return the current position in the stream.

Parameters:

Return Value:

Returns the current stream position.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::GetLogicalEndOfStream

virtual StreamPosition GetLogicalEndOfStream () const

Interface Category:

API.

Purpose:

A pure virtual function that returns the logical end of stream. The behavior of this operator is determined by the derived class.

Calling Context:

Call this function directly to return the logical end of stream.

Parameters:

Return Value:

Returns the logical end of stream.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::GetPhysicalEndOfStream

virtual StreamPosition GetPhysicalEndOfStream () const

Interface Category:

API.

Purpose:

A pure virtual function that returns the physical end of stream. The behavior of this operator is determined by the derived class.

Calling Context:

Call this function directly to return the physical end of stream.

Parameters:

Return Value:

Returns the physical end of stream.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::GetReadOnly

virtual bool GetReadOnly () const

Interface Category:

API.

Purpose:

A virtual function that returns the read-only state of this stream. The behavior of this operator is determined by the derived class.

Calling Context:

Call this function directly to return the read-only state of this stream.

Parameters:

Return Value:

Returns true if the stream is read-only.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::Seek

virtual void Seek (StreamPosition position)

Interface Category:

API.

Purpose:

A pure virtual function that moves to an absolute location in this stream. The behavior of this operator is determined by the derived class.

Calling Context:

Call this function directly to move to an absolute location in this stream.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::SeekRelative

virtual void SeekRelative (StreamPositionDelta offset)

Interface Category:

API.

Purpose:

Moves to a position in the random access stream relative to the current position.

Calling Context:

Call this function directly to move to a new position in the stream.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Calls Seek, a pure virtual function, whose behavior is determined by the derived class.

Member Function: TRandomAccessStream::SetLogicalEndOfStream

virtual void SetLogicalEndOfStream (StreamPosition)

Interface Category:

API.

Purpose:

A pure virtual function that sets the logical end of stream to the desired location. The behavior of this operator is determined by the derived class.

Calling Context:

Call this function directly to set the logical end of stream in this random access stream.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::TRandomAccessStream

  1. TRandomAccessStream (BufferPointer bufferStart, size_t howmuch)
  2. TRandomAccessStream ()

Interface Category:

API.

Purpose:

  1. Creates a TRandomAccessStream using the specified buffer and buffer size.
  2. Default constructor.

Calling Context:

  1. Call this function directly to create a TRandomAccessStream with the desired buffer and buffer size.
  2. Call this function directly anywhere the creation of a TRandomAccessStream is desired.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRandomAccessStream::SetPhysicalEndOfStream

virtual void SetPhysicalEndOfStream (StreamPosition)

Interface Category:

API.

Purpose:

A pure virtual function that sets the physical end of stream to the desired location. The behavior of this operator is determined by the derived class.

Calling Context:

Call this function directly to set the physical end of stream in this random access stream.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.