sf::MemoryInputStream Class Reference
Implementation of input stream based on a memory chunk. More...
#include <MemoryInputStream.hpp>
Inheritance diagram for sf::MemoryInputStream:
Public Member Functions | |
MemoryInputStream () | |
Default constructor. More... | |
void | open (const void *data, std::size_t sizeInBytes) |
Open the stream from its data. More... | |
virtual Int64 | read (void *data, Int64 size) |
Read data from the stream. More... | |
virtual Int64 | seek (Int64 position) |
Change the current reading position. More... | |
virtual Int64 | tell () |
Get the current reading position in the stream. More... | |
virtual Int64 | getSize () |
Return the size of the stream. More... | |
Detailed Description
Implementation of input stream based on a memory chunk.
Definition at line 43 of file MemoryInputStream.hpp.
Constructor & Destructor Documentation
sf::MemoryInputStream::MemoryInputStream | ( | ) |
Default constructor.
Member Function Documentation
|
virtual |
Return the size of the stream.
- Returns
- The total number of bytes available in the stream, or -1 on error
Implements sf::InputStream.
void sf::MemoryInputStream::open | ( | const void * | data, |
std::size_t | sizeInBytes | ||
) |
Open the stream from its data.
- Parameters
-
data Pointer to the data in memory sizeInBytes Size of the data, in bytes
|
virtual |
Read data from the stream.
After reading, the stream's reading position must be advanced by the amount of bytes read.
- Parameters
-
data Buffer where to copy the read data size Desired number of bytes to read
- Returns
- The number of bytes actually read, or -1 on error
Implements sf::InputStream.
|
virtual |
Change the current reading position.
- Parameters
-
position The position to seek to, from the beginning
- Returns
- The position actually sought to, or -1 on error
Implements sf::InputStream.
|
virtual |
Get the current reading position in the stream.
- Returns
- The current position, or -1 on error.
Implements sf::InputStream.
The documentation for this class was generated from the following file: