OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::ConfigOption Class Referenceabstract

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Config.hpp>

Inheritance diagram for Slic3r::ConfigOption:

Public Member Functions

virtual ~ConfigOption ()
virtual ConfigOptionType type () const =0
virtual std::string serialize () const =0
virtual bool deserialize (const std::string &str, bool append=false)=0
virtual ConfigOption * clone () const =0
virtual void set (const ConfigOption *option)=0
virtual int getInt () const
virtual double getFloat () const
virtual bool getBool () const
virtual void setInt (int)
virtual bool operator== (const ConfigOption &rhs) const =0
bool operator!= (const ConfigOption &rhs) const
virtual size_t hash () const throw () =0
bool is_scalar () const
bool is_vector () const
virtual bool nullable () const
virtual bool is_nil () const
virtual bool overriden_by (const ConfigOption *rhs) const
virtual bool apply_override (const ConfigOption *rhs, std::vector< int > &default_index)

Detailed Description

Constructor & Destructor Documentation

◆ ~ConfigOption()

virtual Slic3r::ConfigOption::~ConfigOption ( )
inlinevirtual
286{}

Member Function Documentation

◆ apply_override()

virtual bool Slic3r::ConfigOption::apply_override ( const ConfigOption * rhs,
std::vector< int > & default_index )
inlinevirtual

Reimplemented in Slic3r::ConfigOptionVector< T >, Slic3r::ConfigOptionVector< double >, Slic3r::ConfigOptionVector< FloatOrPercent >, Slic3r::ConfigOptionVector< int >, Slic3r::ConfigOptionVector< std::string >, Slic3r::ConfigOptionVector< std::vector< int > >, Slic3r::ConfigOptionVector< unsigned char >, Slic3r::ConfigOptionVector< Vec2d >, and Slic3r::ConfigOptionVector< Vec2ds >.

314 {
315 if (*this == *rhs)
316 return false;
317 *this = *rhs;
318 return true;
319 }

Referenced by Slic3r::compute_filament_override_value().

Here is the caller graph for this function:

◆ clone()

virtual ConfigOption * Slic3r::ConfigOption::clone ( ) const
pure virtual

Implemented in Slic3r::ConfigOptionBool, Slic3r::ConfigOptionBoolsTempl< NULLABLE >, Slic3r::ConfigOptionBoolsTempl< false >, Slic3r::ConfigOptionBoolsTempl< true >, Slic3r::ConfigOptionEnum< T >, Slic3r::ConfigOptionEnum< BrimType >, Slic3r::ConfigOptionEnumGeneric, Slic3r::ConfigOptionEnumsGenericTempl< NULLABLE >, Slic3r::ConfigOptionEnumsGenericTempl< false >, Slic3r::ConfigOptionEnumsGenericTempl< true >, Slic3r::ConfigOptionFloat, Slic3r::ConfigOptionFloatOrPercent, Slic3r::ConfigOptionFloatsOrPercentsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsOrPercentsTempl< false >, Slic3r::ConfigOptionFloatsOrPercentsTempl< true >, Slic3r::ConfigOptionFloatsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsTempl< false >, Slic3r::ConfigOptionFloatsTempl< true >, Slic3r::ConfigOptionInt, Slic3r::ConfigOptionIntsGroups, Slic3r::ConfigOptionIntsTempl< NULLABLE >, Slic3r::ConfigOptionIntsTempl< false >, Slic3r::ConfigOptionIntsTempl< true >, Slic3r::ConfigOptionPercent, Slic3r::ConfigOptionPercentsTempl< NULLABLE >, Slic3r::ConfigOptionPercentsTempl< false >, Slic3r::ConfigOptionPercentsTempl< true >, Slic3r::ConfigOptionPoint3, Slic3r::ConfigOptionPoint, Slic3r::ConfigOptionPoints, Slic3r::ConfigOptionPointsGroups, Slic3r::ConfigOptionString, and Slic3r::ConfigOptionStrings.

Referenced by Slic3r::DynamicConfig::DynamicConfig(), Slic3r::GUI::ObjectList::add_category_to_settings_from_frequent(), Slic3r::GUI::ObjectList::add_category_to_settings_from_selection(), Slic3r::GUI::TabFilament::add_filament_overrides_page(), Slic3r::GUI::ObjectSettings::add_missed_options(), Slic3r::GUI::ObjectTableSettings::add_missed_options(), Slic3r::GUI::ConfigManipulation::apply(), Slic3r::SLAPrint::apply(), Slic3r::PlaceholderParser::apply_config(), Slic3r::PlaceholderParser::apply_only(), Slic3r::compute_filament_override_value(), Slic3r::GUI::Tab::load_config(), Slic3r::PresetCollection::load_user_preset(), Slic3r::GUI::ObjectList::merge(), Slic3r::GUI::ObjectList::paste_settings_into_list(), Slic3r::CLI::run(), Slic3r::GUI::PartPlate::set_vase_mode_related_object_config(), Slic3r::GUI::ObjectGridTable::update_filament_to_config(), Slic3r::DynamicPrintConfig::update_non_diff_values_to_base_config(), Slic3r::GUI::ObjectGridTable::update_value_to_config(), and Slic3r::client::MyContext::vector_variable_new_from_copy().

