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

Utility class that points to a specific position in a resource and offers an interface for sequential writing. More...

Public Member Functions

 Writer (Resource &resource, std::size_t position)
 
Resourceresource () const
 
std::size_t position () const
 
void set_position (std::size_t value)
 
void seek (std::ptrdiff_t offset)
 
void write (const void *source_buffer, std::size_t length)
 
template<typename T >
void write_pod (const T &t, ByteOrder bo=BO_DONT_CARE)
 Convenience function; equivalent to write(&t, sizeof t). More...
 

Detailed Description

Utility class that points to a specific position in a resource and offers an interface for sequential writing.

Definition at line 84 of file IO.hpp.

Constructor & Destructor Documentation

◆ Writer()

Gosu::Writer::Writer ( Resource resource,
std::size_t  position 
)

Definition at line 90 of file IO.hpp.

Member Function Documentation

◆ position()

std::size_t Gosu::Writer::position ( ) const

Definition at line 100 of file IO.hpp.

◆ resource()

Resource& Gosu::Writer::resource ( ) const

Definition at line 95 of file IO.hpp.

◆ seek()

void Gosu::Writer::seek ( std::ptrdiff_t  offset)

Definition at line 111 of file IO.hpp.

◆ set_position()

void Gosu::Writer::set_position ( std::size_t  value)

Definition at line 105 of file IO.hpp.

◆ write()

void Gosu::Writer::write ( const void *  source_buffer,
std::size_t  length 
)

◆ write_pod()

template<typename T >
void Gosu::Writer::write_pod ( const T &  t,
ByteOrder  bo = BO_DONT_CARE 
)

Convenience function; equivalent to write(&t, sizeof t).

Definition at line 121 of file IO.hpp.


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