OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{IMEXHelpers.cpp} Namespace Reference

Functions

void strip_whitespace (std::string &token)
ImexMode imex_mode_at (const ConfigOptionStrings *names, const ConfigOptionStrings *tools, const ConfigOptionStrings *gcodes, size_t i)

Function Documentation

◆ imex_mode_at()

ImexMode Slic3r::anonymous_namespace{IMEXHelpers.cpp}::imex_mode_at ( const ConfigOptionStrings * names,
const ConfigOptionStrings * tools,
const ConfigOptionStrings * gcodes,
size_t i )
652{
653 ImexMode m;
654 m.index = (int) i;
655 m.name = names->values[i];
656 const bool has_tools = tools != nullptr && i < tools->values.size();
657 const bool has_gcode = gcodes != nullptr && i < gcodes->values.size();
658 if (has_tools) m.active_tools = tools->values[i];
659 if (has_gcode) m.gcode = gcodes->values[i];
660 m.ragged = !has_tools || !has_gcode;
661 return m;
662}
std::vector< T > values
Definition Config.hpp:418
Definition IMEXHelpers.hpp:63
int index
Definition IMEXHelpers.hpp:66
std::string active_tools
Definition IMEXHelpers.hpp:70
bool ragged
Definition IMEXHelpers.hpp:75
std::string gcode
Definition IMEXHelpers.hpp:72
std::string name
Definition IMEXHelpers.hpp:68

References Slic3r::ImexMode::active_tools, Slic3r::ImexMode::gcode, imex_mode_at(), Slic3r::ImexMode::index, Slic3r::ImexMode::name, Slic3r::ImexMode::ragged, and Slic3r::ConfigOptionVector< T >::values.

Referenced by imex_mode_at().

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

◆ strip_whitespace()

void Slic3r::anonymous_namespace{IMEXHelpers.cpp}::strip_whitespace ( std::string & token)
45{
46 token.erase(std::remove_if(token.begin(), token.end(),
47 [](unsigned char c) { return std::isspace(c) != 0; }),
48 token.end());
49}

References strip_whitespace().

Referenced by strip_whitespace().

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