mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 13:30:36 +08:00
refactored to accept a t_config_option_keys for initializer.
This commit is contained in:
parent
832c0eb101
commit
109fdce8c8
@ -10,6 +10,12 @@ Config::new_from_defaults()
|
|||||||
}
|
}
|
||||||
std::shared_ptr<Config>
|
std::shared_ptr<Config>
|
||||||
Config::new_from_defaults(std::initializer_list<std::string> init)
|
Config::new_from_defaults(std::initializer_list<std::string> init)
|
||||||
|
{
|
||||||
|
return Config::new_from_defaults(t_config_option_keys(init));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<Config>
|
||||||
|
Config::new_from_defaults(t_config_option_keys init)
|
||||||
{
|
{
|
||||||
auto my_config(std::make_shared<Config>());
|
auto my_config(std::make_shared<Config>());
|
||||||
for (auto& opt_key : init) {
|
for (auto& opt_key : init) {
|
||||||
|
@ -5,13 +5,18 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "PrintConfig.hpp"
|
#include "PrintConfig.hpp"
|
||||||
|
#include "ConfigBase.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
class Config;
|
||||||
|
using config_ptr = std::shared_ptr<Config>;
|
||||||
|
|
||||||
class Config : public DynamicPrintConfig {
|
class Config : public DynamicPrintConfig {
|
||||||
public:
|
public:
|
||||||
static std::shared_ptr<Config> new_from_defaults();
|
static std::shared_ptr<Config> new_from_defaults();
|
||||||
static std::shared_ptr<Config> new_from_defaults(std::initializer_list<std::string> init);
|
static std::shared_ptr<Config> new_from_defaults(std::initializer_list<std::string> init);
|
||||||
|
static std::shared_ptr<Config> new_from_defaults(t_config_option_keys init);
|
||||||
static std::shared_ptr<Config> new_from_cli(const int& argc, const char* argv[]);
|
static std::shared_ptr<Config> new_from_cli(const int& argc, const char* argv[]);
|
||||||
|
|
||||||
void write_ini(const std::string& file) { save(file); }
|
void write_ini(const std::string& file) { save(file); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user