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

Common::SeekableWriteStream Class Reference

Derived abstract base class for write streams streams that are seekable. More...

#include <stream.h>

Inheritance diagram for Common::SeekableWriteStream:
Collaboration diagram for Common::SeekableWriteStream:

List of all members.

Public Member Functions

virtual bool seek (int32 offset, int whence=SEEK_SET)=0
 Sets the stream position indicator for the stream.
virtual int32 size () const =0
 Obtains the current size of the stream, measured in bytes.

Detailed Description

Derived abstract base class for write streams streams that are seekable.

Definition at line 241 of file stream.h.


Member Function Documentation

virtual bool Common::SeekableWriteStream::seek ( int32  offset,
int  whence = SEEK_SET 
) [pure 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

Implemented in Common::MemoryWriteStream, Common::SeekableMemoryWriteStream, Common::MemoryWriteStreamDynamic, and Common::MemoryReadWriteStream.

virtual int32 Common::SeekableWriteStream::size (  )  const [pure virtual]

Obtains the current 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

Implemented in Common::MemoryWriteStream, Common::MemoryWriteStreamDynamic, and Common::MemoryReadWriteStream.


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


Generated on Sat Aug 24 2019 05:04:06 for ResidualVM by doxygen 1.7.1
curved edge   curved edge