Skip to content
SiteEmail

renoir::IStreamReader

Object capable streaming file contents.

#include <CoherentRenderingLibrary.h>

Inherited by cohtml::ISyncStreamReader

Name
virtual~IStreamReader()
IStreamReader()
virtual unsignedGetSize() =0
Returns the file size.
virtual unsignedRead(unsigned offset, unsigned char * buffer, unsigned count) =0
Reads count bytes into buffer starting from offset.
virtual voidClose() =0
Marks this object as closed - it will no longer be used and its memory should be freed.
virtual ~IStreamReader()
IStreamReader()
virtual unsigned GetSize() =0

Returns the file size.

Return: file size

virtual unsigned Read(
unsigned offset,
unsigned char * buffer,
unsigned count
) =0

Reads count bytes into buffer starting from offset.

Parameters:

  • offset the position at which to begin reading
  • buffer pointer to the buffer where to copy the file contents
  • count number of bytes to read

Return: number of bytes successfully read

virtual void Close() =0

Marks this object as closed - it will no longer be used and its memory should be freed.