47f193fe2d
a real boost::spirit::qi parser, accessing the DynamicConfig repository directly. This is a first step towards a full fledged expression interpreter.
19 lines
475 B
Plaintext
19 lines
475 B
Plaintext
%module{Slic3r::XS};
|
|
|
|
%{
|
|
#include <xsinit.h>
|
|
#include <vector>
|
|
#include "libslic3r/PlaceholderParser.hpp"
|
|
%}
|
|
|
|
%name{Slic3r::GCode::PlaceholderParser} class PlaceholderParser {
|
|
PlaceholderParser();
|
|
~PlaceholderParser();
|
|
|
|
void apply_config(DynamicPrintConfig *config)
|
|
%code%{ THIS->apply_config(*config); %};
|
|
void set(std::string key, int value);
|
|
std::string process(std::string str) const
|
|
%code%{ RETVAL = THIS->process(str, 0); %};
|
|
};
|