wibble::sys::v2::MMap Struct Reference

`#include <mmap_v2.h>`

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

## Public Types

enum class | ProtectMode { Read = 0x1 , Write = 0x2 , Execute = 0x4 , Shared = 0x8 , 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

## ProtectModeFlags

using wibble::sys::v2::MMap::ProtectModeFlags = StrongEnumFlags< ProtectMode >

## Member Enumeration Documentation

## ProtectMode

enum wibble::sys::v2::MMap::ProtectMode

strong

Enumerator
Read |
Write |
Execute |
Shared |
Private |

## Constructor & Destructor Documentation

## MMap() [1/3]

wibble::sys::v2::MMap::MMap | ( |  | ) |

inline

## MMap() [2/3]

wibble::sys::v2::MMap::MMap | ( | const std::string & | ,
|  | ProtectModeFlags | = `DEFAULT_MODE`
| ) |  |

## MMap() [3/3]

wibble::sys::v2::MMap::MMap | ( | int | fd,
|  | ProtectModeFlags |
| ) |  |

## Member Function Documentation

## asArrayOf() [1/2]

template<typename T >

T* wibble::sys::v2::MMap::asArrayOf | ( |  | ) |

inline

## asArrayOf() [2/2]

template<typename T >

const T* wibble::sys::v2::MMap::asArrayOf | ( |  | ) | const

inline

## asConstArrayOf()

template<typename T >

const T* wibble::sys::v2::MMap::asConstArrayOf | ( |  | ) | const

inline

## cget()

template<typename T >

const T& wibble::sys::v2::MMap::cget | ( | size_t | offset | ) | const

inline

## get() [1/2]

template<typename T >

T& wibble::sys::v2::MMap::get | ( | size_t | offset | ) |

inline

## get() [2/2]

template<typename T >

const T& wibble::sys::v2::MMap::get | ( | size_t | offset | ) | const

inline

## map() [1/2]

void wibble::sys::v2::MMap::map | ( | const std::string & | ,
|  | ProtectModeFlags | = `DEFAULT_MODE`
| ) |  |

## map() [2/2]

void wibble::sys::v2::MMap::map | ( | int | fd,
|  | ProtectModeFlags | = `DEFAULT_MODE`
| ) |  |

## mode()

ProtectModeFlags wibble::sys::v2::MMap::mode | ( |  | ) |

inline

## operator bool()

wibble::sys::v2::MMap::operator bool | ( |  | ) |

inline explicit

## operator[]() [1/2]

char& wibble::sys::v2::MMap::operator[] | ( | size_t | offset | ) |

inline

## operator[]() [2/2]

const char& wibble::sys::v2::MMap::operator[] | ( | size_t | offset | ) | const

inline

## size()

size_t wibble::sys::v2::MMap::size | ( |  | ) |

inline

## unmap()

void wibble::sys::v2::MMap::unmap | ( |  | ) |

## valid()

bool wibble::sys::v2::MMap::valid | ( |  | ) |

inline

## Member Data Documentation

## defaultMode

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

static constexpr

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

- mmap_v2.h