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

Common::IFFParser::IFFChunkNav Class Reference

This private class implements IFF chunk navigation. More...

Inheritance diagram for Common::IFFParser::IFFChunkNav:
Collaboration diagram for Common::IFFParser::IFFChunkNav:

List of all members.

Public Member Functions

 IFFChunkNav ()
void setInputStream (ReadStream *input)
void incBytesRead (uint32 inc)
void readHeader ()
bool hasReadAll () const
void feed ()
bool eos () const
 Returns true if a read failed because the stream end has been reached.
bool err () const
 Returns true if an I/O failure occurred.
void clearErr ()
 Reset the I/O error status as returned by err().
uint32 read (void *dataPtr, uint32 dataSize)
 Read data from the stream.

Public Attributes

IFF_ID id
uint32 size

Protected Attributes

ReadStream_input
uint32 _bytesRead

Detailed Description

This private class implements IFF chunk navigation.

Definition at line 167 of file iff_container.h.


Constructor & Destructor Documentation

Common::IFFParser::IFFChunkNav::IFFChunkNav (  )  [inline]

Definition at line 175 of file iff_container.h.


Member Function Documentation

void Common::IFFParser::IFFChunkNav::clearErr (  )  [inline, virtual]

Reset the I/O error status as returned by err().

For a ReadStream, also reset the end-of-stream status returned by eos().

Note:
The semantics of any implementation of this method are supposed to match those of ISO C clearerr().

Reimplemented from Common::Stream.

Definition at line 206 of file iff_container.h.

bool Common::IFFParser::IFFChunkNav::eos (  )  const [inline, virtual]

Returns true if a read failed because the stream end has been reached.

This flag is cleared by clearErr(). For a SeekableReadStream, it is also cleared by a successful seek.

Note:
The semantics of any implementation of this method are supposed to match those of ISO C feof(). In particular, in a stream with N bytes, reading exactly N bytes from the start should *not* set eos; only reading *beyond* the available data should set it.

Implements Common::ReadStream.

Definition at line 204 of file iff_container.h.

bool Common::IFFParser::IFFChunkNav::err (  )  const [inline, virtual]

Returns true if an I/O failure occurred.

This flag is never cleared automatically. In order to clear it, client code has to call clearErr() explicitly.

Note:
The semantics of any implementation of this method are supposed to match those of ISO C ferror().

Reimplemented from Common::Stream.

Definition at line 205 of file iff_container.h.

void Common::IFFParser::IFFChunkNav::feed (  )  [inline]

Definition at line 195 of file iff_container.h.

bool Common::IFFParser::IFFChunkNav::hasReadAll (  )  const [inline]

Definition at line 192 of file iff_container.h.

void Common::IFFParser::IFFChunkNav::incBytesRead ( uint32  inc  )  [inline]

Definition at line 181 of file iff_container.h.

uint32 Common::IFFParser::IFFChunkNav::read ( void *  dataPtr,
uint32  dataSize 
) [inline, virtual]

Read data from the stream.

Subclasses must implement this method; all other read methods are implemented using it.

Note:
The semantics of any implementation of this method are supposed to match those of ISO C fread(), in particular where it concerns setting error and end of file/stream flags.
Parameters:
dataPtr pointer to a buffer into which the data is read
dataSize number of bytes to be read
Returns:
the number of bytes which were actually read.

Implements Common::ReadStream.

Definition at line 208 of file iff_container.h.

void Common::IFFParser::IFFChunkNav::readHeader (  )  [inline]

Definition at line 187 of file iff_container.h.

void Common::IFFParser::IFFChunkNav::setInputStream ( ReadStream input  )  [inline]

Definition at line 177 of file iff_container.h.


Member Data Documentation

Definition at line 170 of file iff_container.h.

Definition at line 169 of file iff_container.h.


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


Generated on Sat Nov 9 2019 05:01:54 for ResidualVM by doxygen 1.7.1
curved edge   curved edge