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

#include <mmap_v2.h>

Collaboration diagram for wibble::sys::v2::MMap:
Collaboration graph
[legend]

Public Types

enum  ProtectMode {
  ProtectMode::Read = 0x1, ProtectMode::Write = 0x2, ProtectMode::Execute = 0x4, ProtectMode::Shared = 0x8,
  ProtectMode::Private = 0x10
}
 
using ProtectModeFlags = StrongEnumFlags< ProtectMode >
 

Public Member Functions

 MMap ()
 
 MMap (const std::string &, ProtectModeFlags=DEFAULT_MODE)
 
 MMap (int fd, ProtectModeFlags)
 
void map (const std::string &, ProtectModeFlags=DEFAULT_MODE)
 
void map (int fd, ProtectModeFlags=DEFAULT_MODE)
 
void unmap ()
 
size_t size ()
 
 operator bool ()
 
bool valid ()
 
ProtectModeFlags mode ()
 
template<typename T >
T & get (size_t offset)
 
template<typename T >
const T & cget (size_t offset) const
 
template<typename T >
const T & get (size_t offset) const
 
template<typename T >
T * asArrayOf ()
 
template<typename T >
const T * asConstArrayOf () const
 
template<typename T >
const T * asArrayOf () const
 
char & operator[] (size_t offset)
 
const char & operator[] (size_t offset) const
 

Static Public Attributes

constexpr static const
ProtectModeFlags 
defaultMode = DEFAULT_MODE
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
Read 
Write 
Execute 
Shared 
Private 

Constructor & Destructor Documentation

wibble::sys::v2::MMap::MMap ( )
inline
wibble::sys::v2::MMap::MMap ( const std::string &  ,
ProtectModeFlags  = DEFAULT_MODE 
)
wibble::sys::v2::MMap::MMap ( int  fd,
ProtectModeFlags   
)

Member Function Documentation

template<typename T >
T* wibble::sys::v2::MMap::asArrayOf ( )
inline
template<typename T >
const T* wibble::sys::v2::MMap::asArrayOf ( ) const
inline
template<typename T >
const T* wibble::sys::v2::MMap::asConstArrayOf ( ) const
inline
template<typename T >
const T& wibble::sys::v2::MMap::cget ( size_t  offset) const
inline
template<typename T >
T& wibble::sys::v2::MMap::get ( size_t  offset)
inline
template<typename T >
const T& wibble::sys::v2::MMap::get ( size_t  offset) const
inline
void wibble::sys::v2::MMap::map ( const std::string &  ,
ProtectModeFlags  = DEFAULT_MODE 
)
void wibble::sys::v2::MMap::map ( int  fd,
ProtectModeFlags  = DEFAULT_MODE 
)
ProtectModeFlags wibble::sys::v2::MMap::mode ( )
inline
wibble::sys::v2::MMap::operator bool ( )
inlineexplicit
char& wibble::sys::v2::MMap::operator[] ( size_t  offset)
inline
const char& wibble::sys::v2::MMap::operator[] ( size_t  offset) const
inline
size_t wibble::sys::v2::MMap::size ( )
inline
void wibble::sys::v2::MMap::unmap ( )
bool wibble::sys::v2::MMap::valid ( )
inline

Member Data Documentation

constexpr static const ProtectModeFlags wibble::sys::v2::MMap::defaultMode = DEFAULT_MODE
static

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