OrcaSlicer latest
OrcaSlicer
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

Enumerator
Loaded 
Substituted 
Failed 
129 {
130 Loaded,
132 Failed,
133 };
@ Substituted
Definition Config.hpp:131

◆ DeserializationSubstitution

Enumerator
Disabled 
DefaultsToFalse 
DefaultsToTrue 
123 {
124 Disabled,
127 };
@ Disabled
Definition Button.hpp:27

Function Documentation

◆ enum_looks_like_true_value()

bool Slic3r::ConfigHelpers::enum_looks_like_true_value ( std::string value)
inline
118 {
119 boost::trim(value);
120 return boost::iequals(value, "enabled") || boost::iequals(value, "on");
121 }

Referenced by Slic3r::ConfigOptionBoolsTempl< false >::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
108 {
109 boost::trim(value);
110 if (value.empty() || value.size() > 64 || ! isalpha(value.front()))
111 return false;
112 for (const char c : value)
113 if (! (isalnum(c) || c == '_' || c == '-'))
114 return false;
115 return true;
116 }

Referenced by Slic3r::ConfigOptionBoolsTempl< false >::deserialize_with_substitutions().

Here is the caller graph for this function: