Minecraft Community Edition 0.1.0
Loading...
Searching...
No Matches
mce::InputStream Class Referenceabstract
Inheritance diagram for mce::InputStream:
mce::FileInputStream mce::MemoryInputStream

Public Member Functions

virtual size_t read (void *buffer, size_t size)=0
 Reads from the input stream.
virtual size_t seek (size_t position)=0
 Changes the current position the stream is reading.
virtual size_t tell ()=0
virtual size_t getSize ()=0

Member Function Documentation

◆ getSize()

virtual size_t mce::InputStream::getSize ( )
pure virtual
Returns
The size of the stream in bytes

Implemented in mce::FileInputStream, and mce::MemoryInputStream.

◆ read()

virtual size_t mce::InputStream::read ( void * buffer,
size_t size )
pure virtual

Reads from the input stream.

Parameters
bufferThe buffer to read the bytes into
sizeThe amount of bytes to read
Returns
The amount of bytes written

Implemented in mce::FileInputStream, and mce::MemoryInputStream.

◆ seek()

virtual size_t mce::InputStream::seek ( size_t position)
pure virtual

Changes the current position the stream is reading.

Parameters
positionThe position to seek the input stream to
Returns
The position the input stream is at now

Implemented in mce::FileInputStream, and mce::MemoryInputStream.

◆ tell()

virtual size_t mce::InputStream::tell ( )
pure virtual
Returns
The current position the stream is at

Implemented in mce::FileInputStream, and mce::MemoryInputStream.


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