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

#include <src/libslic3r/Config.hpp>

+ Inheritance diagram for Slic3r::ConfigOptionResolver:

Public Member Functions

 ConfigOptionResolver ()
 
virtual ~ConfigOptionResolver ()
 
virtual const ConfigOptionoptptr (const t_config_option_key &opt_key) const =0
 
bool has (const t_config_option_key &opt_key) const
 
const ConfigOptionoption (const t_config_option_key &opt_key) const
 
template<typename TYPE >
const TYPE * option (const t_config_option_key &opt_key) const
 
const ConfigOptionoption_throw (const t_config_option_key &opt_key) const
 
template<typename TYPE >
const TYPE * option_throw (const t_config_option_key &opt_key) const
 

Detailed Description

Constructor & Destructor Documentation

◆ ConfigOptionResolver()

Slic3r::ConfigOptionResolver::ConfigOptionResolver ( )
inline
2099{}

◆ ~ConfigOptionResolver()

virtual Slic3r::ConfigOptionResolver::~ConfigOptionResolver ( )
inlinevirtual
2100{}

Member Function Documentation

◆ has()

◆ option() [1/2]

const ConfigOption * Slic3r::ConfigOptionResolver::option ( const t_config_option_key opt_key) const
inline
2107{ return this->optptr(opt_key); }

References optptr().

Referenced by Slic3r::Flow::extrusion_width(), Slic3r::Flow::extrusion_width(), and Slic3r::PrintObject::invalidate_state_by_config_options().

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

◆ option() [2/2]

template<typename TYPE >
const TYPE * Slic3r::ConfigOptionResolver::option ( const t_config_option_key opt_key) const
inline
2111 {
2112 const ConfigOption* opt = this->optptr(opt_key);
2113 return (opt == nullptr || opt->type() != TYPE::static_type()) ? nullptr : static_cast<const TYPE*>(opt);
2114 }

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

+ Here is the call graph for this function:

◆ option_throw() [1/2]

const ConfigOption * Slic3r::ConfigOptionResolver::option_throw ( const t_config_option_key opt_key) const
inline
2117 {
2118 const ConfigOption* opt = this->optptr(opt_key);
2119 if (opt == nullptr)
2120 throw UnknownOptionException(opt_key);
2121 return opt;
2122 }

References optptr().

Referenced by option_throw().

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

◆ option_throw() [2/2]

template<typename TYPE >
const TYPE * Slic3r::ConfigOptionResolver::option_throw ( const t_config_option_key opt_key) const
inline
2126 {
2127 const ConfigOption* opt = this->option_throw(opt_key);
2128 if (opt->type() != TYPE::static_type())
2129 throw BadOptionTypeException("Conversion to a wrong type");
2130 return static_cast<TYPE*>(opt);
2131 }
const ConfigOption * option_throw(const t_config_option_key &opt_key) const
Definition Config.hpp:2116

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

+ Here is the call graph for this function:

◆ optptr()

virtual const ConfigOption * Slic3r::ConfigOptionResolver::optptr ( const t_config_option_key opt_key) const
pure virtual

Implemented in Slic3r::DynamicConfig, Slic3r::client::MyContext, and Slic3r::ConfigBase.

Referenced by has(), option(), and option_throw().

+ Here is the caller graph for this function:

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