|
ModErn Text Analysis
META Enumerates Textual Applications
|
Memory maps a text file readonly. More...
#include <mmap_file.h>
Classes | |
| class | mmap_file_exception |
| Basic exception for mmap_file interactions. More... | |
Public Member Functions | |
| mmap_file (const std::string &path) | |
| Constructor. More... | |
| mmap_file (mmap_file &&) | |
| Move constructor. | |
| mmap_file & | operator= (mmap_file &&) |
| Move assignment operator. | |
| ~mmap_file () | |
| Destructor; deallocates memory used to store this object, closing the text file. | |
| char | operator[] (uint64_t index) const |
| uint64_t | size () const |
| std::string | path () const |
| char * | begin () const |
Private Member Functions | |
| mmap_file (const mmap_file &other)=delete | |
| No copying */. | |
| const mmap_file & | operator= (const mmap_file &other)=delete |
| no copying */ | |
Private Attributes | |
| std::string | path_ |
| Filename of the text file. | |
| char * | start_ |
| Pointer to the beginning of the text file. | |
| uint64_t | size_ |
| Size of the current text file. | |
| int | file_descriptor_ |
| File descriptor for the open text file. | |
Memory maps a text file readonly.
| meta::io::mmap_file::mmap_file | ( | const std::string & | path | ) |
Constructor.
| path | Path to the text file to open |
| char meta::io::mmap_file::operator[] | ( | uint64_t | index | ) | const |
| index | The byte in the memory-mapped file to access |
| uint64_t meta::io::mmap_file::size | ( | ) | const |
| std::string meta::io::mmap_file::path | ( | ) | const |
| char * meta::io::mmap_file::begin | ( | ) | const |
1.8.9.1