%module{Slic3r::XS};

%{
#include <myinit.h>
#include "Extruder.hpp"
%}

%name{Slic3r::Extruder} class Extruder {
    Extruder(int id, PrintConfig *config);
    ~Extruder();
    void reset();
    double extrude(double dE);
    
    int id() const
        %code%{ RETVAL = THIS->id; %};
    
    double E() const
        %code%{ RETVAL = THIS->E; %};
    double set_E(double val) const
        %code%{ RETVAL = THIS->E = val; %};
    double absolute_E() const
        %code%{ RETVAL = THIS->absolute_E; %};
    double set_absolute_E(double val) const
        %code%{ RETVAL = THIS->absolute_E = val; %};
    double retracted() const
        %code%{ RETVAL = THIS->retracted; %};
    double set_retracted(double val) const
        %code%{ RETVAL = THIS->retracted = val; %};
    double restart_extra() const
        %code%{ RETVAL = THIS->restart_extra; %};
    double set_restart_extra(double val) const
        %code%{ RETVAL = THIS->restart_extra = val; %};
    
    Clone<Pointf> extruder_offset() const;
    double nozzle_diameter() const;
    double filament_diameter() const;
    double extrusion_multiplier() const;
    int temperature() const;
    int first_layer_temperature() const;
    double retract_length() const;
    double retract_lift() const;
    int retract_speed() const;
    double retract_restart_extra() const;
    double retract_before_travel() const;
    bool retract_layer_change() const;
    double retract_length_toolchange() const;
    double retract_restart_extra_toolchange() const;
    bool wipe() const;
};
