mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 23:54:00 -06:00
Finished porting PlaceholderParser to XS
This commit is contained in:
parent
249088b4f8
commit
580d28d071
10 changed files with 87 additions and 98 deletions
|
@ -11,19 +11,26 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
typedef std::map<std::string, std::string> t_strstr_map;
|
||||
typedef std::map<std::string, std::vector<std::string> > t_strstrs_map;
|
||||
|
||||
class PlaceholderParser
|
||||
{
|
||||
public:
|
||||
std::map<std::string, std::string> _single;
|
||||
std::map<std::string, std::string> _multiple;
|
||||
|
||||
t_strstr_map _single;
|
||||
t_strstrs_map _multiple;
|
||||
|
||||
PlaceholderParser();
|
||||
void update_timestamp();
|
||||
void apply_config(DynamicPrintConfig &config);
|
||||
void apply_env_variables();
|
||||
void set(const std::string &key, const std::string &value);
|
||||
void set(const std::string &key, int value);
|
||||
void set(const std::string &key, const std::vector<std::string> &values);
|
||||
void set(const std::string &key, std::vector<std::string> values);
|
||||
std::string process(std::string str) const;
|
||||
|
||||
private:
|
||||
bool find_and_replace(std::string &source, std::string const &find, std::string const &replace) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue