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 86 of file IO.hpp.


Constructor & Destructor Documentation

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

Definition at line 92 of file IO.hpp.


Member Function Documentation

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

Definition at line 102 of file IO.hpp.

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

Definition at line 97 of file IO.hpp.

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

Definition at line 113 of file IO.hpp.

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

Definition at line 107 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 123 of file IO.hpp.

References write().


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