delpi
0.0.1
DElta-complete LP solver
Toggle main menu visibility
Loading...
Searching...
No Matches
MappedFileSource.cpp
Go to the documentation of this file.
1
7
#include "
delpi/parser/MappedFileSource.h
"
8
9
namespace
delpi
{
10
11
MappedFileSource::MappedFileSource
(
const
char
*
const
filename)
12
: BufferLineSource{nullptr, 0},
13
file_mapping_
{filename, boost::interprocess::read_only},
14
region_
{
file_mapping_
, boost::interprocess::read_only} {
15
region_
.advise(boost::interprocess::mapped_region::advice_sequential);
16
initialize
(
static_cast<
const
char
*
>
(
region_
.get_address()),
region_
.get_size());
17
}
18
19
}
// namespace delpi
MappedFileSource.h
delpi::BufferLineSource::initialize
void initialize(const char *data, std::size_t length)
Force a reinitialization of the object, setting cur_ and end_ to the new values.
Definition
BufferLineSource.cpp:28
delpi::MappedFileSource::MappedFileSource
MappedFileSource(const char *const filename)
Construct a MappedFileSource for the given file.
Definition
MappedFileSource.cpp:11
delpi::MappedFileSource::file_mapping_
const boost::interprocess::file_mapping file_mapping_
The file mapping object that manages the mapping of the file into memory.
Definition
MappedFileSource.h:34
delpi::MappedFileSource::region_
boost::interprocess::mapped_region region_
The mapped region object that provides access to the mapped file content.
Definition
MappedFileSource.h:36
delpi
Global namespace for the delpi library.
delpi
parser
MappedFileSource.cpp
Generated by
1.17.0