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

#include <ConfigBase.hpp>

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

Public Member Functions

 ConfigOptionFloatOrPercent ()
 
 ConfigOptionFloatOrPercent (double _value, bool _percent)
 
ConfigOptionFloatOrPercentclone () const
 
void set (const ConfigOption &option)
 
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::ConfigOptionPercent
 ConfigOptionPercent ()
 
 ConfigOptionPercent (double _value)
 
double get_abs_value (double ratio_over) const
 
- 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)
 

Public Attributes

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

Detailed Description

Combination class that can store a raw float or a percentage value. Includes a flag to indicate how it should be interpreted.

Constructor & Destructor Documentation

◆ ConfigOptionFloatOrPercent() [1/2]

Slic3r::ConfigOptionFloatOrPercent::ConfigOptionFloatOrPercent ( )
inline

◆ ConfigOptionFloatOrPercent() [2/2]

Slic3r::ConfigOptionFloatOrPercent::ConfigOptionFloatOrPercent ( double  _value,
bool  _percent 
)
inline

Member Function Documentation

◆ clone()

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

Reimplemented from Slic3r::ConfigOptionPercent.

◆ deserialize()

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

Reimplemented from Slic3r::ConfigOptionPercent.

◆ get_abs_value()

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

◆ serialize()

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

Reimplemented from Slic3r::ConfigOptionPercent.

◆ set()

void Slic3r::ConfigOptionFloatOrPercent::set ( const ConfigOption option)
inlinevirtual

Implements Slic3r::ConfigOption.

Member Data Documentation

◆ percent

bool Slic3r::ConfigOptionFloatOrPercent::percent

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