3 #include <cpl_virtualmem.h>
7 #include "../forward.h"
9 namespace isce3 {
namespace io {
namespace gdal {
namespace detail {
14 MemoryMap() : _mmap(
nullptr, [](CPLVirtualMem *) {}) {}
16 explicit operator bool()
const {
return _mmap.get(); }
19 void * data() {
return CPLVirtualMemGetAddr(_mmap.get()); }
22 const void * data()
const {
return CPLVirtualMemGetAddr(_mmap.get()); }
25 std::size_t size()
const {
return CPLVirtualMemGetSize(_mmap.get()); }
28 CPLVirtualMemAccessMode access()
const {
return CPLVirtualMemGetAccessMode(_mmap.get()); }
31 std::size_t colstride()
const {
return _colstride; }
34 std::size_t rowstride()
const {
return _rowstride; }
44 std::shared_ptr<CPLVirtualMem> _mmap;
45 std::size_t _colstride = 0;
46 std::size_t _rowstride = 0;
Definition: MemoryMap.h:11
Wrapper for GDALRasterBand representing a single raster.
Definition: Raster.h:14
GDALAccess access() const
Access mode.
Definition: Raster.h:146