~EmitterImpl() override { Classificator const & c = classif(); stringstream ss; ss << endl; for (auto const & p : m_mapTypes) ss << c.GetReadableObjectName(p.first) << " : " << p.second << endl; LOG_SHORT(LINFO, ("World types:", ss.str())); }
int main(int argc, char * argv[]) { // Our double parsing code (base/string_utils.hpp) needs dots as a floating point delimiters, not commas. // TODO: Refactor our doubles parsing code to use locale-independent delimiters. // For example, https://github.com/google/double-conversion can be used. // See http://dbaron.org/log/20121222-locale for more details. (void)::setenv("LC_NUMERIC", "C", 1); InitializeFinalize mainGuard; UNUSED_VALUE(mainGuard); QApplication a(argc, argv); #ifdef DEBUG alohalytics::Stats::Instance().SetDebugMode(true); #endif GetPlatform().SetupMeasurementSystem(); // display EULA if needed char const * settingsEULA = "EulaAccepted"; bool eulaAccepted = false; if (!Settings::Get(settingsEULA, eulaAccepted) || !eulaAccepted) { QStringList buttons; buttons << "Accept" << "Decline"; string buffer; { ReaderPtr<Reader> reader = GetPlatform().GetReader("eula.html"); reader.ReadAsString(buffer); } qt::InfoDialog eulaDialog("MAPS.ME End User Licensing Agreement", buffer.c_str(), NULL, buttons); eulaAccepted = (eulaDialog.exec() == 1); Settings::Set(settingsEULA, eulaAccepted); } int returnCode = -1; if (eulaAccepted) // User has accepted EULA { qt::MainWindow w; w.show(); returnCode = a.exec(); } dbg::ObjectTracker::PrintLeaks(); LOG_SHORT(LINFO, ("MapsWithMe finished with code", returnCode)); return returnCode; }
explicit EmitterImpl(feature::GenerateInfo const & info) : m_output(info.GetTmpFileName(WORLD_FILE_NAME)) { LOG_SHORT(LINFO, ("Output World file:", info.GetTmpFileName(WORLD_FILE_NAME))); }
SourceReader::SourceReader(istringstream & stream) : m_file(unique_ptr<istream, Deleter>(&stream, Deleter(false))) { LOG_SHORT(LINFO, ("Reading OSM data from memory")); }
SourceReader::SourceReader(string const & filename) { m_file = unique_ptr<istream, Deleter>(new ifstream(filename), Deleter()); CHECK(static_cast<ifstream *>(m_file.get())->is_open() , ("Can't open file:", filename)); LOG_SHORT(LINFO, ("Reading OSM data from", filename)); }
SourceReader::SourceReader() : m_file(unique_ptr<istream, Deleter>(&cin, Deleter(false))) { LOG_SHORT(LINFO, ("Reading OSM data from stdin")); }