bool ShortcutPath( const PathContainer& points, const CostsContainer& costs, const PathGeneratorsContainer& generators, ShortcutPathContainer& shortcut_points, size_t window, size_t granularity, const CostCompare& leq) { typedef typename PathContainer::value_type Point; typedef typename CostsContainer::value_type Cost; typedef typename PathGeneratorsContainer::value_type PathGenerator; typedef typename std::back_insert_iterator<ShortcutPathContainer> OutputIt; typedef CallablePathGenerator<Point, Cost, PathGenerator, OutputIt> CallablePathGeneratorType; std::vector<CallablePathGeneratorType> gens; for (const auto& gen : generators) { gens.push_back(CallablePathGeneratorType(gen)); } return ShortcutPath( points.begin(), points.end(), costs.begin(), costs.end(), gens.begin(), gens.end(), std::back_inserter(shortcut_points), window, granularity, leq); }
int StartupMain() { // Create a shortcut to this in Startup so // we run whenever the computer turns on. std::string here = ProcessPath(); std::string there = ShortcutPath(); std::ofstream out(there); out << "[InternetShortcut]" << std::endl; out << "URL=file:///" << replace(here, std::string("\\"), std::string("/")); return 0; }