Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::ConfigOptionVectorBase Class Referenceabstract

#include <src/libslic3r/Config.hpp>

+ Inheritance diagram for Slic3r::ConfigOptionVectorBase:
+ Collaboration diagram for Slic3r::ConfigOptionVectorBase:

Public Member Functions

virtual std::vector< std::string > vserialize () const =0
 
virtual void set (const std::vector< const ConfigOption * > &rhs)=0
 
virtual void set_at (const ConfigOption *rhs, size_t i, size_t j)=0
 
virtual void resize (size_t n, const ConfigOption *opt_default=nullptr)=0
 
virtual void clear ()=0
 
virtual size_t size () const =0
 
virtual bool empty () const =0
 
virtual bool is_nil (size_t idx) const =0
 
virtual void set (const ConfigOption *option)=0
 
virtual bool is_nil () const
 
virtual ConfigOptionType type () const =0
 
virtual std::string serialize () const =0
 
virtual bool deserialize (const std::string &str, bool append=false)=0
 
virtual ConfigOptionclone () const =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 overriden_by (const ConfigOption *rhs) const
 
virtual bool apply_override (const ConfigOption *rhs)
 

Protected Member Functions

ConfigOptionType scalar_type () const
 

Detailed Description

Member Function Documentation

◆ apply_override()

virtual bool Slic3r::ConfigOption::apply_override ( const ConfigOption rhs)
inlinevirtualinherited

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

290 {
291 if (*this == *rhs)
292 return false;
293 *this = *rhs;
294 return true;
295 }

Referenced by Slic3r::print_config_diffs().

+ Here is the caller graph for this function:

◆ clear()

virtual void Slic3r::ConfigOptionVectorBase::clear ( )
pure virtual

◆ clone()

◆ deserialize()

◆ empty()

◆ getBool()

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

Reimplemented in Slic3r::ConfigOptionBool.

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

Referenced by Slic3r::client::MyContext::scalar_variable_to_expr().

+ Here is the caller graph for this function:

◆ getFloat()

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

Reimplemented in Slic3r::ConfigOptionFloat.

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

Referenced by Slic3r::GUI::TabSLAMaterial::build(), Slic3r::GUI::get_string_value(), Slic3r::client::MyContext::scalar_variable_to_expr(), and Slic3r::GUI::Sidebar::update_sliced_info_sizer().

+ Here is the caller graph for this function:

◆ getInt()

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

◆ hash()

◆ is_nil() [1/2]

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

Reimplemented from Slic3r::ConfigOption.

282{ return false; }

◆ is_nil() [2/2]

virtual bool Slic3r::ConfigOptionVectorBase::is_nil ( size_t  idx) const
pure virtual

◆ is_scalar()

bool Slic3r::ConfigOption::is_scalar ( ) const
inlineinherited
277{ return (int(this->type()) & int(coVectorType)) == 0; }
virtual ConfigOptionType type() const =0
@ coVectorType
Definition Config.hpp:161

References Slic3r::coVectorType, and Slic3r::ConfigOption::type().

Referenced by Slic3r::PresetBundle::full_fff_config(), Slic3r::client::MyContext::is_nil_test(), Slic3r::ConfigOption::is_vector(), Slic3r::client::MyContext::legacy_variable_expansion(), Slic3r::PresetBundle::load_config_file_config(), Slic3r::client::MyContext::scalar_variable_assign_scalar(), Slic3r::client::MyContext::scalar_variable_to_expr(), Slic3r::client::MyContext::vector_variable_assign_array(), Slic3r::client::MyContext::vector_variable_assign_initializer_list(), and Slic3r::client::MyContext::vector_variable_new_from_array().

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

◆ is_vector()

◆ nullable()

virtual bool Slic3r::ConfigOption::nullable ( ) const
inlinevirtualinherited

◆ operator!=()

bool Slic3r::ConfigOption::operator!= ( const ConfigOption rhs) const
inlineinherited
275{ return ! (*this == rhs); }

◆ operator==()

◆ overriden_by()

virtual bool Slic3r::ConfigOption::overriden_by ( const ConfigOption rhs) const
inlinevirtualinherited

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

285 {
286 assert(! this->nullable() && ! rhs->nullable());
287 return *this != *rhs;
288 }
virtual bool nullable() const
Definition Config.hpp:280

References Slic3r::ConfigOption::nullable().

Referenced by Slic3r::print_config_diffs().

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

◆ resize()

virtual void Slic3r::ConfigOptionVectorBase::resize ( size_t  n,
const ConfigOption opt_default = nullptr 
)
pure virtual

◆ scalar_type()

ConfigOptionType Slic3r::ConfigOptionVectorBase::scalar_type ( ) const
inlineprotected
369{ return static_cast<ConfigOptionType>(this->type() - coVectorType); }
ConfigOptionType
Definition Config.hpp:160

References Slic3r::coVectorType, and Slic3r::ConfigOption::type().

Referenced by Slic3r::ConfigOptionVector< T >::set(), and Slic3r::ConfigOptionVector< T >::set_at().

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

◆ serialize()

◆ set() [1/2]

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

Implements Slic3r::ConfigOption.

◆ set() [2/2]

◆ set_at()

virtual void Slic3r::ConfigOptionVectorBase::set_at ( const ConfigOption rhs,
size_t  i,
size_t  j 
)
pure virtual

◆ setInt()

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

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

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

◆ size()

◆ type()

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

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

Referenced by Slic3r::Search::OptionsSearcher::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::ConfigOption::is_scalar(), Slic3r::client::MyContext::legacy_variable_expansion2(), Slic3r::PresetBundle::load_config_file_config(), Slic3r::PresetBundle::load_config_file_config_bundle(), Slic3r::ConfigOptionSingle< T >::operator==(), Slic3r::ConfigOptionVector< T >::operator==(), Slic3r::ConfigOptionFloatsTempl< NULLABLE >::operator==(), Slic3r::ConfigOptionFloatOrPercent::operator==(), Slic3r::ConfigOptionFloatsOrPercentsTempl< NULLABLE >::operator==(), Slic3r::ConfigOptionEnum< T >::operator==(), Slic3r::ConfigOptionEnumGeneric::operator==(), Slic3r::ConfigOptionResolver::option(), Slic3r::ConfigBase::option(), Slic3r::ConfigOptionResolver::option_throw(), Slic3r::ConfigBase::option_throw(), Slic3r::ConfigOptionVector< T >::overriden_by(), Slic3r::DynamicConfig::read_cli(), scalar_type(), Slic3r::client::MyContext::scalar_variable_assign_scalar(), Slic3r::client::MyContext::scalar_variable_to_expr(), Slic3r::ConfigOptionSingle< T >::set(), Slic3r::ConfigOptionVector< T >::set(), Slic3r::ConfigOptionFloatOrPercent::set(), Slic3r::ConfigOptionEnum< T >::set(), Slic3r::ConfigOptionEnumGeneric::set(), Slic3r::ConfigBase::set(), Slic3r::ConfigBase::set(), Slic3r::ConfigOptionVector< T >::set(), Slic3r::ConfigOptionVector< T >::set_at(), Slic3r::validate(), 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:

◆ vserialize()

virtual std::vector< std::string > Slic3r::ConfigOptionVectorBase::vserialize ( ) const
pure virtual

The documentation for this class was generated from the following file: