0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Message / Message_ProgressIndicator.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #include <Message_ProgressIndicator.hxx>
15
16 IMPLEMENT_STANDARD_RTTIEXT(Message_ProgressIndicator,Standard_Transient)
17
18 //=======================================================================
19 //function : Message_ProgressIndicator
20 //purpose  :
21 //=======================================================================
22 Message_ProgressIndicator::Message_ProgressIndicator()
23 : myPosition(0.),
24   myRootScope (NULL)
25 {
26   myRootScope = new Message_ProgressScope (this);
27 }
28
29 //=======================================================================
30 //function : ~Message_ProgressIndicator
31 //purpose  :
32 //=======================================================================
33 Message_ProgressIndicator::~Message_ProgressIndicator()
34 {
35   // Avoid calling Increment() from myRootScope.Close()
36   myRootScope->myProgress = 0;
37   myRootScope->myIsActive = false;
38   delete myRootScope;
39 }
40
41 //=======================================================================
42 //function : Start()
43 //purpose  :
44 //=======================================================================
45 Message_ProgressRange Message_ProgressIndicator::Start()
46 {
47   myPosition = 0.;
48   myRootScope->myValue = 0.;
49   Reset();
50   Show (*myRootScope, Standard_False);
51   return myRootScope->Next();
52 }
53
54 //=======================================================================
55 //function : Start()
56 //purpose  :
57 //=======================================================================
58 Message_ProgressRange Message_ProgressIndicator::Start
59                        (const Handle(Message_ProgressIndicator)& theProgress)
60 {
61   return theProgress.IsNull() ? Message_ProgressRange() : theProgress->Start();
62 }