Equalizer  1.2.1
Public Member Functions
co::base::MemoryMap Class Reference

Helper to map a file to a memory address (mmap) More...

#include <memoryMap.h>

+ Inheritance diagram for co::base::MemoryMap:
+ Collaboration diagram for co::base::MemoryMap:

List of all members.

Public Member Functions

COBASE_API MemoryMap ()
 Construct a new memory map.
COBASE_API ~MemoryMap ()
 Destruct the memory map.
COBASE_API const void * map (const std::string &fileName)
 Map a file to a memory address.
COBASE_API void unmap ()
 Unmap the file.
const void * getAddress () const
size_t getSize () const

Detailed Description

Helper to map a file to a memory address (mmap)

Definition at line 31 of file memoryMap.h.


Constructor & Destructor Documentation

Construct a new memory map.

Version:
1.0

Destruct the memory map.

Unmaps the file, if it is still mapped.

See also:
unmap()
Version:
1.0

Member Function Documentation

const void* co::base::MemoryMap::getAddress ( ) const [inline]
Returns:
the pointer to the memory map.
Version:
1.0

Definition at line 62 of file memoryMap.h.

size_t co::base::MemoryMap::getSize ( ) const [inline]
Returns:
the size of the memory map.
Version:
1.0

Definition at line 65 of file memoryMap.h.

COBASE_API const void* co::base::MemoryMap::map ( const std::string &  fileName)

Map a file to a memory address.

Currently the file is only mapped read-only. The file is automatically unmapped when the memory map is deleted.

Parameters:
fileNameThe filename of the file to map.
Returns:
the pointer to the mapped file, or 0 upon error.
Version:
1.0
COBASE_API void co::base::MemoryMap::unmap ( )

Unmap the file.

Version:
1.0

The documentation for this class was generated from the following file:
Generated on Fri Jun 8 2012 15:44:34 for Equalizer 1.2.1 by  doxygen 1.8.0