Gosu::Writer Class Reference

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

List of all members.

Public Member Functions

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

Detailed Description

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

Definition at line 85 of file IO.hpp.


Constructor & Destructor Documentation

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

Definition at line 91 of file IO.hpp.


Member Function Documentation

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

Definition at line 101 of file IO.hpp.

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

Definition at line 96 of file IO.hpp.

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

Definition at line 112 of file IO.hpp.

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

Definition at line 106 of file IO.hpp.

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

Referenced by writePod().

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

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

Definition at line 122 of file IO.hpp.

References Gosu::otherByteOrder, and write().


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