BitShares-Core
6.1.0
BitShares blockchain implementation and command-line interface software
libraries
fc
include
fc
interprocess
file_mapping.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
fc/fwd.hpp
>
3
#include <cstdint>
4
#include <cstdlib>
5
6
namespace
boost
{
7
namespace
interprocess {
8
class
file_mapping;
9
class
mapped_region;
10
}
11
}
12
namespace
fc
{
13
enum
mode_t
{
14
read_only
,
15
write_only
,
16
read_write
17
};
18
19
class
file_mapping
{
20
public
:
21
file_mapping
(
const
char
* file,
mode_t
);
22
~
file_mapping
();
23
private
:
24
friend
class
mapped_region
;
25
#ifdef _WIN64
26
fc::fwd<boost::interprocess::file_mapping,0x38>
my;
27
#else
28
fc::fwd<boost::interprocess::file_mapping,0x28>
my;
29
#endif
30
};
31
32
class
mapped_region
{
33
public
:
34
mapped_region
(
const
file_mapping
& fm,
mode_t
m, uint64_t start,
size_t
size );
35
mapped_region
(
const
file_mapping
& fm,
mode_t
m );
36
~
mapped_region
();
37
void
flush();
38
void
* get_address()
const
;
39
size_t
get_size()
const
;
40
private
:
41
fc::fwd<boost::interprocess::mapped_region,40>
my;
42
};
43
}
fc::fwd
Used to forward declare value types.
Definition:
fwd.hpp:10
boost
Definition:
object.hpp:149
fwd.hpp
fc::mapped_region
Definition:
file_mapping.hpp:32
fc::read_only
Definition:
file_mapping.hpp:14
fc::file_mapping
Definition:
file_mapping.hpp:19
fc
Definition:
api.hpp:15
fc::read_write
Definition:
file_mapping.hpp:16
fc::mode_t
mode_t
Definition:
file_mapping.hpp:13
fc::write_only
Definition:
file_mapping.hpp:15
Generated on Thu Dec 1 2022 10:13:44 for BitShares-Core by
1.8.13