WPILibC++ 2024.3.2
wpi::MappedFileRegion Class Reference

#include <wpi/MappedFileRegion.h>

Public Types

enum  MapMode { kReadOnly , kReadWrite , kPriv }
 

Public Member Functions

 MappedFileRegion ()=default
 
 MappedFileRegion (fs::file_t f, uint64_t length, uint64_t offset, MapMode mapMode, std::error_code &ec)
 
 ~MappedFileRegion ()
 
 MappedFileRegion (const MappedFileRegion &)=delete
 
MappedFileRegionoperator= (const MappedFileRegion &)=delete
 
 MappedFileRegion (MappedFileRegion &&rhs)
 
MappedFileRegionoperator= (MappedFileRegion &&rhs)
 
 operator bool () const
 
void Flush ()
 
void Unmap ()
 
uint64_t size () const
 
uint8_t * data () const
 
const uint8_t * const_data () const
 

Static Public Member Functions

static size_t GetAlignment ()
 Returns required alignment. More...
 

Member Enumeration Documentation

◆ MapMode

Enumerator
kReadOnly 

May only access map via const_data as read only.

kReadWrite 

May access map via data and modify it. Written to path.

kPriv 

May modify via data, but changes are lost on destruction.

Constructor & Destructor Documentation

◆ MappedFileRegion() [1/4]

wpi::MappedFileRegion::MappedFileRegion ( )
default

◆ MappedFileRegion() [2/4]

wpi::MappedFileRegion::MappedFileRegion ( fs::file_t  f,
uint64_t  length,
uint64_t  offset,
MapMode  mapMode,
std::error_code &  ec 
)

◆ ~MappedFileRegion()

wpi::MappedFileRegion::~MappedFileRegion ( )
inline

◆ MappedFileRegion() [3/4]

wpi::MappedFileRegion::MappedFileRegion ( const MappedFileRegion )
delete

◆ MappedFileRegion() [4/4]

wpi::MappedFileRegion::MappedFileRegion ( MappedFileRegion &&  rhs)
inline

Member Function Documentation

◆ const_data()

const uint8_t * wpi::MappedFileRegion::const_data ( ) const
inline

◆ data()

uint8_t * wpi::MappedFileRegion::data ( ) const
inline

◆ Flush()

void wpi::MappedFileRegion::Flush ( )

◆ GetAlignment()

static size_t wpi::MappedFileRegion::GetAlignment ( )
static

Returns required alignment.

◆ operator bool()

wpi::MappedFileRegion::operator bool ( ) const
inlineexplicit

◆ operator=() [1/2]

MappedFileRegion & wpi::MappedFileRegion::operator= ( const MappedFileRegion )
delete

◆ operator=() [2/2]

MappedFileRegion & wpi::MappedFileRegion::operator= ( MappedFileRegion &&  rhs)
inline

◆ size()

uint64_t wpi::MappedFileRegion::size ( ) const
inline

◆ Unmap()

void wpi::MappedFileRegion::Unmap ( )

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