Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:17

0001 // Copyright (c) 2020 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef Message_ProgressSentry_HeaderFile
0015 #define Message_ProgressSentry_HeaderFile
0016 
0017 #include <Message_ProgressScope.hxx>
0018 
0019 //! Functionality of this class (Message_ProgressSentry) has been superseded by Message_ProgressScope.
0020 //! This class is kept just to simplify transition of an old code and will be removed in future.
0021 class Standard_DEPRECATED("Deprecated class, Message_ProgressScope should be used instead")
0022 Message_ProgressSentry : public Message_ProgressScope
0023 {
0024 public:
0025   //! Deprecated constructor, Message_ProgressScope should be created instead.
0026   Message_ProgressSentry (const Message_ProgressRange& theRange,
0027                           const Standard_CString theName,
0028                           const Standard_Real theMin,
0029                           const Standard_Real theMax,
0030                           const Standard_Real theStep,
0031                           const Standard_Boolean theIsInf = Standard_False,
0032                           const Standard_Real theNewScopeSpan = 0.0)
0033   : Message_ProgressScope (theRange, theName, theMax, theIsInf)
0034   {
0035     if (theMin != 0.0 || theStep != 1.0 || theNewScopeSpan != 0.0)
0036     {
0037       throw Standard_ProgramError ("Message_ProgressSentry, invalid parameters");
0038     }
0039   }
0040 
0041   //! Method Relieve() was replaced by Close() in Message_ProgressScope
0042   void Relieve () { Close(); }
0043 
0044 private:
0045   //! Message_ProgressRange should be passed to constructor instead of Message_ProgressIndicator.
0046   Message_ProgressSentry (const Handle(Message_ProgressIndicator)& theProgress,
0047                           const Standard_CString theName,
0048                           const Standard_Real theMin,
0049                           const Standard_Real theMax,
0050                           const Standard_Real theStep,
0051                           const Standard_Boolean theIsInf = Standard_False,
0052                           const Standard_Real theNewScopeSpan = 0.0);
0053 };
0054 
0055 #endif // Message_ProgressSentry_HeaderFile