Public Member Functions | List of all members
Gosu::File Class Reference

File with the Resource interface. More...

+ Inheritance diagram for Gosu::File:

Public Member Functions

 File (const std::string &filename, FileMode mode=FM_READ)
 ~File ()
std::size_t size () const override
void resize (std::size_t new_size) override
void read (std::size_t offset, std::size_t length, void *dest_buffer) const override
void write (std::size_t offset, std::size_t length, const void *source_buffer) override
- Public Member Functions inherited from Gosu::Resource
 Resource ()
virtual ~Resource ()
Reader front_reader () const
 Convenience: Creates a new Reader that reads from the start of the resource. More...
Writer back_writer ()
 Convenience: Creates a new Writer that appends data at the end of the resource. More...

Detailed Description

File with the Resource interface.

Definition at line 235 of file IO.hpp.

Constructor & Destructor Documentation

◆ File()

Gosu::File::File ( const std::string &  filename,
FileMode  mode = FM_READ 

◆ ~File()

Gosu::File::~File ( )

Member Function Documentation

◆ read()

void Gosu::File::read ( std::size_t  offset,
std::size_t  length,
void *  dest_buffer 
) const

Implements Gosu::Resource.

◆ resize()

void Gosu::File::resize ( std::size_t  new_size)

Implements Gosu::Resource.

◆ size()

std::size_t Gosu::File::size ( ) const

Implements Gosu::Resource.

◆ write()

void Gosu::File::write ( std::size_t  offset,
std::size_t  length,
const void *  source_buffer 

Implements Gosu::Resource.

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