Slic3r/xs/xsp/Config.xsp

35 lines
987 B
Plaintext
Raw Normal View History

2013-12-20 19:37:28 +04:00
%module{Slic3r::XS};
%{
#include <myinit.h>
#include "PrintConfig.hpp"
2013-12-20 19:37:28 +04:00
%}
%name{Slic3r::Config} class DynamicPrintConfig {
DynamicPrintConfig();
~DynamicPrintConfig();
2013-12-20 19:37:28 +04:00
SV* get(t_config_option_key opt_key);
2013-12-20 23:54:11 +04:00
void set(t_config_option_key opt_key, SV* value);
void set_deserialize(t_config_option_key opt_key, std::string str);
std::string serialize(t_config_option_key opt_key);
float get_abs_value(t_config_option_key opt_key);
2013-12-20 19:37:28 +04:00
%{
%}
};
%name{Slic3r::Config::Print} class PrintConfig {
PrintConfig();
~PrintConfig();
SV* get(t_config_option_key opt_key);
void set(t_config_option_key opt_key, SV* value);
void set_deserialize(t_config_option_key opt_key, std::string str);
std::string serialize(t_config_option_key opt_key);
float get_abs_value(t_config_option_key opt_key);
void apply_dynamic(DynamicPrintConfig* other, bool ignore_nonexistent = false)
%code{% THIS->apply(*other, ignore_nonexistent); %};
%{
%}
};