Linderdaum Engine: clFileMapper Class Reference
Updated: Sun Feb 5 2012 22:59:50
clFileMapper Class Reference

Basic file access interface. More...

#include <Files.h>

List of all members.

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 LubyteMapStream () const
 Return pointer to the shared memory corresponding to this file. Can return NULL if memory mapped files are unsupported.
virtual const LubyteMapStreamFromCurrentPos () 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

iRAWFileFRAWFile
const LubyteFFileData
Luint64 FSize
Luint64 FPosition

Detailed Description

Basic file access interface.

All I/O is performed through the file mapping (mmap on Unix systems and MapViewOfFile on WinAPI)


Constructor & Destructor Documentation

clFileMapper::clFileMapper ( )
clFileMapper::~clFileMapper ( ) [virtual]

Member Function Documentation

void clFileMapper::BlockRead ( void *  Buf,
const Luint64  Size 
) [virtual]

Implements iIStream.

virtual bool clFileMapper::Eof ( ) const [inline, virtual]

Implements iIStream.

LString clFileMapper::GetFileName ( ) const [virtual]

Implements iIStream.

virtual Luint64 clFileMapper::GetFilePos ( ) const [inline, virtual]

Implements iIStream.

virtual Luint64 clFileMapper::GetFileSize ( ) const [inline, 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.

int clFileMapper::ReadInt_Binary ( ) [virtual]

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::Seek ( const Luint64  Position) [inline, virtual]

Implements iIStream.

virtual void clFileMapper::SeekOffset ( const Luint64  Offset) [inline, virtual]

Implements iIStream.

void clFileMapper::SetRawFile ( iRAWFile RAWFile)

Member Data Documentation

const Lubyte* clFileMapper::FFileData [private]

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