#include <IRom.h>
Public Types | |
| enum | SeekFlags { begin = 0, current = 1, end = 2 } |
Public Member Functions | |
| IRom (void) | |
| virtual | ~IRom (void) |
| virtual bool | IsOpen () const =0 |
| virtual unsigned | GetSize () const =0 |
| virtual unsigned | GetPointer () const =0 |
| virtual unsigned | SetPointer (unsigned pointer)=0 |
| virtual bool | Open ()=0 |
| virtual bool | Close ()=0 |
| virtual unsigned | Read (void *buffer, unsigned bytes)=0 |
| virtual unsigned | Seek (signed bytes, const SeekFlags from=current)=0 |
The interface to read data from files in the file system or virtual files in memory.
| xl7::io::IRom::IRom | ( | void | ) | [inline] |
Default constructor.
| virtual xl7::io::IRom::~IRom | ( | void | ) | [inline, virtual] |
Destructor.
| virtual bool xl7::io::IRom::Close | ( | ) | [pure virtual] |
Closes the file.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
| virtual unsigned xl7::io::IRom::GetPointer | ( | ) | const [pure virtual] |
Returns the current byte position to read or write data.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
| virtual unsigned xl7::io::IRom::GetSize | ( | ) | const [pure virtual] |
Returns the size of the file, in bytes.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
| virtual bool xl7::io::IRom::IsOpen | ( | ) | const [pure virtual] |
Checks whether the file is open and can be read.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
| virtual bool xl7::io::IRom::Open | ( | ) | [pure virtual] |
Opens the file for reading data.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
| virtual unsigned xl7::io::IRom::Read | ( | void * | buffer, | |
| unsigned | bytes | |||
| ) | [pure virtual] |
Reads data from the file and returns the number of bytes read.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
| virtual unsigned xl7::io::IRom::Seek | ( | signed | bytes, | |
| const SeekFlags | from = current | |||
| ) | [pure virtual] |
Resets the current byte position to read or write data by moving the pointer by the specified bytes. The function returns the new position.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
| virtual unsigned xl7::io::IRom::SetPointer | ( | unsigned | pointer | ) | [pure virtual] |
Resets the current byte position to read or write data. The function returns the new position.
Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.
1.7.1