| Linderdaum Engine: clFileMapper Class Reference | ![]() |
Basic file access interface. More...
#include <Files.h>
Public Member Functions | |
| clFileMapper () | |
| virtual | ~clFileMapper () |
| scriptmethod void | SetRawFile (iRAWFile *RAWFile) |
| virtual LString | GetVirtualFileName () const |
| virtual LString | GetFileName () const |
| virtual void | BlockRead (void *Buf, const Luint64 Size) |
| virtual int | ReadInt_Binary () |
| virtual LString | ReadLine () |
| virtual LString | ReadLineLength () |
| Read "pascal-style" string: DWord with size followed by string contents. | |
| virtual LString | ReadLineTrimLeadSpaces () |
| virtual void | Seek (const Luint64 Position) |
| virtual void | SeekOffset (const Luint64 Offset) |
| virtual bool | Eof () const |
| virtual Luint64 | GetFileSize () const |
| virtual Luint64 | GetFilePos () const |
| virtual const Lubyte * | MapStream () const |
| Return pointer to the shared memory corresponding to this file. Can return NULL if memory mapped files are unsupported. | |
| virtual const Lubyte * | MapStreamFromCurrentPos () const |
| Return pointer to the shared memory corresponding to the current position in this file. Can return NULL if memory mapped files are unsupported. | |
Private Attributes | |
| iRAWFile * | FRAWFile |
| const Lubyte * | FFileData |
| Luint64 | FSize |
| Luint64 | FPosition |
Basic file access interface.
All I/O is performed through the file mapping (mmap on Unix systems and MapViewOfFile on WinAPI)
| clFileMapper::clFileMapper | ( | ) |
| clFileMapper::~clFileMapper | ( | ) | [virtual] |
| virtual bool clFileMapper::Eof | ( | ) | const [inline, virtual] |
Implements iIStream.
| LString clFileMapper::GetFileName | ( | ) | const [virtual] |
Implements iIStream.
| LString clFileMapper::GetVirtualFileName | ( | ) | const [virtual] |
Implements iIStream.
| virtual const Lubyte* clFileMapper::MapStream | ( | ) | const [inline, virtual] |
Return pointer to the shared memory corresponding to this file. Can return NULL if memory mapped files are unsupported.
Implements iIStream.
| virtual const Lubyte* clFileMapper::MapStreamFromCurrentPos | ( | ) | const [inline, virtual] |
Return pointer to the shared memory corresponding to the current position in this file. Can return NULL if memory mapped files are unsupported.
Implements iIStream.
| LString clFileMapper::ReadLine | ( | ) | [virtual] |
Implements iIStream.
| LString clFileMapper::ReadLineLength | ( | ) | [virtual] |
Read "pascal-style" string: DWord with size followed by string contents.
don't read anything beyond EOF
Implements iIStream.
| LString clFileMapper::ReadLineTrimLeadSpaces | ( | ) | [virtual] |
Implements iIStream.
| virtual void clFileMapper::SeekOffset | ( | const Luint64 | Offset | ) | [inline, virtual] |
Implements iIStream.
| void clFileMapper::SetRawFile | ( | iRAWFile * | RAWFile | ) |
const Lubyte* clFileMapper::FFileData [private] |
Luint64 clFileMapper::FPosition [private] |
iRAWFile* clFileMapper::FRAWFile [private] |
Luint64 clFileMapper::FSize [private] |