ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::SeekableSubReadStream Class Reference

#include <substream.h>

Inheritance diagram for Common::SeekableSubReadStream:
Collaboration diagram for Common::SeekableSubReadStream:

List of all members.

Public Member Functions

 SeekableSubReadStream (SeekableReadStream *parentStream, uint32 begin, uint32 end, DisposeAfterUse::Flag disposeParentStream=DisposeAfterUse::NO)
virtual int32 pos () const
 Obtains the current value of the stream position indicator of the stream.
virtual int32 size () const
 Obtains the total size of the stream, measured in bytes.
virtual bool seek (int32 offset, int whence=SEEK_SET)
 Sets the stream position indicator for the stream.

Protected Attributes

SeekableReadStream_parentStream
uint32 _begin

Detailed Description

Definition at line 69 of file substream.h.


Constructor & Destructor Documentation

Common::SeekableSubReadStream::SeekableSubReadStream ( SeekableReadStream parentStream,
uint32  begin,
uint32  end,
DisposeAfterUse::Flag  disposeParentStream = DisposeAfterUse::NO 
)

Definition at line 230 of file stream.cpp.


Member Function Documentation

virtual int32 Common::SeekableSubReadStream::pos (  )  const [inline, virtual]

Obtains the current value of the stream position indicator of the stream.

Returns:
the current position indicator, or -1 if an error occurred.

Implements Common::SeekableReadStream.

Definition at line 76 of file substream.h.

bool Common::SeekableSubReadStream::seek ( int32  offset,
int  whence = SEEK_SET 
) [virtual]

Sets the stream position indicator for the stream.

The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the seek() method clears the end-of-file indicator for the stream.

Note:
The semantics of any implementation of this method are supposed to match those of ISO C fseek().
Parameters:
offset the relative offset in bytes
whence the seek reference: SEEK_SET, SEEK_CUR, or SEEK_END
Returns:
true on success, false in case of a failure

Implements Common::SeekableReadStream.

Definition at line 240 of file stream.cpp.

virtual int32 Common::SeekableSubReadStream::size (  )  const [inline, virtual]

Obtains the total size of the stream, measured in bytes.

If this value is unknown or can not be computed, -1 is returned.

Returns:
the size of the stream, or -1 if an error occurred

Implements Common::SeekableReadStream.

Definition at line 77 of file substream.h.


Member Data Documentation

Definition at line 72 of file substream.h.


The documentation for this class was generated from the following files:


Generated on Sat Jan 12 2019 05:04:17 for ResidualVM by doxygen 1.7.1
curved edge   curved edge