memory_mapped_file Class Reference
[File System Library]

#include <winstl/filesystem/memory_mapped_file.hpp>

List of all members.


Detailed Description

Facade over the Win32 memory mapped file API.

Public Types

Member Types
typedef memory_mapped_file class_type
 This type.
typedef ws_uint32_t size_type
 The size type.
typedef ws_dword_t error_type
 The error type.
typedef bool bool_type
 The boolean type.

Public Member Functions

Construction
 memory_mapped_file (char const *fileName)
 Maps an entire file into memory.
 memory_mapped_file (wchar_t const *fileName)
 Maps an entire file into memory.
template<typename S>
 memory_mapped_file (S const &fileName)
 Maps an entire file into memory.
 ~memory_mapped_file () throw ()
 Closes the view on the mapped file.
void swap (class_type &rhs) throw ()
 Swaps the state of this instance with another.
Accessors
void const * memory () const
 Non-mutating (const) pointer to the start of the mapped region.
size_type size () const
 The number of bytes in the mapped region.

Member Typedef Documentation

This type.

typedef ws_uint32_t size_type

The size type.

typedef ws_dword_t error_type

The error type.

typedef bool bool_type

The boolean type.


Constructor & Destructor Documentation

memory_mapped_file ( char const *  fileName  )  [inline, explicit]

Maps an entire file into memory.

Parameters:
fileName The name of the file to map into memory
Exceptions:
winstl::windows_exception Thrown if the map cannot be created. May be any value returned by the Windows API; known values include ERROR_NOT_ENOUGH_MEMORY (when the map size is too large to fit into memory) and ERROR_INVALID_PARAMETER (when the allocated size is too large to be valid

memory_mapped_file ( wchar_t const *  fileName  )  [inline, explicit]

Maps an entire file into memory.

memory_mapped_file ( S const &  fileName  )  [inline, explicit]

Maps an entire file into memory.

References stlsoft_ns_qual.

~memory_mapped_file (  )  throw () [inline]

Closes the view on the mapped file.

References WINSTL_ASSERT.


Member Function Documentation

void swap ( class_type rhs  )  throw () [inline]

Swaps the state of this instance with another.

References stlsoft::std_swap(), and WINSTL_ASSERT.

void const* memory (  )  const [inline]

Non-mutating (const) pointer to the start of the mapped region.

size_type size (  )  const [inline]

The number of bytes in the mapped region.


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

Generated on Thu Jun 10 08:59:24 2010 for STLSoft by  doxygen 1.5.6