apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

MMap Class Reference

#include <mmap.h>

Inheritance diagram for MMap:
[legend]
Collaboration diagram for MMap:
[legend]

Public Types

enum  OpenFlags {
  NoImmMap = (1<<0) , Public = (1<<1) , ReadOnly = (1<<2) , UnMapped = (1<<3) ,
  Moveable = (1<<4) , Fallback = (1 << 5)
}
 

Public Member Functions

 operator void * ()
 
void * Data ()
 
unsigned long long Size ()
 
void AddSize (unsigned long long const size)
 
bool validData () const
 
bool Sync ()
 
bool Sync (unsigned long Start, unsigned long Stop)
 
 MMap (FileFd &F, unsigned long Flags)
 
 MMap (unsigned long Flags)
 
virtual ~MMap ()
 

Protected Member Functions

bool Map (FileFd &Fd)
 
bool Close (bool DoSync=true)
 

Protected Attributes

unsigned long Flags
 
unsigned long long iSize
 
void * Base
 
FileFdSyncToFd
 

Detailed Description

Definition at line 40 of file mmap.h.

Member Enumeration Documentation

◆ OpenFlags

enum OpenFlags
Enumerator
NoImmMap 
Public 
ReadOnly 
UnMapped 
Moveable 
Fallback 

Definition at line 58 of file mmap.h.

Constructor & Destructor Documentation

◆ MMap() [1/2]

MMap ( FileFd F,
unsigned long  Flags 
)

Definition at line 38 of file mmap.cc.

References Flags, Map(), and NoImmMap.

◆ MMap() [2/2]

MMap ( unsigned long  Flags)
explicit

Definition at line 48 of file mmap.cc.

◆ ~MMap()

~MMap ( )
virtual

Definition at line 56 of file mmap.cc.

References Close().

Member Function Documentation

◆ AddSize()

void AddSize ( unsigned long long const  size)
inline

Definition at line 65 of file mmap.h.

References iSize.

◆ Close()

bool Close ( bool  DoSync = true)
protected

Definition at line 132 of file mmap.cc.

References Base, Flags, iSize, Sync(), SyncToFd, UnMapped, and validData().

Referenced by DynamicMMap::~DynamicMMap(), and ~MMap().

◆ Data()

◆ Map()

bool Map ( FileFd Fd)
protected

◆ operator void *()

operator void * ( )
inline

Definition at line 62 of file mmap.h.

References Base.

◆ Size()

◆ Sync() [1/2]

◆ Sync() [2/2]

bool Sync ( unsigned long  Start,
unsigned long  Stop 
)

Definition at line 187 of file mmap.cc.

References Base, Flags, ReadOnly, FileFd::Seek(), SyncToFd, UnMapped, and FileFd::Write().

◆ validData()

Member Data Documentation

◆ Base

◆ Flags

unsigned long Flags
protected

Definition at line 44 of file mmap.h.

Referenced by Close(), DynamicMMap::Grow(), Map(), MMap(), and Sync().

◆ iSize

unsigned long long iSize
protected

◆ SyncToFd

FileFd* SyncToFd
protected

Definition at line 51 of file mmap.h.

Referenced by Close(), Map(), and Sync().


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