mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Ported Slic3r::Print::State to XS
This commit is contained in:
36
xs/src/Print.cpp
Normal file
36
xs/src/Print.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "Print.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
bool
|
||||
PrintState::started(PrintStep step) const
|
||||
{
|
||||
return this->_started.find(step) != this->_started.end();
|
||||
}
|
||||
|
||||
bool
|
||||
PrintState::done(PrintStep step) const
|
||||
{
|
||||
return this->_done.find(step) != this->_done.end();
|
||||
}
|
||||
|
||||
void
|
||||
PrintState::set_started(PrintStep step)
|
||||
{
|
||||
this->_started.insert(step);
|
||||
}
|
||||
|
||||
void
|
||||
PrintState::set_done(PrintStep step)
|
||||
{
|
||||
this->_done.insert(step);
|
||||
}
|
||||
|
||||
void
|
||||
PrintState::invalidate(PrintStep step)
|
||||
{
|
||||
this->_started.erase(step);
|
||||
this->_done.erase(step);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user