CrystalSpace

Public API Reference

csMemoryMappedIO Class Reference

Defines a simple memory-mapped IO class that is portable. More...

#include <csutil/mmapio.h>

Inheritance diagram for csMemoryMappedIO:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 csMemoryMappedIO (char const *filename, iVFS *vfs=0)
 Block size is the size of blocks that you want to get from the file, filename is the name of the file to map.
csRef< csMemoryMappingGetData (size_t offset, size_t length)
 Obtain a piece of the mapped file.
bool IsValid ()
 Returns true the memory was mapped successfully.
virtual ~csMemoryMappedIO ()
 Destroys the mmapio object, closes open files, and releases memory.

Friends

struct PlatformMapping


Detailed Description

Defines a simple memory-mapped IO class that is portable.

Definition at line 64 of file mmapio.h.


Constructor & Destructor Documentation

csMemoryMappedIO::csMemoryMappedIO ( char const *  filename,
iVFS vfs = 0 
)

Block size is the size of blocks that you want to get from the file, filename is the name of the file to map.

If you supply a VFS, filename is tried to be resolved to a native path. Otherwise, filename is used as is, hence it must already be a native path.

virtual csMemoryMappedIO::~csMemoryMappedIO (  )  [virtual]

Destroys the mmapio object, closes open files, and releases memory.


Member Function Documentation

csRef<csMemoryMapping> csMemoryMappedIO::GetData ( size_t  offset,
size_t  length 
)

Obtain a piece of the mapped file.

bool csMemoryMappedIO::IsValid (  ) 

Returns true the memory was mapped successfully.


The documentation for this class was generated from the following file:
Generated for Crystal Space 1.2.1 by doxygen 1.5.3