Here is the caller graph for this function:

◆ deserialize()

virtual bool Slic3r::ConfigOption::deserialize ( const std::string & str,
bool append = false )
pure virtual

Implemented in Slic3r::ConfigOptionBool, Slic3r::ConfigOptionBoolsTempl< NULLABLE >, Slic3r::ConfigOptionBoolsTempl< false >, Slic3r::ConfigOptionBoolsTempl< true >, Slic3r::ConfigOptionEnum< T >, Slic3r::ConfigOptionEnum< BrimType >, Slic3r::ConfigOptionEnumGeneric, Slic3r::ConfigOptionEnumsGenericTempl< NULLABLE >, Slic3r::ConfigOptionEnumsGenericTempl< false >, Slic3r::ConfigOptionEnumsGenericTempl< true >, Slic3r::ConfigOptionFloat, Slic3r::ConfigOptionFloatOrPercent, Slic3r::ConfigOptionFloatsOrPercentsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsOrPercentsTempl< false >, Slic3r::ConfigOptionFloatsOrPercentsTempl< true >, Slic3r::ConfigOptionFloatsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsTempl< false >, Slic3r::ConfigOptionFloatsTempl< true >, Slic3r::ConfigOptionInt, Slic3r::ConfigOptionIntsGroups, Slic3r::ConfigOptionIntsTempl< NULLABLE >, Slic3r::ConfigOptionIntsTempl< false >, Slic3r::ConfigOptionIntsTempl< true >, Slic3r::ConfigOptionPercent, Slic3r::ConfigOptionPoint3, Slic3r::ConfigOptionPoint, Slic3r::ConfigOptionPoints, Slic3r::ConfigOptionPointsGroups, Slic3r::ConfigOptionString, and Slic3r::ConfigOptionStrings.

References Slic3r::append().

Referenced by Slic3r::DynamicConfig::read_cli().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBool()

virtual bool Slic3r::ConfigOption::getBool ( ) const
inlinevirtual

Reimplemented in Slic3r::ConfigOptionBool.

296{ throw BadOptionTypeException("Calling ConfigOption::getBool on a non-boolean ConfigOption"); }

Referenced by Slic3r::_BBS_3MF_Exporter::_add_model_config_file_to_archive(), Slic3r::GUI::MenuFactory::append_menu_items_flush_options(), Slic3r::Print::apply(), Slic3r::GUI::PartPlate::estimate_wipe_tower_footprint(), Slic3r::GUI::PartPlate::get_extruders(), Slic3r::GUI::PartPlate::get_extruders_under_cli(), Slic3r::GUI::PartPlate::get_object_filament_extruders(), and Slic3r::GUI::ArrangeJob::prepare_wipe_tower().

Here is the caller graph for this function:

◆ getFloat()

virtual double Slic3r::ConfigOption::getFloat ( ) const
inlinevirtual

Reimplemented in Slic3r::ConfigOptionFloat.

295{ throw BadOptionTypeException("Calling ConfigOption::getFloat on a non-float ConfigOption"); }

Referenced by Slic3r::estimate_wipe_tower_first_layer_outline(), Slic3r::GUI::PartPlate::estimate_wipe_tower_footprint(), Slic3r::GUI::PartPlate::get_object_filament_extruders(), Slic3r::GUI::get_string_value(), Slic3r::CLI::run(), Slic3r::client::MyContext::scalar_variable_to_expr(), Slic3r::client::MyContext::vector_element_to_expr(), and Slic3r::GUI::PartPlate::wipe_tower_obstacles().

Here is the caller graph for this function:

◆ getInt()

virtual int Slic3r::ConfigOption::getInt ( ) const
inlinevirtual

Reimplemented in Slic3r::ConfigOptionEnum< T >, Slic3r::ConfigOptionEnum< BrimType >, and Slic3r::ConfigOptionInt.

294{ throw BadOptionTypeException("Calling ConfigOption::getInt on a non-int ConfigOption"); }

