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

Function UnpackMwm

generator/unpack_mwm.cpp:15–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace generator
14{
15void UnpackMwm(std::string const & filePath)
16{
17 LOG(LINFO, ("Unpacking mwm sections..."));
18
19 FilesContainerR container(filePath);
20 std::vector<std::string> tags;
21 container.ForEachTag(base::MakeBackInsertFunctor<std::vector<std::string>>(tags));
22
23 for (size_t i = 0; i < tags.size(); ++i)
24 {
25 LOG(LINFO, ("Unpacking", tags[i]));
26
27 ReaderSource<FilesContainerR::TReader> reader(container.GetReader(tags[i]));
28 FileWriter writer(filePath + "." + tags[i]);
29
30 rw::ReadAndWrite(reader, writer, 1024 * 1024);
31 }
32
33 LOG(LINFO, ("Unpacking done."));
34}
35
36void DeleteSection(std::string const & filePath, std::string const & tag)
37{

Callers 1

generator_tool.cppFile · 0.85

Calls 4

ReadAndWriteFunction · 0.85
ForEachTagMethod · 0.45
sizeMethod · 0.45
GetReaderMethod · 0.45

Tested by

no test coverage detected