Storm 1.10.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MappedFile.h
Go to the documentation of this file.
1#pragma once
2
3#include <sys/stat.h>
4#include <cstddef>
5
7
8namespace storm {
9namespace parser {
10
22 public:
30 MappedFile(const char* filename);
31
37
43 char const* getData() const;
44
50 char const* getDataEnd() const;
51
55 std::size_t getDataSize() const;
56
57 private:
59 char* data;
60
62 char* dataEnd;
63
65 int file;
66
67#if defined LINUX
69 struct stat64 st;
70#elif defined MACOSX
72 struct stat st;
73#endif
74};
75
76} // namespace parser
77} // namespace storm
Opens a file and maps it to memory providing a char* containing the file content.
Definition MappedFile.h:21
char const * getData() const
Returns a pointer to the beginning of the mapped file data.
~MappedFile()
Destructs a MappedFile.
char const * getDataEnd() const
Returns a pointer to the end of the mapped file data.
std::size_t getDataSize() const
Returns the size of the mapped file data.
LabParser.cpp.