Android-cuttlefish cvd tool
Public Member Functions | Private Attributes | List of all members
cuttlefish::ScopedMMap Class Reference

#include <shared_fd.h>

Public Member Functions

 ScopedMMap ()
 
 ScopedMMap (void *ptr, size_t len)
 
 ScopedMMap (const ScopedMMap &other)=delete
 
ScopedMMapoperator= (const ScopedMMap &other)=delete
 
 ScopedMMap (ScopedMMap &&other)
 
 ~ScopedMMap ()
 
void * get ()
 
const void * get () const
 
size_t len () const
 
 operator bool () const
 
bool WithinBounds (size_t offset, size_t length) const
 

Private Attributes

void * ptr_ = MAP_FAILED
 
size_t len_
 

Constructor & Destructor Documentation

◆ ScopedMMap() [1/4]

cuttlefish::ScopedMMap::ScopedMMap ( )

◆ ScopedMMap() [2/4]

cuttlefish::ScopedMMap::ScopedMMap ( void *  ptr,
size_t  len 
)

◆ ScopedMMap() [3/4]

cuttlefish::ScopedMMap::ScopedMMap ( const ScopedMMap other)
delete

◆ ScopedMMap() [4/4]

cuttlefish::ScopedMMap::ScopedMMap ( ScopedMMap &&  other)

◆ ~ScopedMMap()

cuttlefish::ScopedMMap::~ScopedMMap ( )

Member Function Documentation

◆ get() [1/2]

void * cuttlefish::ScopedMMap::get ( )
inline

◆ get() [2/2]

const void * cuttlefish::ScopedMMap::get ( ) const
inline

◆ len()

size_t cuttlefish::ScopedMMap::len ( ) const
inline

◆ operator bool()

cuttlefish::ScopedMMap::operator bool ( ) const
inline

◆ operator=()

ScopedMMap & cuttlefish::ScopedMMap::operator= ( const ScopedMMap other)
delete

◆ WithinBounds()

bool cuttlefish::ScopedMMap::WithinBounds ( size_t  offset,
size_t  length 
) const
inline

Member Data Documentation

◆ len_

size_t cuttlefish::ScopedMMap::len_
private

◆ ptr_

void* cuttlefish::ScopedMMap::ptr_ = MAP_FAILED
private

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