7484752ed500d0658f52d51d36cfd3b0a21bd321
[occt.git] / src / Message / Message_ProgressSentry.lxx
1 #include <Message_ProgressIndicator.hxx>
2
3 //=======================================================================
4 //function : Relieve
5 //purpose  : 
6 //=======================================================================
7
8 inline void Message_ProgressSentry::Relieve ()
9 {
10   if ( ! myActive ) return;
11   myProgress->EndScope();
12   myActive = 0;
13 }
14
15 //=======================================================================
16 //function : Next
17 //purpose  : 
18 //=======================================================================
19
20 inline void Message_ProgressSentry::Next (const Standard_CString name) const
21 {
22   if ( myActive ) myProgress->NextScope(name);
23 }
24
25 //=======================================================================
26 //function : Next
27 //purpose  : 
28 //=======================================================================
29
30 inline void Message_ProgressSentry::Next (const Standard_Real span, 
31                                           const Standard_CString name) const
32 {
33   if ( myActive ) myProgress->NextScope(span, name);
34 }
35
36 //=======================================================================
37 //function : Next
38 //purpose  : 
39 //=======================================================================
40
41 inline void Message_ProgressSentry::Next (const Standard_Real span, 
42                                           const Handle(TCollection_HAsciiString)& name) const
43 {
44   if ( myActive ) {
45     myProgress->EndScope();
46     myProgress->NewScope(span, name);
47   }
48 }
49
50 //=======================================================================
51 //function : More
52 //purpose  : 
53 //=======================================================================
54
55 inline Standard_Boolean Message_ProgressSentry::More () const
56 {
57   return myActive ? ! myProgress->UserBreak() : Standard_True;
58 }
59
60 //=======================================================================
61 //function : Show
62 //purpose  : 
63 //=======================================================================
64
65 inline void Message_ProgressSentry::Show () const
66 {
67   if ( myProgress ) myProgress->Show();
68 }