libslic3r
Library for generating gcode from 3d models
Public Member Functions | List of all members
Slic3r::ConfigOptionPercent Class Reference

Specialized floating point class to represent some percentage value of another numeric configuration option. More...

#include <ConfigBase.hpp>

Inheritance diagram for Slic3r::ConfigOptionPercent:
Slic3r::ConfigOptionFloat Slic3r::ConfigOptionSingle< double > Slic3r::ConfigOption Slic3r::ConfigOptionFloatOrPercent

Public Member Functions

 ConfigOptionPercent ()
 
 ConfigOptionPercent (double _value)
 
ConfigOptionPercentclone () const
 
double get_abs_value (double ratio_over) const
 
std::string serialize () const
 
bool deserialize (std::string str, bool append=false)
 
- Public Member Functions inherited from Slic3r::ConfigOptionFloat
 ConfigOptionFloat ()
 
 ConfigOptionFloat (double _value)
 
double getFloat () const override
 
void setFloat (double val) override
 
void setInt (int val) override
 
std::string getString () const override
 
template<typename Y >
bool operator== (const Y &other)
 Floating point values we conpare within some small value for equality. More...
 
- Public Member Functions inherited from Slic3r::ConfigOptionSingle< double >
 ConfigOptionSingle (double _value)
 
 operator double () const
 
double operator() () const
 
void set (const ConfigOption &option)
 
- Public Member Functions inherited from Slic3r::ConfigOption
virtual ~ConfigOption ()
 
virtual int getInt () const
 
virtual bool getBool () const
 
virtual void setString (std::string val)
 

Additional Inherited Members

- Public Attributes inherited from Slic3r::ConfigOptionSingle< double >
double value
 

Detailed Description

Specialized floating point class to represent some percentage value of another numeric configuration option.

Constructor & Destructor Documentation

◆ ConfigOptionPercent() [1/2]

Slic3r::ConfigOptionPercent::ConfigOptionPercent ( )
inline

◆ ConfigOptionPercent() [2/2]

Slic3r::ConfigOptionPercent::ConfigOptionPercent ( double  _value)
inline

Member Function Documentation

◆ clone()

ConfigOptionPercent* Slic3r::ConfigOptionPercent::clone ( ) const
inlinevirtual

Reimplemented from Slic3r::ConfigOptionFloat.

Reimplemented in Slic3r::ConfigOptionFloatOrPercent.

◆ deserialize()

bool Slic3r::ConfigOptionPercent::deserialize ( std::string  str,
bool  append = false 
)
inlinevirtual

Reimplemented from Slic3r::ConfigOptionFloat.

Reimplemented in Slic3r::ConfigOptionFloatOrPercent.

◆ get_abs_value()

double Slic3r::ConfigOptionPercent::get_abs_value ( double  ratio_over) const
inline

Calculate the value of this option as it relates to some other numerical value.

◆ serialize()

std::string Slic3r::ConfigOptionPercent::serialize ( ) const
inlinevirtual

Reimplemented from Slic3r::ConfigOptionFloat.

Reimplemented in Slic3r::ConfigOptionFloatOrPercent.


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