Gosu
|
Utility class that points to a specific position in a resource and offers an interface for sequential reading. More...
Public Member Functions | |
Reader (const Resource &resource, std::size_t position) | |
const Resource & | resource () const |
std::size_t | position () const |
void | set_position (std::size_t value) |
void | seek (std::ptrdiff_t offset) |
void | read (void *dest_buffer, std::size_t length) |
template<typename T > | |
void | read_pod (T &t, ByteOrder bo=BO_DONT_CARE) |
Convenience function; equivalent to read(&t, sizeof t). More... | |
template<typename T > | |
T | get_pod (ByteOrder bo=BO_DONT_CARE) |
Similar to read_pod(T&), but returns the read value instead. More... | |
Utility class that points to a specific position in a resource and offers an interface for sequential reading.
Gosu::Reader::Reader | ( | const Resource & | resource, |
std::size_t | position | ||
) |
Definition at line 32 of file IO.hpp.
Referenced by Gosu::Resource::front_reader().
T Gosu::Reader::get_pod | ( | ByteOrder | bo = BO_DONT_CARE | ) |
void Gosu::Reader::read | ( | void * | dest_buffer, |
std::size_t | length | ||
) |
Referenced by Gosu::Resource::back_writer(), Gosu::Buffer::operator=(), read_pod(), and seek().
void Gosu::Reader::read_pod | ( | T & | t, |
ByteOrder | bo = BO_DONT_CARE |
||
) |
void Gosu::Reader::seek | ( | std::ptrdiff_t | offset | ) |