mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-13 03:51:50 +08:00
32 lines
677 B
C++
32 lines
677 B
C++
#ifndef slic3r_FindReplace_hpp_
|
|
#define slic3r_FindReplace_hpp_
|
|
|
|
#include "../PrintConfig.hpp"
|
|
|
|
#include <boost/regex.hpp>
|
|
|
|
namespace Slic3r {
|
|
|
|
class GCodeFindReplace {
|
|
public:
|
|
GCodeFindReplace(const PrintConfig &print_config);
|
|
|
|
std::string process_layer(const std::string &gcode);
|
|
|
|
private:
|
|
struct Substitution {
|
|
std::string plain_pattern;
|
|
boost::regex regexp_pattern;
|
|
std::string format;
|
|
|
|
bool regexp { false };
|
|
bool case_insensitive { false };
|
|
bool whole_word { false };
|
|
};
|
|
std::vector<Substitution> m_substitutions;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // slic3r_FindReplace_hpp_
|