2022-08-10 21:51:16 +03:00
|
|
|
#pragma once
|
|
|
|
|
2022-08-11 16:43:53 +03:00
|
|
|
#include <utils/editor.hpp>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace clippy::targets {
|
|
|
|
class Target;
|
|
|
|
}
|
|
|
|
|
2022-08-10 21:51:16 +03:00
|
|
|
class Config {
|
2022-08-11 16:43:53 +03:00
|
|
|
public:
|
2022-08-11 21:42:53 +03:00
|
|
|
Config(std::string path, std::string initial_directory)
|
|
|
|
: path_(std::move(path)), initial_directory_(initial_directory) {}
|
2022-08-11 16:43:53 +03:00
|
|
|
|
|
|
|
void Edit() { utils::OpenEditor(path_); }
|
|
|
|
|
|
|
|
std::unique_ptr<clippy::targets::Target> GetTarget(const std::string& target);
|
2022-08-10 21:51:16 +03:00
|
|
|
|
2022-08-11 16:43:53 +03:00
|
|
|
private:
|
|
|
|
std::string path_;
|
2022-08-11 21:42:53 +03:00
|
|
|
std::string initial_directory_;
|
2022-08-10 21:51:16 +03:00
|
|
|
};
|