2014-05-06 08:07:18 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
2015-12-07 23:39:54 +00:00
|
|
|
#include <xsinit.h>
|
2014-05-06 08:07:18 +00:00
|
|
|
#include <vector>
|
2014-08-03 17:42:29 +00:00
|
|
|
#include "libslic3r/PlaceholderParser.hpp"
|
2014-05-06 08:07:18 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
%name{Slic3r::GCode::PlaceholderParser} class PlaceholderParser {
|
2015-07-01 15:56:38 +00:00
|
|
|
PlaceholderParser();
|
2014-05-06 08:07:18 +00:00
|
|
|
~PlaceholderParser();
|
2014-11-09 19:41:27 +00:00
|
|
|
|
2014-06-13 13:32:11 +00:00
|
|
|
void apply_config(DynamicPrintConfig *config)
|
2014-11-09 19:41:27 +00:00
|
|
|
%code%{ THIS->apply_config(*config); %};
|
2017-11-17 10:15:46 +00:00
|
|
|
void set(std::string key, int value);
|
2017-07-31 13:42:55 +00:00
|
|
|
std::string process(std::string str) const
|
2017-12-05 14:54:24 +00:00
|
|
|
%code%{
|
|
|
|
try {
|
|
|
|
RETVAL = THIS->process(str, 0);
|
|
|
|
} catch (std::exception& e) {
|
|
|
|
croak(e.what());
|
|
|
|
}
|
|
|
|
%};
|
2014-05-06 08:07:18 +00:00
|
|
|
};
|