wibble  1.1
Public Member Functions | Public Attributes | List of all members
wibble::sys::MMap Struct Reference

Map a file into memory. More...

#include <mmap.h>

Public Member Functions

 MMap ()
 
 MMap (const MMap &mmap)
 
 MMap (const std::string &filename)
 
 ~MMap ()
 
MMapoperator= (const MMap &mmap)
 
void map (const std::string &filename)
 
void unmap ()
 

Public Attributes

std::string filename
 
size_t size
 
int fd
 
const char * buf
 

Detailed Description

Map a file into memory.

Currently, this is only read-only.

Copy semanthics are the same as auto_ptr

Note: on 32bit systems, it is not possible to map files larger than 2G into memory.

Constructor & Destructor Documentation

wibble::sys::MMap::MMap ( )
wibble::sys::MMap::MMap ( const MMap mmap)
wibble::sys::MMap::MMap ( const std::string &  filename)
wibble::sys::MMap::~MMap ( )

Member Function Documentation

void wibble::sys::MMap::map ( const std::string &  filename)
MMap& wibble::sys::MMap::operator= ( const MMap mmap)
void wibble::sys::MMap::unmap ( )

Member Data Documentation

const char* wibble::sys::MMap::buf

Referenced by TestMMap::simple().

int wibble::sys::MMap::fd

Referenced by TestMMap::simple().

std::string wibble::sys::MMap::filename

Referenced by TestMMap::simple().

size_t wibble::sys::MMap::size

The documentation for this struct was generated from the following file: