|
Worldstone
|
A file from a MpqArchive. More...
#include <MpqArchive.h>
Public Member Functions | |
| MpqFileStream (MpqArchive &archive, const Path &filename) | |
| bool | open (MpqArchive &archive, const Path &filename) |
| bool | is_open () const |
| bool | close () |
| size_t | read (void *buffer, size_t size) override |
| Read data from the stream. More... | |
| long | tell () override |
| Return the current position of the stream pointer. More... | |
| long | size () override |
| Compute the size of the file. More... | |
| bool | seek (long offset, seekdir origin) override |
Public Member Functions inherited from WorldStone::IStream | |
| bool | eof () const |
| True if the end of the stream was reached during the last read operation. | |
| template<typename T > | |
| bool | readRaw (T &out) |
| virtual int | getc () |
| Read one byte from the stream. More... | |
Public Member Functions inherited from WorldStone::IOBase | |
| operator bool () const | |
| bool | operator! () const |
| bool | good () const |
| bool | eof () const |
| bool | fail () const |
| bool | bad () const |
Additional Inherited Members | |
Public Types inherited from WorldStone::IStream | |
| enum | seekdir { beg, cur, end } |
Public Types inherited from WorldStone::IOBase | |
| using | Path = std::string |
| using | iostate = int |
Protected Member Functions inherited from WorldStone::IOBase | |
| void | setstate (iostate state) |
Protected Attributes inherited from WorldStone::IOBase | |
| iostate | _state = goodbit |
Static Protected Attributes inherited from WorldStone::IOBase | |
| static constexpr iostate | goodbit = 0x0 |
| static constexpr iostate | eofbit = 0x1 |
| static constexpr iostate | failbit = 0x2 |
| static constexpr iostate | badbit = 0x4 |
A file from a MpqArchive.
Definition at line 47 of file MpqArchive.h.
|
overridevirtual |
Read data from the stream.
| buffer | Pointer to a block of memory to fill. Must be at least 'size' bytes large. |
| size | Number of bytes to copy |
Implements WorldStone::IStream.
Definition at line 98 of file MpqArchive.cpp.
|
overridevirtual |
Implements WorldStone::IStream.
Definition at line 124 of file MpqArchive.cpp.
|
overridevirtual |
Compute the size of the file.
Implements WorldStone::IStream.
Definition at line 131 of file MpqArchive.cpp.
|
overridevirtual |
Return the current position of the stream pointer.
Implements WorldStone::IStream.
Definition at line 113 of file MpqArchive.cpp.