vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
vitrio::const_memory_range Class Reference

A stretch of memory that is only read: where it starts and how many bytes it covers. More...

#include <vitrio/const_memory_range.hpp>

Public Member Functions

 const_memory_range (const void *address, std::size_t size) noexcept
 Construct a stretch from its first byte and its size.
 const_memory_range (const memory_range &range) noexcept
 Construct the stretch a memory_range covers.
 const_memory_range (const const_memory_range &other)=default
 const_memory_range (const_memory_range &&other) noexcept=default
const_memory_range & operator= (const const_memory_range &other)=default
const_memory_range & operator= (const_memory_range &&other) noexcept=default
const void * get_address () const noexcept
 Get the first byte of the stretch.
std::size_t get_size () const noexcept
 Get how many bytes the stretch covers.

Detailed Description

A stretch of memory that is only read: where it starts and how many bytes it covers.

The counterpart of memory_range for memory that is not written through, such as what a write takes its bytes from. Every memory_range is one.

Constructor & Destructor Documentation

◆ const_memory_range() [1/2]

vitrio::const_memory_range::const_memory_range ( const void * address,
std::size_t size )
noexcept

Construct a stretch from its first byte and its size.

Parameters
addressFirst byte of the stretch.
sizeHow many bytes it covers.

◆ const_memory_range() [2/2]

vitrio::const_memory_range::const_memory_range ( const memory_range & range)
noexcept

Construct the stretch a memory_range covers.

Parameters
rangeThe stretch.

Member Function Documentation

◆ get_address()

const void * vitrio::const_memory_range::get_address ( ) const
noexcept

Get the first byte of the stretch.

Returns
const void* Its address.

◆ get_size()

std::size_t vitrio::const_memory_range::get_size ( ) const
noexcept

Get how many bytes the stretch covers.

Returns
std::size_t The size in bytes.

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