~ubuntu-branches/ubuntu/utopic/slic3r/utopic

« back to all changes in this revision

Viewing changes to xs/src/Print.cpp

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2014-06-17 01:27:26 UTC
  • Revision ID: package-import@ubuntu.com-20140617012726-2wrs4zdo251nr4vg
Tags: upstream-1.1.4+dfsg
ImportĀ upstreamĀ versionĀ 1.1.4+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "Print.hpp"
 
2
 
 
3
namespace Slic3r {
 
4
 
 
5
bool
 
6
PrintState::started(PrintStep step) const
 
7
{
 
8
    return this->_started.find(step) != this->_started.end();
 
9
}
 
10
 
 
11
bool
 
12
PrintState::done(PrintStep step) const
 
13
{
 
14
    return this->_done.find(step) != this->_done.end();
 
15
}
 
16
 
 
17
void
 
18
PrintState::set_started(PrintStep step)
 
19
{
 
20
    this->_started.insert(step);
 
21
}
 
22
 
 
23
void
 
24
PrintState::set_done(PrintStep step)
 
25
{
 
26
    this->_done.insert(step);
 
27
}
 
28
 
 
29
void
 
30
PrintState::invalidate(PrintStep step)
 
31
{
 
32
    this->_started.erase(step);
 
33
    this->_done.erase(step);
 
34
}
 
35
 
 
36
void
 
37
PrintState::invalidate_all()
 
38
{
 
39
    this->_started.clear();
 
40
    this->_done.clear();
 
41
}
 
42
 
 
43
#ifdef SLIC3RXS
 
44
REGISTER_CLASS(PrintState, "Print::State");
 
45
#endif
 
46
 
 
47
}