Warning
This page refers to an old version of SFML. Click here to switch to the latest version.
Warning
This page refers to an old version of SFML. Click here to switch to the latest version.
Implementation of input stream based on a memory chunk. More...
#include <SFML/System/MemoryInputStream.hpp>
Public Member Functions | |
| MemoryInputStream () | |
| Default constructor. | |
| void | open (const void *data, std::size_t sizeInBytes) |
| Open the stream from its data. | |
| virtual Int64 | read (void *data, Int64 size) |
| Read data from the stream. | |
| virtual Int64 | seek (Int64 position) |
| Change the current reading position. | |
| virtual Int64 | tell () |
| Get the current reading position in the stream. | |
| virtual Int64 | getSize () |
| Return the size of the stream. | |
Implementation of input stream based on a memory chunk.
Definition at line 43 of file MemoryInputStream.hpp.
| sf::MemoryInputStream::MemoryInputStream | ( | ) |
Default constructor.
|
virtual |
Return the size of the stream.
Implements sf::InputStream.
| void sf::MemoryInputStream::open | ( | const void * | data, |
| std::size_t | sizeInBytes ) |
Open the stream from its data.
| data | Pointer to the data in memory |
| sizeInBytes | Size of the data, in bytes |
Read data from the stream.
After reading, the stream's reading position must be advanced by the amount of bytes read.
| data | Buffer where to copy the read data |
| size | Desired number of bytes to read |
Implements sf::InputStream.
Change the current reading position.
| position | The position to seek to, from the beginning |
Implements sf::InputStream.
|
virtual |
Get the current reading position in the stream.
Implements sf::InputStream.