Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::ConfigHelpers Namespace Reference

Enumerations

enum class  DeserializationSubstitution { Disabled , DefaultsToFalse , DefaultsToTrue }
 
enum class  DeserializationResult { Loaded , Substituted , Failed }
 

Functions

bool looks_like_enum_value (std::string value)
 
bool enum_looks_like_true_value (std::string value)
 

Enumeration Type Documentation

◆ DeserializationResult

◆ DeserializationSubstitution

Function Documentation

◆ enum_looks_like_true_value()

bool Slic3r::ConfigHelpers::enum_looks_like_true_value ( std::string  value)
inline
98 {
99 boost::trim(value);
100 return boost::iequals(value, "enabled") || boost::iequals(value, "on");
101 }

Referenced by Slic3r::ConfigOptionBoolsTempl< NULLABLE >::deserialize_with_substitutions(), and Slic3r::ConfigBase::set_deserialize_raw().

+ Here is the caller graph for this function:

◆ looks_like_enum_value()

bool Slic3r::ConfigHelpers::looks_like_enum_value ( std::string  value)
inline
88 {
89 boost::trim(value);
90 if (value.empty() || value.size() > 64 || ! isalpha(value.front()))
91 return false;
92 for (const char c : value)
93 if (! (isalnum(c) || c == '_' || c == '-'))
94 return false;
95 return true;
96 }
if(!(yy_init))
Definition lexer.c:1190

Referenced by Slic3r::ConfigOptionBoolsTempl< NULLABLE >::deserialize_with_substitutions(), and Slic3r::ConfigBase::set_deserialize_raw().

+ Here is the caller graph for this function: