libslic3r
Library for generating gcode from 3d models
|
An abstract configuration store. More...
#include <ConfigBase.hpp>
Public Member Functions | |
ConfigBase () | |
ConfigBase (const ConfigDef *def) | |
virtual | ~ConfigBase () |
bool | has (const t_config_option_key &opt_key) const |
const ConfigOption * | option (const t_config_option_key &opt_key) const |
ConfigOption * | option (const t_config_option_key &opt_key, bool create=false) |
template<class T > | |
T * | opt (const t_config_option_key &opt_key, bool create=false) |
template<class T > | |
const T * | opt (const t_config_option_key &opt_key) const |
virtual ConfigOption * | optptr (const t_config_option_key &opt_key, bool create=false)=0 |
virtual t_config_option_keys | keys () const =0 |
void | apply (const ConfigBase &other, bool ignore_nonexistent=false) |
void | apply_only (const ConfigBase &other, const t_config_option_keys &opt_keys, bool ignore_nonexistent=false) |
bool | equals (const ConfigBase &other) const |
t_config_option_keys | diff (const ConfigBase &other) const |
std::string | serialize (const t_config_option_key &opt_key) const |
virtual bool | set_deserialize (t_config_option_key opt_key, std::string str, bool append=false) |
double | get_abs_value (const t_config_option_key &opt_key) const |
double | get_abs_value (const t_config_option_key &opt_key, double ratio_over) const |
void | setenv_ () |
void | load (const std::string &file) |
void | save (const std::string &file) const |
Public Attributes | |
const ConfigDef * | def |
An abstract configuration store.
|
inline |
|
inline |
|
inlinevirtual |
void Slic3r::ConfigBase::apply | ( | const ConfigBase & | other, |
bool | ignore_nonexistent = false |
||
) |
void Slic3r::ConfigBase::apply_only | ( | const ConfigBase & | other, |
const t_config_option_keys & | opt_keys, | ||
bool | ignore_nonexistent = false |
||
) |
t_config_option_keys Slic3r::ConfigBase::diff | ( | const ConfigBase & | other | ) | const |
bool Slic3r::ConfigBase::equals | ( | const ConfigBase & | other | ) | const |
double Slic3r::ConfigBase::get_abs_value | ( | const t_config_option_key & | opt_key | ) | const |
double Slic3r::ConfigBase::get_abs_value | ( | const t_config_option_key & | opt_key, |
double | ratio_over | ||
) | const |
bool Slic3r::ConfigBase::has | ( | const t_config_option_key & | opt_key | ) | const |
|
pure virtual |
Implemented in Slic3r::StaticConfig, and Slic3r::DynamicConfig.
void Slic3r::ConfigBase::load | ( | const std::string & | file | ) |
|
inline |
|
inline |
const ConfigOption * Slic3r::ConfigBase::option | ( | const t_config_option_key & | opt_key | ) | const |
ConfigOption * Slic3r::ConfigBase::option | ( | const t_config_option_key & | opt_key, |
bool | create = false |
||
) |
|
pure virtual |
void Slic3r::ConfigBase::save | ( | const std::string & | file | ) | const |
std::string Slic3r::ConfigBase::serialize | ( | const t_config_option_key & | opt_key | ) | const |
|
virtual |
Reimplemented in Slic3r::PrintConfigBase.
void Slic3r::ConfigBase::setenv_ | ( | ) |
const ConfigDef* Slic3r::ConfigBase::def |
Definition of configuration values for the purpose of GUI presentation, editing, value mapping and config file handling. The configuration definition is static: It does not carry the actual configuration values, but it carries the defaults of the configuration values. ConfigBase does not own ConfigDef, it only references it.