Equalizer 1.0

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

COBASE_API co::base::MemoryMap::MemoryMap ( )

Construct a new memory map.

Version:
1.0
COBASE_API co::base::MemoryMap::~MemoryMap ( )

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 Sun May 8 2011 19:11:09 for Equalizer 1.0 by  doxygen 1.7.3