MCPcopy Create free account
hub / github.com/comaps/comaps / SourceReader

Class SourceReader

generator/osm_source.hpp:23–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace generator
22{
23class SourceReader
24{
25 struct Deleter
26 {
27 bool m_needDelete;
28 Deleter(bool needDelete = true) : m_needDelete(needDelete) {}
29 void operator()(std::istream * s) const
30 {
31 if (m_needDelete)
32 delete s;
33 }
34 };
35
36 std::unique_ptr<std::istream, Deleter> m_file;
37 uint64_t m_pos = 0;
38
39public:
40 SourceReader();
41 explicit SourceReader(std::string const & filename);
42 explicit SourceReader(std::istringstream & stream);
43
44 uint64_t Read(char * buffer, uint64_t bufferSize);
45 uint64_t Pos() const { return m_pos; }
46};
47
48bool GenerateIntermediateData(feature::GenerateInfo & info);
49

Callers 2

GenerateIntermediateDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected