Moved read_ini and write_ini to cpp file, added more comments

This commit is contained in:
Joseph Lenox 2018-07-12 12:08:46 -05:00
parent eacc24fc96
commit c3ff41b0c2
2 changed files with 23 additions and 2 deletions

View File

@ -56,6 +56,16 @@ Config::set(const t_config_option_key& opt_key, const double value)
{
}
void
read_ini(const std::string& file)
{
}
void
write_ini(const std::string& file) const
{
}
} // namespace Slic3r

View File

@ -27,13 +27,24 @@ using config_ptr = std::shared_ptr<Config>;
class Config : public DynamicPrintConfig {
public:
/// Factory method to construct a Config with all default values loaded.
static std::shared_ptr<Config> new_from_defaults();
/// Factory method to construct a Config with specific default values loaded.
static std::shared_ptr<Config> new_from_defaults(std::initializer_list<std::string> init);
/// Factory method to construct a Config with specific default values loaded.
static std::shared_ptr<Config> new_from_defaults(t_config_option_keys init);
/// Factory method to construct a Config from CLI options.
static std::shared_ptr<Config> new_from_cli(const int& argc, const char* argv[]);
void write_ini(const std::string& file) { save(file); }
void read_ini(const std::string& file) { load(file); }
/// Write a windows-style opt=value ini file with categories from the configuration store.
void write_ini(const std::string& file) const;
/// Parse a windows-style opt=value ini file with categories and load the configuration store.
void read_ini(const std::string& file);
/// Template function to retrieve and cast in hopefully a slightly nicer
/// format than longwinded dynamic_cast<>