Beatmup
Beatmup::InputStream Class Referenceabstract

Minimal input stream interface. More...

#include <input_stream.h>

Inheritance diagram for Beatmup::InputStream:
Beatmup::Android::Asset Beatmup::FileInputStream Beatmup::MemoryInputStream

Public Member Functions

virtual bool operator() (void *buffer, msize bytes)=0
 Reads a given number of bytes into a specific memory location. More...
 
virtual bool seek (msize pos)=0
 Moves the read pointer to a given position in the stream. More...
 
virtual bool eof () const =0
 Returns true, if the end of the stream is reached (i.e., all the data is read or the stream is empty). More...
 

Detailed Description

Minimal input stream interface.

Definition at line 27 of file input_stream.h.

Member Function Documentation

◆ operator()()

virtual bool Beatmup::InputStream::operator() ( void *  buffer,
msize  bytes 
)
pure virtual

Reads a given number of bytes into a specific memory location.

Parameters
[in]bufferThe address to store the data to
[in]bytesNumber of bytes to read
Returns
true on success.

Implemented in Beatmup::MemoryInputStream, Beatmup::FileInputStream, and Beatmup::Android::Asset.

◆ seek()

virtual bool Beatmup::InputStream::seek ( msize  pos)
pure virtual

Moves the read pointer to a given position in the stream.

Parameters
posThe position in bytes from the beginning of the stream
Returns
true on success.

Implemented in Beatmup::MemoryInputStream, Beatmup::FileInputStream, and Beatmup::Android::Asset.

◆ eof()

virtual bool Beatmup::InputStream::eof ( ) const
pure virtual

Returns true, if the end of the stream is reached (i.e., all the data is read or the stream is empty).

Implemented in Beatmup::MemoryInputStream, Beatmup::FileInputStream, and Beatmup::Android::Asset.


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