Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
IFileMapper.h
Go to the documentation of this file.
1#pragma once
2#include <cstddef>
3#include <misc/global.h>
4
5namespace sf
6{
7
12{
13 public:
17 IFileMapper() = default;
18
22 virtual ~IFileMapper() = default;
23
28 virtual void initialize() = 0;
29
35 virtual void createView(size_t sz) = 0;
36
41 virtual bool mapView() = 0;
42
48 virtual bool unmapView() = 0;
49
55 virtual void* getPtr() = 0;
56
64 static IFileMapper* instantiate(bool native);
65};
66
67}// namespace sf
class for file mapping
Definition IFileMapper.h:12
virtual void * getPtr()=0
Gets the pointer locked using method mapView().
virtual void initialize()=0
Initialize and prepare the underlying system when needed.
virtual bool unmapView()=0
Unlocks the pointer locked with mapView().
IFileMapper()=default
Default constructor.
static IFileMapper * instantiate(bool native)
Gets an instance of this interface using a native or non-native (Qt) implementation.
virtual void createView(size_t sz)=0
Allocates disk space the file map.
virtual ~IFileMapper()=default
Virtual destructor.
virtual bool mapView()=0
Locks a pointer in memory which can be unlocked using unmapView().
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10