1
2
3
4
5
6 #ifndef SOULNG_UTIL_MAPPED_INPUT_FILE_INCLUDED
7 #define SOULNG_UTIL_MAPPED_INPUT_FILE_INCLUDED
8 #include <soulng/util/UtilApi.hpp>
9 #include <string>
10 #include <stdint.h>
11
12 namespace soulng { namespace util {
13
14 class MappedInputFileImpl;
15
16 class MappedInputFile
17 {
18 public:
19 MappedInputFile(const std::string& fileName_);
20 ~MappedInputFile();
21 const char* Begin() const;
22 const char* End() const;
23 private:
24 std::string fileName;
25 MappedInputFileImpl* impl;
26 };
27
28 std::string ReadFile(const std::string& fileName);
29
30 } }
31
32 #endif // SOULNG_UTIL_MAPPED_INPUT_FILE_INCLUDED