This repository has been archived on 2025-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
organicmaps-tmp/track_analyzing/log_parser.hpp
2017-10-17 15:16:05 +03:00

30 lines
815 B
C++

#pragma once
#include "track_analyzing/track.hpp"
#include "routing_common/num_mwm_id.hpp"
#include "geometry/tree4d.hpp"
#include <memory>
#include <string>
namespace track_analyzing
{
class LogParser final
{
public:
LogParser(std::shared_ptr<routing::NumMwmIds> numMwmIds,
std::unique_ptr<m4::Tree<routing::NumMwmId>> mwmTree, std::string const & dataDir);
void Parse(std::string const & logFile, MwmToTracks & mwmToTracks) const;
private:
void ParseUserTracks(std::string const & logFile, UserToTrack & userToTrack) const;
void SplitIntoMwms(UserToTrack const & userToTrack, MwmToTracks & mwmToTracks) const;
std::shared_ptr<routing::NumMwmIds> m_numMwmIds;
std::shared_ptr<m4::Tree<routing::NumMwmId>> m_mwmTree;
std::string const m_dataDir;
};
} // namespace track_analyzing