Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::port::MemoryMappedFile Class Reference

Read-only in-memory view of an entire file on disk. More...

#include "memorymappedfile.h"

Public Member Functions

 MemoryMappedFile (const std::string &path)
 Maps the file at path. More...
 
 ~MemoryMappedFile ()
 
const void * GetData () const
 Returns a pointer to the head of the mapped region. More...
 
size_t GetLength () const
 Returns the length of the mapped region. More...
 

Detailed Description

Read-only in-memory view of an entire file on disk.

Definition at line 31 of file memorymappedfile.h.

Constructor & Destructor Documentation

ion::port::MemoryMappedFile::MemoryMappedFile ( const std::string &  path)
explicit

Maps the file at path.

In case of error GetData() will be NULL. Mappings start at offset 0, extend the length of the file, and are read-only.

Definition at line 36 of file memorymappedfile.cc.

References handle.

ion::port::MemoryMappedFile::~MemoryMappedFile ( )

Definition at line 73 of file memorymappedfile.cc.

Member Function Documentation

const void * ion::port::MemoryMappedFile::GetData ( ) const

Returns a pointer to the head of the mapped region.

Definition at line 85 of file memorymappedfile.cc.

size_t ion::port::MemoryMappedFile::GetLength ( ) const

Returns the length of the mapped region.

Definition at line 89 of file memorymappedfile.cc.


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