SFML 2.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
sf::FileInputStream Class Reference

Implementation of input stream based on a file. More...

`#include <FileInputStream.hpp>`

Inheritance diagram for sf::FileInputStream:

## Public Member Functions
| FileInputStream ()
| Default constructor. More...
virtual | ~FileInputStream ()
| Default destructor. More...
bool | open (const std::string &filename)
| Open the stream from a file path. 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 file.

Definition at line 55 of file FileInputStream.hpp.

## Constructor & Destructor Documentation

sf::FileInputStream::FileInputStream | ( |  | ) |

Default constructor.

virtual sf::FileInputStream::~FileInputStream | ( |  | ) |
| virtual

Default destructor.

## Member Function Documentation

virtual Int64 sf::FileInputStream::getSize | ( |  | ) |
| virtual

Return the size of the stream.

Returns
  The total number of bytes available in the stream, or -1 on error

Implements sf::InputStream.

bool sf::FileInputStream::open | ( | const std::string & | filename | ) |

Open the stream from a file path.

Parameters

  filename | Name of the file to open

Returns
  True on success, false on error

virtual Int64 sf::FileInputStream::read | ( | void * | data,
|  | Int64 | size
| ) |  |
| 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 Int64 sf::FileInputStream::seek | ( | Int64 | position | ) |
| 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 Int64 sf::FileInputStream::tell | ( |  | ) |
| 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:

- FileInputStream.hpp