![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXMemMap.h>
Public Member Functions | |
FXMemMap () | |
void * | openMap (const FXString &filename, FXlong off=0, FXival len=-1L, FXuint m=FXIO::Reading, FXuint p=FXIO::AllReadWrite) |
void * | openMap (FXInputHandle h, FXlong off=0, FXival len=-1L, FXuint m=FXIO::Reading) |
void * | map (FXlong off=0, FXival len=-1L) |
void * | base () const |
long | length () const |
long | offset () const |
virtual FXlong | position () const |
virtual FXlong | position (FXlong off, FXuint from=FXIO::Begin) |
void * | unmap () |
virtual FXival | readBlock (void *data, FXival count) |
virtual FXival | writeBlock (const void *data, FXival count) |
virtual FXbool | flush () |
virtual FXbool | close () |
~FXMemMap () |
Moreover, mapped files may be shared by processes, resuling in far less "real" memory being used than would otherwise be the case.
FX::FXMemMap::FXMemMap | ( | ) |
Construct a memory map.
FX::FXMemMap::~FXMemMap | ( | ) |
Destroy the map.
void* FX::FXMemMap::openMap | ( | const FXString & | filename, | |
FXlong | off = 0 , |
|||
FXival | len = -1L , |
|||
FXuint | m = FXIO::Reading , |
|||
FXuint | p = FXIO::AllReadWrite | |||
) |
Open a file, and map a view of it into memory; the offset must be a multiple of the page size.
void* FX::FXMemMap::openMap | ( | FXInputHandle | h, | |
FXlong | off = 0 , |
|||
FXival | len = -1L , |
|||
FXuint | m = FXIO::Reading | |||
) |
Open map using existing file handle, and map a view of it into memory.
void* FX::FXMemMap::map | ( | FXlong | off = 0 , |
|
FXival | len = -1L | |||
) |
Map a view of the already open file into memory.
void* FX::FXMemMap::base | ( | ) | const [inline] |
Return pointer to memory area.
long FX::FXMemMap::length | ( | ) | const [inline] |
Obtain length of the map.
long FX::FXMemMap::offset | ( | ) | const [inline] |
Obtain offset of the map.
virtual FXlong FX::FXMemMap::position | ( | ) | const [virtual] |
virtual FXlong FX::FXMemMap::position | ( | FXlong | off, | |
FXuint | from = FXIO::Begin | |||
) | [virtual] |
void* FX::FXMemMap::unmap | ( | ) |
Unmap the view of the file.
virtual FXbool FX::FXMemMap::flush | ( | ) | [virtual] |
virtual FXbool FX::FXMemMap::close | ( | ) | [virtual] |
![]() |