delpi  0.0.1
DElta-complete LP solver
Loading...
Searching...
No Matches
MappedFileSource.cpp
Go to the documentation of this file.
1
8
9namespace delpi {
10
11MappedFileSource::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
void initialize(const char *data, std::size_t length)
Force a reinitialization of the object, setting cur_ and end_ to the new values.
MappedFileSource(const char *const filename)
Construct a MappedFileSource for the given file.
const boost::interprocess::file_mapping file_mapping_
The file mapping object that manages the mapping of the file into memory.
boost::interprocess::mapped_region region_
The mapped region object that provides access to the mapped file content.
Global namespace for the delpi library.