Referenced by Slic3r::_BBS_3MF_Exporter::_add_model_config_file_to_archive(), Slic3r::estimate_wipe_tower_first_layer_outline(), Slic3r::GUI::PartPlate::estimate_wipe_tower_footprint(), Slic3r::GUI::ConfigOptionsGroup::get_config_value(), Slic3r::GUI::ConfigOptionsGroup::get_config_value2(), Slic3r::GUI::PartPlate::get_extruders(), Slic3r::GUI::PartPlate::get_extruders_under_cli(), Slic3r::get_instance_arrange_poly(), Slic3r::GUI::PartPlate::get_object_filament_extruders(), Slic3r::GUI::get_string_from_enum(), Slic3r::PrintConfigDef::handle_legacy_composite(), Slic3r::client::MyContext::legacy_variable_expansion2(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::DynamicPrintConfig::normalize_fdm(), Slic3r::DynamicPrintConfig::normalize_fdm_1(), Slic3r::ConfigOptionEnum< T >::operator==(), Slic3r::ConfigOptionEnumGeneric::operator==(), Slic3r::DynamicConfig::opt_enum(), Slic3r::prime_tower_is_printed(), Slic3r::GUI::GLGizmoMmuSegmentation::remap_filament_assignments(), Slic3r::resolve_wipe_tower_type(), Slic3r::ConfigOptionEnum< T >::set(), Slic3r::ConfigOptionEnumGeneric::set(), Slic3r::GUI::GCodeViewer::update_layers_slider_mode(), and Slic3r::GUI::PartPlate::wipe_tower_obstacles().

Here is the caller graph for this function:

◆ hash()

◆ is_nil()

◆ is_scalar()

bool Slic3r::ConfigOption::is_scalar ( ) const
inline

◆ is_vector()

bool Slic3r::ConfigOption::is_vector ( ) const
inline
302{ return ! this->is_scalar(); }
bool is_scalar() const
Definition Config.hpp:301

References is_scalar().

Referenced by Slic3r::client::MyContext::copy_vector_variable_to_vector_variable(), Slic3r::PresetBundle::load_config_file_config(), Slic3r::GUI::Tab::options_list_storage_key(), Slic3r::DynamicConfig::read_cli(), Slic3r::client::MyContext::scalar_variable_new_from_scalar_expression(), Slic3r::client::MyContext::vector_variable_element_assign_scalar(), and Slic3r::client::MyContext::vector_variable_new_from_copy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nullable()

◆ operator!=()

bool Slic3r::ConfigOption::operator!= ( const ConfigOption & rhs) const
inline
299{ return ! (*this == rhs); }

◆ operator==()

◆ overriden_by()

virtual bool Slic3r::ConfigOption::overriden_by ( const ConfigOption * rhs) const
inlinevirtual

Reimplemented in Slic3r::ConfigOptionVector< T >, Slic3r::ConfigOptionVector< double >, Slic3r::ConfigOptionVector< FloatOrPercent >, Slic3r::ConfigOptionVector< int >, Slic3r::ConfigOptionVector< std::string >, Slic3r::ConfigOptionVector< std::vector< int > >, Slic3r::ConfigOptionVector< unsigned char >, Slic3r::ConfigOptionVector< Vec2d >, and Slic3r::ConfigOptionVector< Vec2ds >.

309 {
310 assert(! this->nullable() && ! rhs->nullable());
311 return *this != *rhs;
312 }
virtual bool nullable() const
Definition Config.hpp:304

References nullable().

Here is the call graph for this function:

◆ serialize()

virtual std::string Slic3r::ConfigOption::serialize ( ) const
pure virtual

Implemented in Slic3r::ConfigOptionBool, Slic3r::ConfigOptionBoolsTempl< NULLABLE >, Slic3r::ConfigOptionBoolsTempl< false >, Slic3r::ConfigOptionBoolsTempl< true >, Slic3r::ConfigOptionEnum< T >, Slic3r::ConfigOptionEnum< BrimType >, Slic3r::ConfigOptionEnumGeneric, Slic3r::ConfigOptionEnumsGenericTempl< NULLABLE >, Slic3r::ConfigOptionEnumsGenericTempl< false >, Slic3r::ConfigOptionEnumsGenericTempl< true >, Slic3r::ConfigOptionFloat, Slic3r::ConfigOptionFloatOrPercent, Slic3r::ConfigOptionFloatsOrPercentsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsOrPercentsTempl< false >, Slic3r::ConfigOptionFloatsOrPercentsTempl< true >, Slic3r::ConfigOptionFloatsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsTempl< false >, Slic3r::ConfigOptionFloatsTempl< true >, Slic3r::ConfigOptionInt, Slic3r::ConfigOptionIntsGroups, Slic3r::ConfigOptionIntsTempl< NULLABLE >, Slic3r::ConfigOptionIntsTempl< false >, Slic3r::ConfigOptionIntsTempl< true >, Slic3r::ConfigOptionPercent, Slic3r::ConfigOptionPercentsTempl< NULLABLE >, Slic3r::ConfigOptionPercentsTempl< false >, Slic3r::ConfigOptionPercentsTempl< true >, Slic3r::ConfigOptionPoint3, Slic3r::ConfigOptionPoint, Slic3r::ConfigOptionPoints, Slic3r::ConfigOptionPointsGroups, Slic3r::ConfigOptionSingle< T >, Slic3r::ConfigOptionSingle< bool >, Slic3r::ConfigOptionSingle< BrimType >, Slic3r::ConfigOptionSingle< double >, Slic3r::ConfigOptionSingle< int >, Slic3r::ConfigOptionSingle< std::string >, Slic3r::ConfigOptionSingle< Vec2d >, Slic3r::ConfigOptionSingle< Vec3d >, Slic3r::ConfigOptionString, and Slic3r::ConfigOptionStrings.

Referenced by Slic3r::PresetCollection::get_differed_values_to_update(), Slic3r::anonymous_namespace{PrintConfig.cpp}::log_normalize_legacy_vector_size(), Slic3r::CLI::run(), Slic3r::DynamicPrintConfig::update_diff_values_to_child_config(), and Slic3r::DynamicPrintConfig::update_non_diff_values_to_base_config().

Here is the caller graph for this function:

◆ set()

virtual void Slic3r::ConfigOption::set ( const ConfigOption * option)
pure virtual

Implemented in Slic3r::ConfigOptionEnum< T >, Slic3r::ConfigOptionEnum< BrimType >, Slic3r::ConfigOptionEnumGeneric, Slic3r::ConfigOptionEnumsGenericTempl< NULLABLE >, Slic3r::ConfigOptionEnumsGenericTempl< false >, Slic3r::ConfigOptionEnumsGenericTempl< true >, Slic3r::ConfigOptionFloatOrPercent, Slic3r::ConfigOptionSingle< T >, Slic3r::ConfigOptionSingle< bool >, Slic3r::ConfigOptionSingle< BrimType >, Slic3r::ConfigOptionSingle< double >, Slic3r::ConfigOptionSingle< int >, Slic3r::ConfigOptionSingle< std::string >, Slic3r::ConfigOptionSingle< Vec2d >, Slic3r::ConfigOptionSingle< Vec3d >, Slic3r::ConfigOptionVector< T >, Slic3r::ConfigOptionVector< double >, Slic3r::ConfigOptionVector< FloatOrPercent >, Slic3r::ConfigOptionVector< int >, Slic3r::ConfigOptionVector< std::string >, Slic3r::ConfigOptionVector< std::vector< int > >, Slic3r::ConfigOptionVector< unsigned char >, Slic3r::ConfigOptionVector< Vec2d >, Slic3r::ConfigOptionVector< Vec2ds >, and Slic3r::ConfigOptionVectorBase.

Referenced by Slic3r::ConfigBase::apply_only(), Slic3r::PresetBundle::construct_full_config(), Slic3r::PresetBundle::full_fff_config(), Slic3r::PresetCollection::get_preset_differed_for_save(), Slic3r::ConfigOptionVectorBase::is_nil(), Slic3r::CLI::run(), Slic3r::Preset::save(), Slic3r::DynamicPrintConfig::update_diff_values_to_child_config(), Slic3r::DynamicPrintConfig::update_non_diff_values_to_base_config(), Slic3r::update_static_print_config_from_dynamic(), and Slic3r::GUI::ObjectTableSettings::ValueChanged().

Here is the caller graph for this function:

◆ setInt()

virtual void Slic3r::ConfigOption::setInt ( int )
inlinevirtual

Reimplemented in Slic3r::ConfigOptionEnum< T >, Slic3r::ConfigOptionEnum< BrimType >, and Slic3r::ConfigOptionInt.

297{ throw BadOptionTypeException("Calling ConfigOption::setInt on a non-int ConfigOption"); }

Referenced by Slic3r::DynamicPrintConfig::normalize_fdm(), and Slic3r::DynamicPrintConfig::normalize_fdm_1().

Here is the caller graph for this function:

◆ type()

virtual ConfigOptionType Slic3r::ConfigOption::type ( ) const
pure virtual

Implemented in Slic3r::ConfigOptionBool, Slic3r::ConfigOptionBoolsTempl< NULLABLE >, Slic3r::ConfigOptionBoolsTempl< false >, Slic3r::ConfigOptionBoolsTempl< true >, Slic3r::ConfigOptionEnum< T >, Slic3r::ConfigOptionEnum< BrimType >, Slic3r::ConfigOptionEnumGeneric, Slic3r::ConfigOptionEnumsGenericTempl< NULLABLE >, Slic3r::ConfigOptionEnumsGenericTempl< false >, Slic3r::ConfigOptionEnumsGenericTempl< true >, Slic3r::ConfigOptionFloat, Slic3r::ConfigOptionFloatOrPercent, Slic3r::ConfigOptionFloatsOrPercentsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsOrPercentsTempl< false >, Slic3r::ConfigOptionFloatsOrPercentsTempl< true >, Slic3r::ConfigOptionFloatsTempl< NULLABLE >, Slic3r::ConfigOptionFloatsTempl< false >, Slic3r::ConfigOptionFloatsTempl< true >, Slic3r::ConfigOptionInt, Slic3r::ConfigOptionIntsGroups, Slic3r::ConfigOptionIntsTempl< NULLABLE >, Slic3r::ConfigOptionIntsTempl< false >, Slic3r::ConfigOptionIntsTempl< true >, Slic3r::ConfigOptionPercent, Slic3r::ConfigOptionPercentsTempl< NULLABLE >, Slic3r::ConfigOptionPercentsTempl< false >, Slic3r::ConfigOptionPercentsTempl< true >, Slic3r::ConfigOptionPoint3, Slic3r::ConfigOptionPoint, Slic3r::ConfigOptionPoints, Slic3r::ConfigOptionPointsGroups, Slic3r::ConfigOptionString, and Slic3r::ConfigOptionStrings.

Referenced by Slic3r::ConfigOptionVector< T >::append(), Slic3r::Search::SettingsIndex::append_options(), Slic3r::ConfigOptionVector< T >::apply_override(), Slic3r::client::MyContext::copy_vector_variable_to_vector_variable(), Slic3r::deep_diff(), Slic3r::ConfigBase::get_abs_value(), Slic3r::ConfigBase::get_abs_value(), Slic3r::ConfigBase::get_abs_value_at(), Slic3r::GUI::ObjectGridTable::GetValue(), is_scalar(), Slic3r::client::MyContext::legacy_variable_expansion2(), Slic3r::PresetBundle::load_config_file_config(), Slic3r::ConfigOptionEnum< T >::operator==(), Slic3r::ConfigOptionEnumGeneric::operator==(), Slic3r::ConfigOptionFloat::operator==(), Slic3r::ConfigOptionFloatOrPercent::operator==(), Slic3r::ConfigOptionFloatsOrPercentsTempl< false >::operator==(), Slic3r::ConfigOptionFloatsTempl< false >::operator==(), Slic3r::ConfigOptionIntsGroups::operator==(), Slic3r::ConfigOptionPointsGroups::operator==(), Slic3r::ConfigOptionSingle< T >::operator==(), Slic3r::ConfigOptionVector< T >::operator==(), Slic3r::ConfigOptionVector< T >::overriden_by(), Slic3r::DynamicConfig::read_cli(), Slic3r::ConfigOptionVectorBase::scalar_type(), Slic3r::client::MyContext::scalar_variable_assign_scalar(), Slic3r::client::MyContext::scalar_variable_to_expr(), Slic3r::ConfigOptionEnum< T >::set(), Slic3r::ConfigOptionEnumGeneric::set(), Slic3r::ConfigOptionEnumsGenericTempl< false >::set(), Slic3r::ConfigOptionFloatOrPercent::set(), Slic3r::ConfigOptionSingle< T >::set(), Slic3r::ConfigOptionVector< T >::set(), Slic3r::ConfigOptionVector< T >::set(), Slic3r::ConfigOptionVector< T >::set_at(), Slic3r::ConfigOptionVector< T >::set_only_diff(), Slic3r::ConfigOptionVector< T >::set_to_index(), Slic3r::ConfigOptionVector< T >::set_with_nil(), Slic3r::ConfigOptionVector< T >::set_with_restore(), Slic3r::ConfigOptionVector< T >::set_with_restore_2(), Slic3r::DynamicPrintConfig::update_non_diff_values_to_base_config(), Slic3r::client::MyContext::vector_element_to_expr(), Slic3r::client::MyContext::vector_variable_assign_expr_with_count(), Slic3r::client::MyContext::vector_variable_assign_initializer_list(), Slic3r::client::MyContext::vector_variable_element_assign_scalar(), and Slic3r::client::MyContext::vector_variable_new_from_copy().

Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Config.hpp